summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm30
-rw-r--r--Master/tlpkg/doc/packages.txt8
2 files changed, 26 insertions, 12 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index cef28264425..a1af3216229 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -1,7 +1,7 @@
# $Id$
# The inevitable utilities for TeX Live.
#
-# Copyright 2007 Norbert Preining, Reinhard Kotucha
+# Copyright 2007, 2008 Norbert Preining, Reinhard Kotucha
# This file is licensed under the GNU General Public License version 2
# or any later version.
@@ -183,17 +183,19 @@ sub platform {
=item C<platform_desc($platform)>
-Return a string which describes a particular platform. Same as in TeX
-Live 2007 but NetBSD added.
+Return a string which describes a particular platform identifier, e.g.,
+given C<i386-linux> we return C<Intel x86 with GNU/Linux>.
=cut
-sub platform_desc {
- my $platform=shift;
+sub platform_desc
+{
+ my ($platform) = @_;
my %platform_name=(
'alpha-linux' => 'DEC Alpha with GNU/Linux',
'alphaev5-osf' => 'DEC Alphaev5 OSF',
+ 'amd64-freebsd' => 'x86_64 with FreeBSD',
'hppa-hpux' => 'HP-UX',
'i386-cygwin' => 'Intel x86 with Cygwin',
'i386-darwin' => 'Intel x86 with MacOSX/Darwin',
@@ -209,15 +211,17 @@ sub platform_desc {
'sparc-linux' => 'Sparc with GNU/Linux',
'sparc-solaris' => 'Sparc with Solaris',
'win32' => 'Windows',
- 'x86_64-linux' => 'Intel x86_64 with GNU/Linux'
+ 'x86_64-linux' => 'x86_64 with GNU/Linux'
);
- if (defined $platform_name{$platform}) {
+ % the inconsistency between amd64-freebsd and x86_64-linux is
+ % unfortunate (it's the same hardware), but the os people say those
+ % are the conventional names on the respective os's, so ...
+
+ if (exists $platform_name{$platform}) {
return "$platform_name{$platform}";
} else {
- my $CPU;
- my $OS;
- ($CPU, $OS)=split '-', "$platform";
+ my ($CPU,$OS) = split ('-', $platform);
return "$CPU with " . ucfirst "$OS";
}
}
@@ -226,11 +230,13 @@ sub platform_desc {
=item C<win32>
-Return C<1> if platform is Windows and C<0> otherwise.
+Return C<1> if platform is Windows and C<0> otherwise. The test is
+currently based on the value of Perl's C<$^O> variable.
=cut
-sub win32 {
+sub win32
+{
if ($^O=~/^MSWin(32|64)$/i) {
return 1;
} else {
diff --git a/Master/tlpkg/doc/packages.txt b/Master/tlpkg/doc/packages.txt
new file mode 100644
index 00000000000..60a735e6638
--- /dev/null
+++ b/Master/tlpkg/doc/packages.txt
@@ -0,0 +1,8 @@
+See http://tug.org/texlive/pkgupdate.html for what information there is
+on the CTAN-to-TL update process.
+
+To add a new architecture:
+- create directory in Master/bin
+- add lzma and lzmadec binaries in Master/tlpkg/installer
+- add description in Master/tlpkg/TeXLive/TLUtils.pm
+- regenerate tlpdb.