diff options
author | Karl Berry <karl@freefriends.org> | 2010-07-11 16:11:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-07-11 16:11:57 +0000 |
commit | 05d9f874728581e7f3cf429d2a1545f1df2ee228 (patch) | |
tree | 700e8e8fed06c0b7c84de5accd32f88a3201b2ab /Master/tlpkg | |
parent | 056eb8a245442c4d4f4c624b2e87bfd0e3b300fb (diff) |
(platform): correct regexp so that we return
amd64-kfreebsd for x86_64-unknown-kfreebsd8.0-gnu
(report from alan braslau).
git-svn-id: svn://tug.org/texlive/trunk@19372 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rw-r--r-- | Master/tlpkg/TeXLive/TLUtils.pm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index 95f9fd3268a..9f2ee09939b 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -212,8 +212,6 @@ sub platform $::_platform_="win32"; } else { my $config_guess = "$::installerdir/tlpkg/installer/config.guess"; - my @OSs = qw(aix cygwin darwin freebsd hpux irix - kfreebsd linux netbsd openbsd solaris); # We cannot rely on #! in config.guess but have to call /bin/sh # explicitly because sometimes the 'noexec' flag is set in @@ -224,12 +222,15 @@ sub platform die "$0: could not run $config_guess, cannot proceed, sorry" if ! $guessed_platform; - $guessed_platform =~ s/^x86_64-(.*)-k?freebsd/amd64-$1-k?freebsd/; + $guessed_platform =~ s/^x86_64-(.*-k?)freebsd/amd64-$1freebsd/; my $CPU; # CPU type as reported by config.guess. my $OS; # O/S type as reported by config.guess. ($CPU = $guessed_platform) =~ s/(.*?)-.*/$1/; $CPU =~ s/^alpha(.*)/alpha/; # alphaev56 or whatever $CPU =~ s/powerpc64/powerpc/; # we don't distinguish ppc64 + + my @OSs = qw(aix cygwin darwin freebsd hpux irix + kfreebsd linux netbsd openbsd solaris); for my $os (@OSs) { # Match word boundary at the beginning of the os name so that # freebsd and kfreebsd are distinguished. @@ -245,9 +246,11 @@ sub platform } elsif ($CPU =~ /^i.86$/) { $CPU = "i386"; # 586, 686, whatever } + unless (defined $OS) { ($OS = $guessed_platform) =~ s/.*-(.*)/$1/; } + $::_platform_ = "$CPU-$OS"; } } |