summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tlpkginfo
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-01-10 16:53:51 +0000
committerKarl Berry <karl@freefriends.org>2015-01-10 16:53:51 +0000
commit071d9d5f04114b971a1e98c57d2ee8d5105f319f (patch)
treef785ccbd288eb4b305bb5eb39fbc3919a5c71c4e /Master/tlpkg/bin/tlpkginfo
parentf4df876113fcb7bda86758e0c07ed4c441ed8aee (diff)
pl = pl-mf + plpsfont
git-svn-id: svn://tug.org/texlive/trunk@36012 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin/tlpkginfo')
-rwxr-xr-xMaster/tlpkg/bin/tlpkginfo56
1 files changed, 35 insertions, 21 deletions
diff --git a/Master/tlpkg/bin/tlpkginfo b/Master/tlpkg/bin/tlpkginfo
index 36272a137d9..6e764c71d0a 100755
--- a/Master/tlpkg/bin/tlpkginfo
+++ b/Master/tlpkg/bin/tlpkginfo
@@ -17,8 +17,8 @@ sub main {
# erroneous or problematic tds files (when new, tell RobinF and author)
$erroneous_tds = join ("|",
- qw(countriesofeurope dad engpron gost hacm he-she hobby imtekda
- mathdesign spanish sttools titleps),
+ qw(countriesofeurope dad engpron gost hacm he-she hobby imtekda
+ mathdesign spanish sttools),
);
# Heiko's tds files (don't propagate through CTAN fast enough).
@@ -37,7 +37,7 @@ sub main {
$cjk_pkgs = "bin-(cjk|ttf)utils|dnp|(|garuda-|norasi-)c90";
if ($ARGV[0] eq "--ctan-dir") {
- my $output = &find_ctan_dir ($ARGV[1]);
+ my $output = &find_ctan_dir ($ARGV[1], 0);
print "$output\n";
return $output ? 0 : 1;
@@ -58,12 +58,12 @@ sub main {
}
}
-#
-# Return 0 for success if we find a path (and print it on stdout),
-# else return 1.
+
+# Return the location on CTAN for PKGNAME, or 1 if no PKGNAME.
+# If DO_COPY is nonzero, construct a working directory and return that.
#
sub find_ctan_dir {
- my ($pkgname) = @_;
+ my ($pkgname,$do_copy) = @_;
return 1 unless $pkgname;
# use explicit catalogue name if given in tlpsrc.
@@ -82,7 +82,7 @@ sub find_ctan_dir {
# The CTAN path to a package is sometimes stored in the TeX Catalogue,
# but old entries don't have it, etc. Still, we want to use it if present.
- my $ctan_dir = &catalogue_find_ctan_path ($me);
+ my $ctan_dir = &catalogue_find_ctan_path ($me, $do_copy);
if (! $ctan_dir) {
# fall back on many special cases
(my $me_wo_babel = $me) =~ s,^babel-,,; # remove when Catalogue ready
@@ -204,7 +204,6 @@ sub find_ctan_dir {
return $ctan_dir;
}
-
# If the .tlpsrc file for ME has a catalogue entry, return it,
# else return empty string.
@@ -224,15 +223,16 @@ sub tlpsrc_find_catalogue {
return $cat;
}
-
-# Look up ctan path for given package name in catalogue entry.
+# Look up ctan path for given PKGNAME in catalogue entry.
# xml is too hard to parse, so just look for the <ctan path...> entry.
#
# Return the ctan path if found (without leading /), or undef.
+# Except that if DO_COPY is nonzero, construct a working directory and
+# return that.
#
sub catalogue_find_ctan_path {
- my ($pkgname) = @_;
+ my ($pkgname,$do_copy) = @_;
# catalogue uses all-lowercase file/directory names.
my $firstchar = substr (lc ($pkgname), 0, 1);
@@ -298,8 +298,7 @@ sub prepare {
return undef unless $pkg;
# find the real ctan dir and return it if our tds is erroneous
- $do_copy = 1; # ask find_catalogue() to copy single files, too
- my $ctan_loc = &find_ctan_dir ($pkg);
+ my $ctan_loc = &find_ctan_dir ($pkg, 1); # pass do_copy=1
return $ctan_loc if $pkg =~ /^($erroneous_tds)$/;
# tds path is usually in ctan/install...
@@ -311,12 +310,12 @@ sub prepare {
$tds_path = "/home/ftp/tex/$pkg/$pkg.tds.zip";
# will be ignored below if it doesn't exist.
- # ...and except for context, and others...
+ # ...and except for context, and plenty more...
} elsif ($pkg eq "context") {
$tds_path = "/home/ftp/mirror/www.pragma-ade.com/context/beta/cont-tmf.zip";
} elsif ($pkg eq "enctex") {
- # not tds, but we omit the TDS_READY below
+ # not tds, but we eliminate the TDS_READY below
# and do the rest in ctan2tds as usual.
$tds_path = "$CTAN/systems/enctex/enctex.tar.gz";
@@ -324,7 +323,11 @@ sub prepare {
$tds_path = glob ("$CTAN/fonts/hfoldsty/hfoldsty-v*.zip");
} elsif ($pkg eq "pgf") {
- $tds_path = glob ("$CTAN/install/graphics/pgf/base/pgf.tds.zip");
+ $tds_path = "$CTAN/install/graphics/pgf/base/pgf.tds.zip";
+
+ } elsif ($pkg eq "xxxpl") {
+ # not tds, but we need to combine with plpsfont; see below.
+ $tds_path = "$CTAN/language/polish/pl-mf.zip";
# ...and except for files in latex-tds...
} elsif ($pkg =~ /^($latex_tds_pkgs)$/) {
@@ -348,7 +351,7 @@ sub prepare {
system ($unpack) == 0 || die "unpack failed: $!\n($unpack)";
system ("chmod -R a+rX $tmpdir");
- # put a flag for ctan2tds' donormal() to work.
+ # put a sentinel file for ctan2tds' donormal() to work.
system ("echo $tds_path >$tmpdir/TDS_READY");
# fixups ... the amslatex packages are all bundled together,
@@ -365,13 +368,14 @@ sub prepare {
}
system ("rm -rf @deldir"); # discard the rest
- } elsif ($pkg eq "enctex") {
+ } elsif ($pkg =~ /^(enctex|plxxx)$/) {
unlink ("$tmpdir/TDS_READY"); # not tds
}
return $tmpdir;
}
+
# copy file to temp dir and return that for ctan2tl to use.
#
sub copy_to_tmpdir {
@@ -388,13 +392,23 @@ sub copy_to_tmpdir {
# there's no real ctan dir for these packages, just zips.
my $zip = "";
if ($pkgname eq "cc-pl") {
- $zip = "cc-pl.zip"
+ $zip = "cc-pl.zip";
+ } elsif ($pkgname eq "pl-mf") {
+ $zip = "pl-mf.zip";
} elsif ($pkgname eq "tap") {
- $zip = "tap077.zip"
+ $zip = "tap077.zip";
}
if ($zip) {
system ("cd $pkgdir && unzip -q $zip && rm $zip");
}
+ # the pl package in TeX Live is a combination of the pl-mf and
+ # plpsfont packages on CTAN, per Thomas Esser and GUST as of many
+ # years ago. So combine them. ctan2tds will flatten everything out,
+ # so don't worry about directory levels.
+ if ($pkgname eq "pl-mf") {
+ my $plpsfont_zip = "$CTAN/language/polish/plpsfont.zip";
+ system ("cd $pkgdir && unzip -q $plpsfont_zip");
+ }
return $pkgdir;
}