diff options
author | Karl Berry <karl@freefriends.org> | 2012-12-17 23:46:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-12-17 23:46:31 +0000 |
commit | 6ac754f03838e01f7bd2ad2772eb6fde8eb34775 (patch) | |
tree | 04c444eef068dd1a4c9e58c11f4e28ebe119faed /Master | |
parent | a9be70a79afe30937c809014d02feed956ba3e80 (diff) |
first steps towards cstex packages
git-svn-id: svn://tug.org/texlive/trunk@28560 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/tlpkg/bin/ctan2tl | 6 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpkginfo | 15 | ||||
-rwxr-xr-x | Master/tlpkg/libexec/ctan2tds | 86 |
3 files changed, 89 insertions, 18 deletions
diff --git a/Master/tlpkg/bin/ctan2tl b/Master/tlpkg/bin/ctan2tl index 6a1dd7ab7e0..e685d4ba9c9 100755 --- a/Master/tlpkg/bin/ctan2tl +++ b/Master/tlpkg/bin/ctan2tl @@ -107,6 +107,12 @@ fi # clean up the tmpdir possibly created by tlpkginfo --prepare. ctan_root=`tlpkginfo --ctan-root` if echo "$ctan_dir" | egrep "^$ctan_root" >/dev/null; then :; else + ctan_dir=`cd $ctan_dir && pwd` # canonicalize + slashes=`echo $ctan_dir | tr -cd /` + if test "$slashes" = /; then + echo "$0: only one directory level in CTAN directory: $ctan_dir" >&2 + exit 1 + fi rm -rf $ctan_dir fi fi # end of copying from CTAN. diff --git a/Master/tlpkg/bin/tlpkginfo b/Master/tlpkg/bin/tlpkginfo index 0a8c600193e..74ae74b9400 100755 --- a/Master/tlpkg/bin/tlpkginfo +++ b/Master/tlpkg/bin/tlpkginfo @@ -49,8 +49,9 @@ sub main { return 0; } else { - die "Usage: $0 --ctan-dir PKGNAME or --prepare PKGNAME - or --ctan-root (not \"@ARGV\").\n"; + die "Usage: $0 --ctan-dir PKGNAME\n" + . " or: --prepare PKGNAME\n" + . " or: --ctan-root (not \"@ARGV\").\n"; } } @@ -170,12 +171,18 @@ sub find_ctan_dir { if $me =~ /^hyphen-/ && ! $ctan_dir; } - # In the case of mathspic, we cannot use the catalogue directory, - # since we want to ignore the dos/ subdir and just go with the perl/. + # For mathspic, we cannot use the catalogue directory: + # we want to ignore the dos/ subdir and just go with the perl/. if ($me eq "mathspic") { $ctan_dir .= "/perl"; } + # For cs, we need to unpack from multiple tarballs, + # so copy the entire cstex directory. + if ($pkgname eq "cs") { + $ctan_dir = "$CTAN/macros/cstex/base"; + } + # prepend ctan root if not an absolute dir (this happens when we make # a temp dir). $ctan_dir = "$CTAN/$ctan_dir" if $ctan_dir =~ m,^[^/],; diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index 7dd153938bc..c815fade73b 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -274,7 +274,7 @@ chomp ($Build = `cd $Master/../Build/source && pwd`); 'cpssp', "die 'skipping, requires python'", 'croatian', "die 'skipping, nonfree (nomodify) license'", 'crosstex', "die 'sorry, investigate self-locating?'", - 'csplain', "die 'skipping, not ready, sorry'", + 'cspsfonts', "die 'skipping, use cs'", 'csv2latex', "die 'skipping, mac only?, ruby + applescript'", 'csvtools', "&MAKEflatten", 'csvtolatex', "die 'skipping, w32 only, visual basic'", @@ -1088,6 +1088,10 @@ chomp ($Build = `cd $Master/../Build/source && pwd`); 'chemmacros' => '&POSTchemmacros', 'context-games' => '&POSTcontext_games', 'coordsys' => '&POSTcoordsys', + 'cs' => '&POSTcs', + 'cslatex' => '&POST_cstexpkgs', + 'csplain' => '&POST_cstexpkgs', + 'cstex' => '&POSTcstex', 'ctex' => '&POSTctex', 'dehyph-exptl' => '&POSTdehyph_exptl', 'doipubmed' => '&POSTlatex2html', @@ -3359,16 +3363,16 @@ sub flatten_dirtree { } sub MAKEunzipandflatten { - &setup; - chdir("$DEST/doc/$whichdocformat/$package"); - my $archive = -r "$package.zip" ? "$package.zip" : "$package.tar.gz"; - my $unarchiver = &unarchiver ($archive); - &SYSTEM ("$unarchiver $archive; $RM $archive"); - - &flatten_dirtree ($package); - - &buildfilelist; - &donormal ("nosetup"); + &setup; + chdir("$DEST/doc/$whichdocformat/$package"); + my $archive = -r "$package.zip" ? "$package.zip" : "$package.tar.gz"; + my $unarchiver = &unarchiver ($archive); + &SYSTEM ("$unarchiver $archive; $RM $archive"); + + &flatten_dirtree ($package); + + &buildfilelist; + &donormal ("nosetup"); } sub MAKEnosymlinks { @@ -4841,7 +4845,7 @@ sub POSTbiber { # sub unarchiver { my ($archive) = @_; - my ($unarch) = ("", ""); + my $unarch; if ($archive =~ /\.tar\./) { $unarch = "tar xf"; @@ -4891,14 +4895,68 @@ sub POSTcontext_games { } sub POSTcoordsys { - print "POST$package - rename `putfile.' to `putfile.maple'.\n"; + print "POST$package - rename `putfile.' to `putfile.maple'\n"; # Apparently dtx insists on always adding the period; this can make # vfat filesystems choke. &SYSTEM ("$MV putfile. putfile.maple"); } +sub POST_cstexpkgs { + print "POST_cstexpkgs (for $package) - untar\n"; + # used for csplain, cslatex, cs(psfonts). + # the Catalogue and tar file name is cspsfonts, but the directory + # name inside is cs; we stay with cs since that has been the name in TL. + my $tarfile = -r "$package.tar.gz" ? "$package.tar.gz" : "cspsfonts.tar.gz"; + my $untar = "tar -C $DEST --strip-components=1 -x -f $tarfile"; + $untar .= " --exclude=texmf/doc/cstex"; # handled in its own package + $untar .= " --exclude=texmf/tex/generic/enctex"; # must do by hand + &SYSTEM ($untar); + &SYSTEM ("$RM $tarfile"); + unlink ("$DEST/tex/csplain/base/texput.log"); # stray file +} + +sub POSTcs { + print "POST$package - untar and combine\n"; + # + # The cs package is where we have the cstex fonts, in both mf and + # type1 formats (plus tfm, vf, etc.). This comes from multiple + # tarballs in the cstex distribution area. + # + for my $tarbase ("csfonts-t1", "csfonts", "cspsfonts") { + my $tarfile = "$tarbase.tar.gz"; + my $untar = "tar -C $DEST --strip-components=1 -x -f $tarfile"; + $untar .= " --exclude texmf/doc/cstex"; # filter out cstex dir + &SYSTEM ($untar); + } + &SYSTEM ("$RM -rf $DEST/fonts/source/jknappen"); # elide sauter mods + &SYSTEM ("$RM *"); # dump rest +} + +sub POSTcstex { + print "POST$package - untar pieces, combine\n"; + # + # The cstex package itself just contains documentation. By the + # author's choice, it is split over several tarballs and other files. + # Luckily, cstex as defined in the Catalogue maps to + # CTAN:macros/cstex, which includes everything. So we can pick and + # choose what we need. + # + for my $tarbase ("csplain", "cslatex", "cspsfonts") { + my $tarfile = "base/$tarbase.tar.gz"; + my $untar = "tar -C $DEST --strip-components=1 -x -f $tarfile"; + $untar .= " texmf/doc/cstex"; # filter out all but cstex dir + &SYSTEM ($untar); + } + &SYSTEM ("$MV doc/README README-doc"); + &SYSTEM ("$MV doc/cstexman.tex ."); + &SYSTEM ("$MV doc/jemny.* doc/parpozn.* doc/prvni.* ."); + &SYSTEM ("$RM -rf *.ps *.zip"); + &SYSTEM ("$RM -rf README base doc"); + &SYSTEM ("$MV * $DEST/doc/cstex/"); # move all to same dir +} + sub POSTctex { - print "POST$package - move subdirectories.\n"; + print "POST$package - move subdirectories\n"; my $dstdir = "$DEST/tex/latex/$package"; &xmkdir ($dstdir); &SYSTEM ("$MV back cfg def engine fd fontset opt $dstdir/"); |