diff options
Diffstat (limited to 'Master/tlpkg/TeXLive/TLUtils.pm')
-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"; } } |