diff options
Diffstat (limited to 'Master/tlpkg/libexec')
-rwxr-xr-x | Master/tlpkg/libexec/ctan2tds | 65 |
1 files changed, 47 insertions, 18 deletions
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index 07db9169098..80e38268928 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -757,7 +757,7 @@ $Master = "$mydir/../.."; 'xecyr', "&MAKEcopy", 'xelibertine', "die 'skipping, replaced by libertine'", 'xetex-pstricks',"&MAKEcopy", - 'xfrac', "die 'skipping, use mh (I guess)'", + 'xfrac', "die 'skipping, use mh (I think)'", 'xinitials', "die 'skipping, will be in xpackages when ready (Morten says)'", 'xits', "&MAKEflatten", 'xkeyval', "&MAKExkeyval", @@ -793,6 +793,7 @@ $Master = "$mydir/../.."; 'amstex' => '&POSTamstex', 'apalike' => '&POSTapalike', 'babelbib' => '&POSTbabelbib', + 'bibtex' => '&POSTbibtex', 'context-games' => '&POSTcontext_games', 'coordsys' => '&POSTcoordsys', 'ctex' => '&POSTctex', @@ -846,6 +847,7 @@ $standarddest = "texmf-dist"; 'arrayjob', 'generic', 'barr', 'generic', 'bghyphen', 'generic', + 'bibtex', 'generic', 'circ', 'latex', 'cirth', 'generic', 'dehyph-exptl','generic', @@ -931,6 +933,7 @@ $standardtex='\.(.bx|cfg|sty|clo|ldf|cls|def|fd|cmap|4ht)$'; 'bbold', 'bbold.sty|\.fd', # no fonttabl.sty 'bclogo', 'bc[^l].*\.(tex|pdf|eps)|bclogo\.sty', 'bghyphen', '\.tex', + 'bibtex', 'apalike\..*|' . $standardtex, 'bidi', '^bidi\.tex|' . $standardtex, 'blockdraw_mp','NULL', # skip .sty's 'breqn', '\.sty|\.sym', @@ -1621,6 +1624,7 @@ $standardbib = 'NULL'; # almost all bib files are for the doc %specialbib= ( 'IEEEtran' => '\.bib$', 'amsrefs' => 'ams.*bib', # not jr.bib + 'bibtex' => 'xampl\.bib$', 'computational-complexity' => '\.bib$', ); @@ -1947,7 +1951,11 @@ sub set_dir_defaults my ($ctan_dir) = @_; my $guess = ""; - if ($ctan_dir =~ m!/tex-archive/fonts/!) { + if ($ctan_dir =~ m!/tex-archive/biblio/bibtex!) { + $standarddocfmt = $standardsourcefmt = "bibtex"; + $guess = "$standarddocfmt for docfmt/srcfmt"; + + } elsif ($ctan_dir =~ m!/tex-archive/fonts/!) { $standarddocfmt = $standardsourcefmt = "fonts"; $guess = "$standarddocfmt for docfmt/srcfmt"; @@ -1986,21 +1994,44 @@ sub set_dir_defaults -sub xchdir -{ +sub xchdir { my ($dir) = @_; chdir ($dir) || die "chdir($dir) failed: $!"; chomp (my $pwd = `pwd`); print "\t CHDIR $dir (now $pwd)\n"; } -sub xmkdir -{ +sub xmkdir { my (@dirs) = @_; &SYSTEM ("mkdir -p @dirs"); } +# run a shell command. +# +sub SYSTEM { + my ($job) = @_; + if ($opt_test) { + print "\t SYSTEM $job\n"; + } else { + print "\t SYSTEM $job\n" if $opt_debug; + system ($job); + } +} + + +# copy man pages from runtime to new stage directory, +# so they won't appear to be deleted. +# +sub preserve_man_pages { + my ($pkg) = @_; + + my $mandest = "$TOPDEST/texmf/doc/man/man1"; + &xmkdir ($mandest); + &SYSTEM ("$CP $Master/texmf/doc/man/man1/$pkg.* $mandest/"); +} + + # some packages need to intervene at the beginning. sub run_prehook @@ -2602,18 +2633,6 @@ sub runfonts { } -sub SYSTEM -{ - local ($job) = @_; - if ($opt_test) { - print "\t SYSTEM $job\n"; - } else { - print "\t SYSTEM $job\n" if $opt_debug; - system($job); - } -} - - sub MAKEflatten { @@ -3981,6 +4000,15 @@ sub POSTbabelbib { &SYSTEM ("cd $DEST && $MV texmf/* . && rmdir texmf"); } +sub POSTbibtex { + print "POST$package - switch to base/\n"; + &SYSTEM ("cd $DEST && $MV bibtex/bst/bibtex bibtex/bst/base"); + &SYSTEM ("cd $DEST && $MV bibtex/bib/bibtex bibtex/bib/base"); + &SYSTEM ("cd $DEST && $MV doc/bibtex/bibtex doc/bibtex/base"); + &SYSTEM ("$RM bibtex.web"); # handle separately + &preserve_man_pages ("bibtex"); +} + sub POSTcontext_games { print "POST$package - remove duplicated fonts\n"; &SYSTEM ("$RM -rf fonts"); @@ -4245,6 +4273,7 @@ sub POSTzhspacing { &SYSTEM ("$MV doc/* .; rmdir doc"); } + # Allow overrides. In particular, CTAN can change some hashes to make # packages with licenses that TL doesn't allow. |