summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLUtils.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/TeXLive/TLUtils.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm9
1 files changed, 7 insertions, 2 deletions
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