summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-08-26 23:16:38 +0000
committerKarl Berry <karl@freefriends.org>2006-08-26 23:16:38 +0000
commita4f90f5f5ce7ba1eb92e2859c6a45507c00d912d (patch)
tree042909dab4d22d7f85e5df2c304f921ea67b5fff
parentd3ccd455a6548ad07fa504baae6e61e71b0d102b (diff)
prepare for amslatex.zip from latex-tds
git-svn-id: svn://tug.org/texlive/trunk@2036 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xBuild/cdbuild/ctan2tds.pl38
-rwxr-xr-xBuild/tools/ctan2tl27
2 files changed, 56 insertions, 9 deletions
diff --git a/Build/cdbuild/ctan2tds.pl b/Build/cdbuild/ctan2tds.pl
index d8b19e65c63..e18dc521dc1 100755
--- a/Build/cdbuild/ctan2tds.pl
+++ b/Build/cdbuild/ctan2tds.pl
@@ -67,8 +67,12 @@ chdir $startdir || die "chdir($startdir) failed: $!";
'ae', "&MAKEae",
'allrunes', "&MAKEflatten",
'alphabib', "print shell script, and no doc source?",
- 'amslatex', "&MAKEcopy", # we use latex-tds/amslatex.zip
+ 'ams', "&MAKEamslatex",
+ 'amscls', "&MAKEamslatex",
+ 'amsmath', "&MAKEamslatex",
'amsldoc-vn', "&MAKEflatten",
+ 'amsltx2', "&MAKEamslatex",
+ 'amsrefs', "&MAKEamslatex",
'antomega', "&MAKEflatten",
'antt', "&MAKEflatten",
'arabtex', "&MAKEarabtex",
@@ -1486,6 +1490,37 @@ sub MAKEibycusbabel {
# package subroutines
+sub MAKEamslatex {
+ # Here is an unusual special case. The AMS distributes an
+ # amslatex.zip file which actually unpacks into numerous
+ # subdirectories, none of which are named amslatex:
+ # bibtex/bst/ams, doc/latex/amscls, doc/latex/amsmath, etc.
+ #
+ # For each of these directories, we make a TL package, since TL
+ # so strongly ties directories to package names.
+ #
+ # We make those TL packages by unpacking the optimized amslatex.zip
+ # provided as part of the latex-tds project; that is what has been
+ # done by ctan2tl before this script has been called. Our job here is
+ # to throw away all the *other* directories, so that if we are called
+ # to update (say) the "amscls" package, we delete everything but that.
+ #
+ print "\t SPECIAL extract $package from amslatex\n";
+
+ # Start with the usual straight copy.
+ &MAKEcopy ();
+ &xchdir ($DEST);
+
+ # List of subsubdirectories, at the package level.
+ my @deldir = ();
+ chomp (my @dirlist = `find */*/* -type d | sort -u`);
+ for my $dir (@dirlist) {
+ next if $dir =~ m!$package$!; # keep matching directories
+ push (@deldir, $dir);
+ }
+ &SYSTEM ("rm -rf @deldir"); # discard the rest
+}
+
sub MAKEarabtex {
&xchdir ($packagedir);
#
@@ -1588,7 +1623,6 @@ sub MAKEfp {
&donormal;
}
-
sub MAKEhyperref {
&xchdir ($packagedir);
#
diff --git a/Build/tools/ctan2tl b/Build/tools/ctan2tl
index 6dc90f1e171..d173a24cd32 100755
--- a/Build/tools/ctan2tl
+++ b/Build/tools/ctan2tl
@@ -41,12 +41,20 @@ if test -z "$pkg"; then
exit 1
fi
-ctan_dir1=`tlpkginfo --ctan-dir $pkg`
+# See comments below.
+amslatex_tds_pkglist="ams|amscls|amsltx2|amsmath|amsrefs"
+if echo "$pkg" | egrep "^($amslatex_tds_pkglist)\$" >/dev/null; then
+ ctan_pkgname=amslatex
+else
+ ctan_pkgname=$pkg
+fi
+
+ctan_dir1=`tlpkginfo --ctan-dir $ctan_pkgname`
if test -z "$ctan_dir1"; then
- echo "$0: can't find CTAN directory for $pkg." >&2
+ echo "$0: can't find CTAN directory for $ctan_pkgname." >&2
exit 1
fi
-echo "$0: ctan dir for $1 is $ctan_dir1"
+echo "$0: ctan dir for $pkg is $ctan_dir1"
if $copy_from_ctan; then
@@ -55,21 +63,26 @@ rm -rf $pkg
# An important special case: the latex-tds project contains tds-ready
# zip files for the base latex distribution. We want to use them.
-latex_tds_pkglist="amslatex|babel|cyrillic|graphics|latex|psnfss|latex-tds|tools"
+corelatex_tds_pkglist="babel|cyrillic|graphics|latex|psnfss|tools"
+latex_tds_pkglist="latex-tds|$amslatex_tds_pkglist|$corelatex_tds_pkglist"
-if echo "$pkg" | egrep "^($latex_tds_pkglist)\$"; then
+if echo "$pkg" | egrep "^($latex_tds_pkglist)\$" >/dev/null; then
mkdir $pkg
ctan_root=`tlpkginfo --ctan-root`
#
- # another complication: the latex-tds package for our purposes is the
+ # complications: the latex-tds package, for our purposes, is the
# sources for the tools that do the process; that's in the zip file
# source.zip, in the latex-tds directory. Similarly, the zip file for
- # latex itself is named "base.zip".
+ # latex itself is named "base.zip". Finally, amslatex.zip actually
+ # contains several packages (= directories) -- such as ams, amscls,
+ # etc. AMS sets it up that way.
#
if test $pkg = latex-tds; then
zipname=source.zip
elif test $pkg = latex; then
zipname=base.zip
+ elif echo "$pkg" | egrep "^($amslatex_tds_pkglist)\$" >/dev/null; then
+ zipname=amslatex.zip
else
zipname=$pkg.zip
fi