texlive[70188] Master: infrastructure changes for making the context

commits+karl at tug.org commits+karl at tug.org
Tue Feb 27 17:39:22 CET 2024


Revision: 70188
          https://tug.org/svn/texlive?view=revision&revision=70188
Author:   karl
Date:     2024-02-27 17:39:22 +0100 (Tue, 27 Feb 2024)
Log Message:
-----------
infrastructure changes for making the context 2024 update

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/man/man1/Makefile
    trunk/Master/tlpkg/bin/c2l
    trunk/Master/tlpkg/bin/ctan2tl
    trunk/Master/tlpkg/bin/tlpkginfo
    trunk/Master/tlpkg/libexec/ctan2tds
    trunk/Master/tlpkg/tlpsrc/context-legacy.tlpsrc
    trunk/Master/tlpkg/tlpsrc/context-texlive.tlpsrc
    trunk/Master/tlpkg/tlpsrc/context.tlpsrc

Added Paths:
-----------
    trunk/Master/tlpkg/bin/tlcom

Modified: trunk/Master/texmf-dist/doc/man/man1/Makefile
===================================================================
--- trunk/Master/texmf-dist/doc/man/man1/Makefile	2024-02-27 13:46:10 UTC (rev 70187)
+++ trunk/Master/texmf-dist/doc/man/man1/Makefile	2024-02-27 16:39:22 UTC (rev 70188)
@@ -18,8 +18,9 @@
 	@echo 'Removing pdf files.'
 	rm -f -- $(PDF)
 
-#%.man1.pdf: %.1
-#	$(MKPDF)
+# This is used for the context mtx-* man pages.
+%.man1.pdf: %.1
+	$(MKPDF)
 
 # mendex.1 and upmendex.1 contain multi-byte characters;
 # leave it for Japanese maintainers.

Modified: trunk/Master/tlpkg/bin/c2l
===================================================================
--- trunk/Master/tlpkg/bin/c2l	2024-02-27 13:46:10 UTC (rev 70187)
+++ trunk/Master/tlpkg/bin/c2l	2024-02-27 16:39:22 UTC (rev 70188)
@@ -74,9 +74,9 @@
                   amd64-freebsd
                   i386-freebsd i386-linux i386-solaris
                   x86_64-linux x86_64-linuxmusl x86_64-solaris)) {
-      system ("$0 $p") && die "norbert/$p failed";
+      system ("$0 $p") && die "github/$p failed";
     }
-    print "$0: norbert updates done.\n";
+    print "$0: gh (github/norbert) update done.\n";
     exit 0;
   
   } elsif ($arg eq "cg" || $arg eq "moj" || $arg eq "mojca") {
@@ -84,18 +84,22 @@
                  )) {
       system ("$0 $p") && die "cg/$p failed";
     }
-    print "$0: cg (contextgarden) updates done.\n";
+    print "$0: cg (contextgarden/mojca) updates done.\n";
     exit 0;
 
   } elsif ($arg eq "all") {
-    for my $p (qw(aarch dar cg norbert)) {
+    for my $p (qw(dar cg norbert)) {
       system ("$0 $p") && die "all/$p failed";
     }
     print "$0: all updates done.\n";
     exit 0;
+
+  } elsif ($arg =~ /^(lmtx|luametatex)$/) {
+    print ("tl-update-bindir $arg\n");
+    exec ("tl-update-bindir", $arg);
   }
   
-  if (-d "$TLROOT/Master/bin/$arg") {
+  if (-d "$TLROOT/Master/bin/$arg") { # platform name
     print ("tl-update-bindir $arg\n");
     exec ("tl-update-bindir", $arg);
   }

Modified: trunk/Master/tlpkg/bin/ctan2tl
===================================================================
--- trunk/Master/tlpkg/bin/ctan2tl	2024-02-27 13:46:10 UTC (rev 70187)
+++ trunk/Master/tlpkg/bin/ctan2tl	2024-02-27 16:39:22 UTC (rev 70188)
@@ -9,6 +9,9 @@
 LC_ALL=C; export LC_ALL # avoid problems with diff, comm, etc
 umask 022
 
+# to avoid the svn hit on every run when developing.
+TLPKGINFO_CATALOGUE_NO_UPDATE=1; export TLPKGINFO_CATALOGUE_NO_UPDATE
+
 mydir=`cd \`dirname $0\` && pwd`	# Master/tlpkg/bin
 libexec=`cd $mydir/../libexec && pwd`	# Master/tlpkg/libexec
 PATH=$mydir:$libexec:$PATH  # we call lots of our other tools

Added: trunk/Master/tlpkg/bin/tlcom
===================================================================
--- trunk/Master/tlpkg/bin/tlcom	                        (rev 0)
+++ trunk/Master/tlpkg/bin/tlcom	2024-02-27 16:39:22 UTC (rev 70188)
@@ -0,0 +1,29 @@
+#!/bin/sh
+# $Id$
+# Commit after TL package update. We rely on PATH to deal with trunk vs.
+# branch. (See c2a and c2b.)
+
+test $# -eq 0 && cd /
+/bin/pwd >/dev/null || exit 1
+
+msg=`echo "$1" | sed "s/^-m//"`
+shift
+
+dirlist=${TMPDIR-/tmp}/`id -u`.tlplace.dirs
+tlroot=`tail -n 1 $dirlist | sed 's,/Master.*,,'`
+if test ! -d "$tlroot/Master"; then
+  echo "$0: failed to get tlroot from $dirlist: $tlroot" >&2
+  exit 1
+fi
+echo "$tlroot"
+sleep 1
+
+svn commit -m"$msg" `cat $dirlist` \
+  "$tlroot"/Master/tlpkg/bin/tlpkg-ctan-check \
+  "$tlroot"/Master/tlpkg/bin/tlpkginfo \
+  "$tlroot"/Master/tlpkg/libexec/ctan2tds \
+  "$tlroot"/Master/tlpkg/bin/ctan2tl \
+  "$tlroot"/Master/tlpkg/bin/c2lx \
+  "$tlroot"/Master/tlpkg/tlpsrc/ \
+  "$tlroot"/TODO \
+  "$@"


Property changes on: trunk/Master/tlpkg/bin/tlcom
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkginfo
===================================================================
--- trunk/Master/tlpkg/bin/tlpkginfo	2024-02-27 13:46:10 UTC (rev 70187)
+++ trunk/Master/tlpkg/bin/tlpkginfo	2024-02-27 16:39:22 UTC (rev 70188)
@@ -240,6 +240,11 @@
     # not in Catalogue as yet, 27apr16.
     $ctan_dir = "macros/cstex/base";
     
+  } elsif ($pkgname eq "context-legacy") {
+    # We use the same mirrored .zip for context and context-legacy,
+    # so the value here is irrelevant. Just avoid the warning below.
+    $ctan_dir = "/nonesuch";
+
   } elsif ($pkgname eq "cs") {
     # For cs, we need to unpack from multiple tarballs,
     # so copy the entire cstex directory.
@@ -422,7 +427,7 @@
   
 #warn "prepare: initial tds_path for $pkg = $tds_path\n";
   # various exceptions to tds.zip location ...
-  if ($pkg eq "context") {
+  if ($pkg =~ /^context(-legacy)?$/) {
     $tds_path = "/home/ftp/mirror/www.pragma-ade.nl/context/latest/cont-tmf.zip";
 
   } elsif ($pkg eq "cmexb") {

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2024-02-27 13:46:10 UTC (rev 70187)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2024-02-27 16:39:22 UTC (rev 70188)
@@ -1714,6 +1714,7 @@
  '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 @@
   &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/");
+  # 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.
 
-  # 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"); 
+  # 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 @@
     &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 @@
   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 @@
   &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.

Modified: trunk/Master/tlpkg/tlpsrc/context-legacy.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/context-legacy.tlpsrc	2024-02-27 13:46:10 UTC (rev 70187)
+++ trunk/Master/tlpkg/tlpsrc/context-legacy.tlpsrc	2024-02-27 16:39:22 UTC (rev 70188)
@@ -1,3 +1,8 @@
+shortdesc The ConTeXt macro package, MkII
+longdesc In TeX Live, ConTeXt MkII is split from current ConTeXt (MkIV
+longdesc and newer.) See https://contextgarden.net and
+longdesc https://pragma-ade.com for information about ConTeXt.
+
 depend context
 depend metapost
 depend pdftex
@@ -22,12 +27,12 @@
 
 docpattern d texmf-dist/doc/context/scripts/mkii
 docpattern f texmf-dist/doc/man/man1/texmfstart.*
+docpattern f texmf-dist/doc/man/man1/texexec.*
 
 runpattern d texmf-dist/bibtex/bst/context/mkii
 runpattern d texmf-dist/context/data/texfont
 runpattern d texmf-dist/metapost/context/base/mpii
 runpattern d texmf-dist/scripts/context/ruby
-runpattern d texmf-dist/scripts/context/stubs
 runpattern d texmf-dist/tex/context/base/mkii
 runpattern d texmf-dist/tex/context/bib
 runpattern d texmf-dist/tex/context/fonts/mkii

Modified: trunk/Master/tlpkg/tlpsrc/context-texlive.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/context-texlive.tlpsrc	2024-02-27 13:46:10 UTC (rev 70187)
+++ trunk/Master/tlpkg/tlpsrc/context-texlive.tlpsrc	2024-02-27 16:39:22 UTC (rev 70188)
@@ -1,3 +1,16 @@
 shortdesc TeX Live-specific helpers for ConTeXt (caches, papersize)
-longdesc The code is in the directory texmf-dist/tex/context/texlive.
+longdesc The files are in the directory texmf-dist/tex/context/texlive.
 runpattern d texmf-dist/tex/context/texlive
+
+# these point to stubs, which were handwritten by us, hence include both
+# the stubs (under the dir above) and the executable links here.
+binpattern f bin/${ARCH}/contextjit
+binpattern f bin/${ARCH}/luatools
+binpattern f bin/${ARCH}/mtxrunjit
+
+# The luatools man page, on the other hand, is part of the original
+# context distribution, so include it in the context package.
+#docpattern +f texmf-dist/doc/man/man1/luatools.*
+# these don't exist.
+#docpattern +f texmf-dist/doc/man/man1/contextjit.*
+#docpattern +f texmf-dist/doc/man/man1/mtxrunjit.*

Modified: trunk/Master/tlpkg/tlpsrc/context.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/context.tlpsrc	2024-02-27 13:46:10 UTC (rev 70187)
+++ trunk/Master/tlpkg/tlpsrc/context.tlpsrc	2024-02-27 16:39:22 UTC (rev 70188)
@@ -10,6 +10,7 @@
 depend lm
 depend lm-math
 depend amsfonts
+depend context-companion-fonts
 depend manfnt-font
 depend mflogo-font
 depend stmaryrd
@@ -29,15 +30,14 @@
 
 ##### end of postprocessing specs
 
-# autopatterns do not seem to work right, so, explicitly:
+# 
 list everything explicitly, to avoid clashes with context-legacy.
 runpattern d texmf-dist/context
 runpattern +!d texmf-dist/context/data/texfont
-docpattern d texmf-dist/doc/context
-docpattern +!d texmf-dist/doc/context/scripts/mkii
 runpattern d texmf-dist/fonts/afm/hoekwater/context
 runpattern d texmf-dist/fonts/cid/fontforge
 runpattern d texmf-dist/fonts/enc/dvips/context
 runpattern d texmf-dist/fonts/map/dvips/context
+runpattern d texmf-dist/fonts/map/luatex/context
 runpattern d texmf-dist/fonts/map/pdftex/context
 runpattern d texmf-dist/fonts/misc/xetex/fontmapping/context
 runpattern d texmf-dist/fonts/tfm/hoekwater/context
@@ -45,7 +45,6 @@
 runpattern d texmf-dist/metapost/context
 runpattern +!d texmf-dist/metapost/context/base/mpii
 runpattern d texmf-dist/scripts/context
-runpattern +!d texmf-dist/scripts/context/stubs
 runpattern +!d texmf-dist/scripts/context/ruby
 runpattern d texmf-dist/tex/context
 runpattern +!d texmf-dist/tex/context/base/mkii
@@ -76,9 +75,12 @@
 # The whole sample/ directory should not be in the runtime, being
 # full of random and short filenames, but live with it until complaints.
 
+# context doc tree.
+docpattern d texmf-dist/doc/context
+docpattern +!d texmf-dist/doc/context/scripts/mkii
+
 # context man pages where man expects them
 docpattern +f texmf-dist/doc/man/man1/context.*
-docpattern +f texmf-dist/doc/man/man1/luatools.*
 docpattern +f texmf-dist/doc/man/man1/mtx-*
 docpattern +f texmf-dist/doc/man/man1/mtxrun.*
 
@@ -90,10 +92,7 @@
   i386-netbsd
 #
 binpattern f/!${no_lmtx_platforms} bin/${ARCH}/context
-binpattern f/!${no_lmtx_platforms} bin/${ARCH}/contextjit
 binpattern f/!${no_lmtx_platforms} bin/${ARCH}/context.lua
 binpattern f/!${no_lmtx_platforms} bin/${ARCH}/luametatex
-binpattern f/!${no_lmtx_platforms} bin/${ARCH}/luatools
 binpattern f/!${no_lmtx_platforms} bin/${ARCH}/mtxrun
-binpattern f/!${no_lmtx_platforms} bin/${ARCH}/mtxrunjit
 binpattern f/!${no_lmtx_platforms} bin/${ARCH}/mtxrun.lua



More information about the tex-live-commits mailing list.