summaryrefslogtreecommitdiff
path: root/Master/tlpkg/libexec/ctan2tds
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/libexec/ctan2tds')
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds53
1 files changed, 36 insertions, 17 deletions
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index 2678c331e5f..79c6840ff8f 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -892,6 +892,7 @@ chomp ($Build = `cd $Master/../Build/source && pwd`);
'latex2e-help-texinfo' => '&POSTlatex2ehelptexinfo',
'lithuanian' => '&POSTlithuanian',
'montex' => '&POSTmontex',
+ 'musixtex' => '&POSTmusixtex',
'pgf' => '&POSTpgf',
'prerex' => '&POSTprerex',
'pst-cox' => '&POSTpstcox',
@@ -1886,7 +1887,8 @@ $standardxmt='\.xmt';
# code to install under texmf*/.../scripts.
# if they should end up in $bindir too,
-# add to Build/source/texk/texlive/Makefile.in (and ChangeLog).
+# add to Build/source/texk/texlive/Makefile.in (and ChangeLog),
+# which the doscripts function does.
%specialscripts = (
'a2ping' => '\.pl$',
'accfonts' => 'mkt1font|vpl2',
@@ -1912,6 +1914,7 @@ $standardxmt='\.xmt';
'mathspic' => '^mathspic\.pl$',
'mkgrkindex' => 'mkgrkindex$',
'mkjobtexmf' => '\.pl$',
+ 'musixtex' => '\.lua$',
'pdfcrop' => '\.pl$',
'pdfjam' => 'pdf[^.]*$',
'perltex' => '\.pl$',
@@ -2046,7 +2049,7 @@ for (@ARGV) {
$package = pop (@x);
my $COOKED_PKG = "$COOKED_TOP/$package"; # output directory
- if ($package =~ /^(biber|bibexport|texdef|latexmk)$/) { # later anything with scripts
+ if ($specialscripts{$package}) {
$BUILDDEST = "$COOKED_PKG/Build/source";
$TOPDEST = "$COOKED_PKG/Master";
} else {
@@ -2137,7 +2140,7 @@ sub set_dir_defaults
sub xchdir {
my ($dir) = @_;
chdir ($dir) || die "chdir($dir) failed: $!";
- chomp (my $pwd = `pwd`);
+ my $pwd = getcwd ();
print "\t CHDIR $dir (now $pwd)\n";
}
@@ -2292,16 +2295,22 @@ sub setup
sub donormal {
my ($ctrl) = @_;
- print "doing donormal($ctrl)...\n";
+ print "doing donormal($ctrl) with DEST=$DEST\n";
# check for tds-ready packages
- if ( -e "$RAW_DIR/$packagedir/TDS_READY" ) {
+ if (-e "$RAW_DIR/$packagedir/TDS_READY") {
print "using TDS_READY tree\n";
&SYSTEM ("$RM $RAW_DIR/$packagedir/TDS_READY");
&SYSTEM ("mkdir -p $DEST");
&xchdir ($DEST);
&SYSTEM ("$CP -r $RAW_DIR/$packagedir/* .");
+ my $scriptdir = "$DEST/scripts/$package";
+ if (-d $scriptdir) {
+ &xchdir ($scriptdir);
+ &doscripts;
+ }
+
my @docdirs = glob ("doc/*/*/");
if ($moreclean{$package} && @docdirs) {
&xchdir ($docdirs[0]);
@@ -2523,10 +2532,13 @@ sub doscripts {
my $scriptpatt = $specialscripts{$package};
return unless $scriptpatt;
- &install ("$DEST/scripts/$package", $scriptpatt);
- &SYSTEM ("chmod a+x $DEST/scripts/$package/*");
+ my $pwd = getcwd();
+ if ($pwd ne "$DEST/scripts/$package") {
+ # in the .tds.zip case, we will already be in the scripts dir.
+ &install ("$DEST/scripts/$package", $scriptpatt);
+ &SYSTEM ("chmod a+x $DEST/scripts/$package/*");
+ }
- return unless $package =~ /^(bibexport|texdef|latexmk)$/; # xx testing for now
# update the copy in Build, too.
my $build_tldir = "texk/texlive";
my $build_scriptsdir = "$build_tldir/linked_scripts";
@@ -2615,7 +2627,7 @@ sub domans {
sub tl_man_to_pdf {
my $Master_man = "$Master/texmf/doc/man";
my $pkg_man = "$TOPDEST/texmf/doc/man";
- print "tl_man_to_pdf for " . join (" ", <$pkg_man/man1/*>) . "\n";
+ print "tl_man_to_pdf for: " . join (" ", <$pkg_man/man1/*>) . "\n";
&SYSTEM ("cd $Master_man && $CP --parents Makefile man1/Makefile $pkg_man/");
@@ -2719,8 +2731,7 @@ sub runjob
# glob function, seemed too ugly. And removing the file in a posthook
# would have meant a separate fn for README.TEXLIVE, also ugly.)
#
-sub killfiles
-{
+sub killfiles {
my ($killpatt,$more) = @_;
print "killfiles($killpatt,$more)\n";
@@ -2729,7 +2740,7 @@ sub killfiles
# cd to a leading directory name in KILLPATT.
my $origdir = "";
if ($killpatt =~ m,^(.*)/,,) {
- chomp ($origdir = `pwd`);
+ $origdir = getcwd ();
&xchdir ($1);
$killpatt =~ s,^$1/,,;
}
@@ -4404,24 +4415,32 @@ sub POSTlatexdiff {
}
sub POSTlatex2ehelptexinfo {
- print "\t SPECIAL $package remove translation subdir\n";
+ print "\t POST$package - remove translation subdir\n";
&SYSTEM ("$RM -rf spanish");
}
sub POSTlithuanian {
- print "\t SPECIAL $package remove old language support\n";
- #
+ print "\t POST$package - remove old language support\n";
# these files are no longer used in TL.
&SYSTEM ("$RM language.lt.dat $DEST/tex/latex/lithuanian/language.lt.def");
}
sub POSTmontex {
- print "\t SPECIAL $package avoid 00readme case clash\n";
- #
+ print "\t POST$package - avoid 00readme case clash\n";
# these files are no longer used in TL.
&SYSTEM ("$MV 00readme 00readme.mfinput.km");
}
+# post instead of specialman because we use the tds.zip, which has the
+# man pages in an unusual place.
+sub POSTmusixtex {
+ print "POST$package - cp man pages\n";
+ my $mydest = "$TOPDEST/texmf/doc/man/man1/";
+ &xmkdir ($mydest);
+ &SYSTEM ("$CP $DEST/scripts/$package/doc/*.1 $mydest/");
+ &tl_man_to_pdf ();
+}
+
sub POSTpgf {
print "POST$package - mv generic,latex,... directories\n";
&SYSTEM ("cd $DEST && mkdir tex && mv context generic latex plain tex");