diff options
Diffstat (limited to 'Master/tlpkg/libexec/ctan2tds')
-rwxr-xr-x | Master/tlpkg/libexec/ctan2tds | 86 |
1 files changed, 72 insertions, 14 deletions
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/"); |