From 3a34da02b29d467f1c112b1f7fdd5f1fa086b154 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 18 Mar 2010 17:38:27 +0000 Subject: (platform): only match word boundary at beginning of os name, not end, for sake of solaris2. Report from Eric Behr, 11 Mar 2010 13:49:23. git-svn-id: svn://tug.org/texlive/trunk@17495 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLUtils.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Master/tlpkg/TeXLive') diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index f674f04b10c..ccba4cc9bf3 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -198,7 +198,8 @@ subsequent calls just return that value. =cut -sub platform { +sub platform +{ unless (defined $::_platform_) { if ($^O=~/^MSWin(32|64)$/i) { $::_platform_="win32"; @@ -223,7 +224,11 @@ sub platform { $CPU =~ s/^alpha(.*)/alpha/; # alphaev56 or whatever $CPU =~ s/powerpc64/powerpc/; # we don't distinguish on ppc64 for my $os (@OSs) { - $OS = $os if $guessed_platform =~ /\b$os\b/; + # Match word boundary at the beginning of the os name so that + # freebsd and kfreebsd are distinguished. + # Do not match word boundary at the end of the os so that + # solaris2 is matched. + $OS = $os if $guessed_platform =~ /\b$os/; } if ($OS eq "darwin") { $CPU = "universal"; # TL provides universal binaries -- cgit v1.2.3