diff options
author | Karl Berry <karl@freefriends.org> | 2011-12-25 23:40:58 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-12-25 23:40:58 +0000 |
commit | 3656510efe09a15c54402967a8d701c5fc020141 (patch) | |
tree | d6bc781a00396dbc0e592b49645151efa11ddd9f /Master/tlpkg/TeXLive/TLUtils.pm | |
parent | 7d87e08e2bf8d29fb61bc3866abd41f623949852 (diff) |
(platform_name, platform_desc): map
armv7l-unknown-linux-gnueabi to armel-linux, per borisv.
git-svn-id: svn://tug.org/texlive/trunk@24948 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLUtils.pm')
-rw-r--r-- | Master/tlpkg/TeXLive/TLUtils.pm | 67 |
1 files changed, 35 insertions, 32 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index 34898f21478..259a5760221 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -260,39 +260,41 @@ C</.*-(.*$)/> as a last resort and hope it provides something useful. =cut sub platform_name { - my ($guessed_platform) = @_; - - $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 - $CPU =~ s/mips64el/mipsel/; # we don't distinguish mips64 and 32 el - - 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. - # 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") { - # We never want to guess x86_64-darwin even if config.guess - # does, because Leopard can be 64-bit but our x86_64-darwin - # binaries will only run on Snow Leopard. - $CPU = "universal"; - } elsif ($CPU =~ /^i.86$/) { - $CPU = "i386"; # 586, 686, whatever - } + my ($guessed_platform) = @_; + + $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/armv7l/armel/; # arm + $CPU =~ s/powerpc64/powerpc/; # we don't distinguish ppc64 + $CPU =~ s/mips64el/mipsel/; # we don't distinguish mips64 and 32 el + + 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. + # 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") { + # We never want to guess x86_64-darwin even if config.guess + # does, because Leopard can be 64-bit but our x86_64-darwin + # binaries will only run on Snow Leopard. + $CPU = "universal"; + } elsif ($CPU =~ /^i.86$/) { + $CPU = "i386"; # 586, 686, whatever + } - unless (defined $OS) { - ($OS = $guessed_platform) =~ s/.*-(.*)/$1/; - } + if (! defined $OS) { + ($OS = $guessed_platform) =~ s/.*-(.*)/$1/; + } - return "$CPU-$OS"; + return "$CPU-$OS"; } =item C<platform_desc($platform)> @@ -310,11 +312,12 @@ sub platform_desc { 'alphaev5-osf' => 'DEC Alphaev5 OSF', 'amd64-freebsd' => 'x86_64 with FreeBSD', 'amd64-kfreebsd' => 'x86_64 with GNU/FreeBSD', + 'armel-linux' => 'ARM with GNU/Linux', 'hppa-hpux' => 'HP-UX', 'i386-cygwin' => 'Intel x86 with Cygwin', 'i386-darwin' => 'Intel x86 with MacOSX/Darwin', 'i386-freebsd' => 'Intel x86 with FreeBSD', - 'i386-kfreebsd' => 'Intel x86 with GNU/FreeBSD', + 'i386-kfreebsd' => 'Intel x86 with GNU/kFreeBSD', 'i386-openbsd' => 'Intel x86 with OpenBSD', 'i386-netbsd' => 'Intel x86 with NetBSD', 'i386-linux' => 'Intel x86 with GNU/Linux', |