summaryrefslogtreecommitdiff
path: root/Master/tlpkg/libexec/ctan2tds
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/libexec/ctan2tds')
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds133
1 files changed, 103 insertions, 30 deletions
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index 5089d3b0b40..0765de43f12 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -1714,6 +1714,7 @@ chomp (my $ctan_root = `tlpkginfo --ctan-root`);
'coloredbelts' => '&POST_onelevel',
'context' => '&POSTcontext',
'context-games' => '&POSTcontext_games',
+ 'context-legacy' => '&POSTcontext_legacy',
'coordsys' => '&POSTcoordsys',
'couleurs-fr' => '&POST_onelevel',
'create-theorem' => '&POST_onelevel',
@@ -6776,39 +6777,37 @@ sub POSTcmcyr {
&SYSTEM ("$MV $DEST/fonts/source/public/cmcyr/cmcsc{8,9,10}.mf .");
}
+
+# ConTeXt is complicated. Procedure for updating:
+# 1. c2a context # change code here as needed until good, then:
+# 1b. c2a context p # place new files in svn; don't commit yet.
+# 2. tl-update-bindir lmtx # update luametatex binaries;
+# # possibly no_lmtx_platforms in context.tlpsrc
+# # will need to be updated. Then commit:
+# 3. tlcom "context $version"
+# 4. tl-update-tlpdb -v # because we need to clean new context files for:
+# 5. c2a context-legacy # until good, then:
+# 6. c2a context-legacy p
+# 7. tlcom "context-legacy $version"
+# 8. if needed, update context-legacy by hand.
+#
sub POSTcontext {
- print "POST$package - rearrange, remove\n";
+ print "POST$package - remove context-legacy etc. files, rearrange for TL\n";
+ print "*** See POSTcontext in ctan2tds for ConTeXt update procedure.\n";
&xchdir ($DEST);
- # put files in context subdirs.
- &mv_with_mkdir ("colors/icc/context", "tex/context/colors/icc");
- &mv_with_mkdir ("README.adoc", "doc/context");
+ &context_common_removals ();
- # clean up files Hans wants in his distribution but are confusing or
- # problematic in TeX Live.
- &SYSTEM ("$RM -rf colors"); # nonfree
- &SYSTEM ("$RM -rf fonts/truetype/hoekwater/lm/");# lmtypewriter10-regular.ttf
- &SYSTEM ("$RM -rf fonts/data/tests/"); # texmfhome.otf
- &SYSTEM ("$RM -rf source"); # entire engine source
- &SYSTEM ("$RM -rf web2c/"); # context*cnf*, texlive*cnf.lua
- # nonfree (first two) and unused (jmn) fonts.
- &SYSTEM ("find -name \*koeiel\* -o -name \*lucida\* -o -name jmn"
- . "| xargs rm -rfv");
+ # remove the mkii files we put into context-legacy.
+ &remove_files_of_pkg ("context-legacy");
- # mkii removals
-# &SYSTEM ("$RM -rf doc/context/scripts/mkii/");
-# &SYSTEM ("$RM -rf fonts/enc/");
-# &SYSTEM ("$RM -rf fonts/map/");
-# &SYSTEM ("$RM -rf scripts/context/ruby/");
-# &SYSTEM ("$RM -rf scripts/context/stubs/");
-# &SYSTEM ("$RM -rf tex/context/*/mkii/"); # base, fonts, etc.
-# &SYSTEM ("$RM -rf metapost/context/base/mpii/");
-
- # mptopdf removals, since that is a separate package.
- print "still POST$package - removing mptopdf since separate package\n";
- chomp (my @mptopdf_files = `tlpfiles mptopdf | sed 's,[^/]*/,,'`);
- &SYSTEM ("$RM -f @mptopdf_files ");
- &SYSTEM ("$RM doc/context/scripts/mkii/mptopdf.man");
+ # remove mkii stuff that we omit from context-legacy, or may be new, etc.
+ &SYSTEM ("$RM -rf doc/context/scripts/mkii/");
+ &SYSTEM ("$RM -rf tex/context/*/mkii/"); # base, fonts, etc.
+
+ # move some files to context subdirs for tl.
+ &mv_with_mkdir ("colors/icc/context", "tex/context/colors/icc");
+ &mv_with_mkdir ("context-readme.txt", "doc/context");
print "still POST$package - copy user-level .lua to windows\n";
my $w_bindir = "$TOPDEST/bin/windows";
@@ -6823,7 +6822,7 @@ sub POSTcontext {
&SYSTEM ("$CP $luafile $w_bindir/");
&bindirs_symlink ($luafile, $luafile);
}
- # but i386-netbsd is not supported.
+ # but i386-netbsd is not supported in TL.
my $i386_netbsd_bindir = "$TOPDEST/bin/i386-netbsd";
&SYSTEM ("$RM $i386_netbsd_bindir/context.lua");
&SYSTEM ("$RM $i386_netbsd_bindir/mtxrun.lua");
@@ -6833,7 +6832,7 @@ sub POSTcontext {
my $mandest = "$TOPDEST/texmf-dist/doc/man/man1";
&xmkdir ($mandest);
for my $exec (@exec) {
- # we only want mkiv man pages
+ # we only keep mkiv man pages here, mkii in context-legacy.
my $mansrc = "mkiv/$exec.man";
&SYSTEM ("$CP $mansrc $mandest/$exec.1");
}
@@ -6852,6 +6851,80 @@ sub POSTcontext {
&POST_preserve_bin ("luametatex", "context", "mtxrun");
}
+sub POSTcontext_legacy {
+ print "POST$package - just keeping mkii\n";
+
+ &context_common_removals ();
+
+ # remove the mkiv and newer files we have in context.
+ # The context package should be committed first, and tlpdb updated,
+ # before committing context-legacy, so new files get removed here.
+ &remove_files_of_pkg ("context");
+
+ # files we move for context, hence must remove explicitly from
+ # original location in the zip.
+ &SYSTEM ("$RM -r colors/icc/context");
+ &SYSTEM ("$RM context-readme.txt");
+ &SYSTEM ("$RM doc/context/scripts/mkii/mptopdf.*");
+
+ print "still POST$package - user-level executable man pages\n";
+ # we only keep mkii man pages here, mkiv in context.
+ &xchdir ("$DEST/doc/context/scripts/mkii");
+ my $mandest = "$TOPDEST/texmf-dist/doc/man/man1";
+ &xmkdir ($mandest);
+ for my $exec ("texexec", "texmfstart") {
+ &SYSTEM ("$CP $exec.man $mandest/$exec.1");
+ }
+ &tl_man_to_pdf ();
+}
+
+
+# Some files we remove from both context and context-legacy.
+sub context_common_removals {
+ print "\t context_common_removals\n";
+ # mptopdf is its own package.
+ &remove_files_of_pkg ("mptopdf");
+
+ # remove files Hans wants in his distribution but are confusing or
+ # problematic in TeX Live.
+ &SYSTEM ("$RM -rf colors"); # nonfree
+ &SYSTEM ("$RM -rf fonts/truetype/hoekwater/lm/");# lmtypewriter10-regular.ttf
+ &SYSTEM ("$RM -rf fonts/data/tests/"); # texmfhome.otf
+ &SYSTEM ("$RM -rf scripts/context/stubs/"); # install/setup
+ &SYSTEM ("$RM -rf source"); # entire engine source
+ &SYSTEM ("$RM -rf web2c/"); # context*cnf*, texlive*cnf.lua
+
+ # nonfree (first two) and unused (jmn) fonts.
+ &SYSTEM ("find -name \*koeiel\* -o -name \*lucida\* -o -name jmn"
+ . "| xargs rm -rfv");
+ }
+
+# Remove all files from PKG (as reported by the tlpfiles script).
+# Used for ConTeXt.
+#
+sub remove_files_of_pkg {
+ my ($pkg) = @_;
+ print "\t RM files for package $pkg\n";
+
+ # find files for PKG.
+ chomp (my @files = `tlpfiles $pkg`);
+ die "no files for package $pkg?" if (! @files);
+
+ # files are given relative to the root, so cd there.
+ my $cwd = getcwd ();
+ &xchdir ($TOPDEST);
+ for my $f (@files) {
+ #print " $f";
+ # there are too many special cases even to warn.
+ unlink ($f) || print "remove_files_of_pkg: unlink($f) failed: $!";
+ }
+ print "\n";
+
+ # remove any now-empty directories and cd back.
+ $RMDIR_EMPTY;
+ &xchdir ($cwd);
+}
+
# Called for the ConTeXt scripts, though conceivably could be used for
# other things. Make a symlink in each Unix bindir (Windows is not
# handled here) to EXEC, assuming its location is relative to cwd.