diff options
author | Karl Berry <karl@freefriends.org> | 2008-11-04 19:00:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-11-04 19:00:54 +0000 |
commit | a231920b468c769c0cd3c8faaf1579a896a81a12 (patch) | |
tree | 789da450278ce6406b2d20d0cf6f0deca2a4f6cc | |
parent | bb571bc35489e4127fe04ed5315b122fcffa073c (diff) |
(setup_programs): allow lzma and lzmadec to be
found along PATH, if they aren't present in our
hierarchy, for the sake of netbsd. From Jukka
Salmi, 31 Oct 2008 15:43:22.
git-svn-id: svn://tug.org/texlive/trunk@11180 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/tlpkg/TeXLive/TLUtils.pm | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index b908b946c0b..ecae24bfc46 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -864,7 +864,7 @@ the way. In this case the list C<@$filelistref> is not taken into account. If C<$what> starts with C<http://> or C<ftp://> then C<$what> is -downloaded from the net and piped through c<lzmadec> and C<tar>. +downloaded from the net and piped through C<lzmadec> and C<tar>. If $what ends with C<.tar.lzma> (but does not start with C<http://> or C<ftp://>, but possibly with C<file:/>) it is assumed to be a readable @@ -1015,16 +1015,8 @@ C<lzmadec> binary for that arch present), 0 for programs don't work, and sub setup_programs { my ($bindir, $platform) = @_; $::progs{'wget'} = "wget"; - if (!defined($platform) || ($platform eq "")) { - # we assume that we run from the DVD, so we can call platform() and - # thus also the config.guess script - # but we have to setup $::installerdir because the platform script - # relies on it - $::installerdir = "$bindir/../.."; - $platform = platform(); - } - $::progs{'lzmadec'} = "$bindir/lzma/lzmadec.$platform"; - $::progs{'lzma'} = "$bindir/lzma/lzma.$platform"; + $::progs{'lzmadec'} = "lzmadec"; + $::progs{'lzma'} = "lzma"; $::progs{'tar'} = "tar"; if ($^O =~ /^MSWin(32|64)$/i) { @@ -1033,8 +1025,21 @@ sub setup_programs { $::progs{'lzmadec'} = conv_to_w32_path("$bindir/lzma/lzmadec.win32.exe"); $::progs{'lzma'} = conv_to_w32_path("$bindir/lzma/lzma.exe"); - } elsif (-r "$bindir/wget/wget.$platform") { - $::progs{'wget'} = "$bindir/wget/wget.$platform"; + } else { + if (!defined($platform) || ($platform eq "")) { + # we assume that we run from the DVD, so we can call platform() and + # thus also the config.guess script + # but we have to setup $::installerdir because the platform script + # relies on it + $::installerdir = "$bindir/../.."; + $platform = platform(); + } + $::progs{'wget'} = "$bindir/wget/wget.$platform" + if -x "$bindir/wget/wget.$platform"; + $::progs{'lzmadec'} = "$bindir/lzma/lzmadec.$platform" + if -x "$bindir/lzma/lzmadec.$platform"; + $::progs{'lzma'} = "$bindir/lzma/lzma.$platform" + if -x "$bindir/lzma/lzma.$platform"; } # check for existence of lzmadec; this determines whether the present |