texlive[51777] trunk: l3build (30jul19)

commits+karl at tug.org commits+karl at tug.org
Tue Jul 30 22:59:58 CEST 2019


Revision: 51777
          http://tug.org/svn/texlive?view=revision&revision=51777
Author:   karl
Date:     2019-07-30 22:59:58 +0200 (Tue, 30 Jul 2019)
Log Message:
-----------
l3build (30jul19)

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua
    trunk/Build/source/texk/texlive/linked_scripts/oberdiek/pdfatfi.pl
    trunk/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md
    trunk/Master/texmf-dist/doc/latex/l3build/README.md
    trunk/Master/texmf-dist/doc/latex/l3build/l3build.pdf
    trunk/Master/texmf-dist/doc/man/man1/l3build.1
    trunk/Master/texmf-dist/doc/man/man1/l3build.man1.pdf
    trunk/Master/texmf-dist/scripts/l3build/l3build-check.lua
    trunk/Master/texmf-dist/scripts/l3build/l3build-file-functions.lua
    trunk/Master/texmf-dist/scripts/l3build/l3build-install.lua
    trunk/Master/texmf-dist/scripts/l3build/l3build-variables.lua
    trunk/Master/texmf-dist/scripts/l3build/l3build.lua
    trunk/Master/texmf-dist/source/latex/l3build/l3build.dtx
    trunk/Master/texmf-dist/tex/latex/l3build/regression-test.tex

Modified: trunk/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua	2019-07-30 20:59:04 UTC (rev 51776)
+++ trunk/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua	2019-07-30 20:59:58 UTC (rev 51777)
@@ -25,7 +25,7 @@
 --]]
 
 -- Version information
-release_date = "2019-06-27"
+release_date = "2019-07-30"
 
 -- File operations are aided by the LuaFileSystem module
 local lfs = require("lfs")

Modified: trunk/Build/source/texk/texlive/linked_scripts/oberdiek/pdfatfi.pl
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/oberdiek/pdfatfi.pl	2019-07-30 20:59:04 UTC (rev 51776)
+++ trunk/Build/source/texk/texlive/linked_scripts/oberdiek/pdfatfi.pl	2019-07-30 20:59:58 UTC (rev 51777)
@@ -29,8 +29,8 @@
 my $prj         = 'pdfatfi';
 my $file        = "$prj.pl";
 my $program     = uc($&) if $file =~ /^\w+/;
-my $version     = "2.7";
-my $date        = "2016/05/16";
+my $version     = "2.9";
+my $date        = "2019/07/24";
 my $author      = "Heiko Oberdiek";
 my $copyright   = "Copyright (c) 2005-2010, 2012 by $author.";
 #
@@ -39,6 +39,7 @@
 #   2006/08/16 v2.2: Included in DTX file of attachfile2.dtx.
 #   2010/09/27 v2.6: Keys ModDateTZ and CreationDateTZ added.
 #   2016/05/16 v2.8: Option --version added.
+#   2019/07/24 v2.9: adapted version to attachfile2 version.
 #
 
 use POSIX qw(strftime); # %z is used (GNU)

Modified: trunk/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md	2019-07-30 20:59:04 UTC (rev 51776)
+++ trunk/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md	2019-07-30 20:59:58 UTC (rev 51777)
@@ -7,6 +7,16 @@
 
 ## [Unreleased]
 
+## [2019-07-30]
+
+### Added
+
+- Support for non-standard file layouts via `tdslocations` table
+
+### Changed
+
+- Only write (x)dvipdfmx specials for XeTeX and (u)pTeX (see #94)
+
 ## [2019-06-27]
 
 ### Changed
@@ -288,7 +298,8 @@
 - Rationalise short option names: removed `-d`, `-E`, `-r`
 - Target `cmdcheck`: specific to LaTeX3 kernel work
 
-[Unreleased]: https://github.com/latex3/l3build/compare/2019-06-27...HEAD
+[Unreleased]: https://github.com/latex3/l3build/compare/2019-07-30...HEAD
+[2019-07-30]: https://github.com/latex3/l3build/compare/2019-06-27...2019-07-30
 [2019-06-27]: https://github.com/latex3/l3build/compare/2019-06-26...2019-06-27
 [2019-06-26]: https://github.com/latex3/l3build/compare/2019-06-18...2019-06-26
 [2019-06-18]: https://github.com/latex3/l3build/compare/2019-02-10...2019-06-18

Modified: trunk/Master/texmf-dist/doc/latex/l3build/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/l3build/README.md	2019-07-30 20:59:04 UTC (rev 51776)
+++ trunk/Master/texmf-dist/doc/latex/l3build/README.md	2019-07-30 20:59:58 UTC (rev 51777)
@@ -1,7 +1,7 @@
 l3build: a testing and building system for LaTeX3
 =================================================
 
-Release 2019-06-27
+Release 2019-07-30
 
 Overview
 --------

Modified: trunk/Master/texmf-dist/doc/latex/l3build/l3build.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/man/man1/l3build.1
===================================================================
--- trunk/Master/texmf-dist/doc/man/man1/l3build.1	2019-07-30 20:59:04 UTC (rev 51776)
+++ trunk/Master/texmf-dist/doc/man/man1/l3build.1	2019-07-30 20:59:58 UTC (rev 51777)
@@ -1,4 +1,4 @@
-.TH l3build 1 "2019-06-27"
+.TH l3build 1 "2019-07-30"
 .SH NAME
 l3build \- Checking and building packages
 .SH SYNOPSIS

Modified: trunk/Master/texmf-dist/doc/man/man1/l3build.man1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/scripts/l3build/l3build-check.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/l3build/l3build-check.lua	2019-07-30 20:59:04 UTC (rev 51776)
+++ trunk/Master/texmf-dist/scripts/l3build/l3build-check.lua	2019-07-30 20:59:58 UTC (rev 51777)
@@ -772,7 +772,10 @@
            ext ~= tlgext and
            ext ~= lveext and
            ext ~= logext then
-           ren(testdir, file, gsub(file, "(%.[^.]+)$", "." .. engine .. "%1"))
+           local newname = gsub(file,"(%.[^.]+)$","." .. engine .. "%1")
+           if not fileexists(testdir,newname) then
+             ren(testdir,file,newname)
+           end
         end
       end
     end

Modified: trunk/Master/texmf-dist/scripts/l3build/l3build-file-functions.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/l3build/l3build-file-functions.lua	2019-07-30 20:59:04 UTC (rev 51776)
+++ trunk/Master/texmf-dist/scripts/l3build/l3build-file-functions.lua	2019-07-30 20:59:58 UTC (rev 51777)
@@ -1,6 +1,6 @@
 --[[
 
-File l3build-file-functions.lua Copyright (C) 2018 The LaTeX3 Project
+File l3build-file-functions.lua Copyright (C) 2018,2019 The LaTeX3 Project
 
 It may be distributed and/or modified under the conditions of the
 LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -80,7 +80,7 @@
   (end license)
 
 --]]
-local function glob_to_pattern(glob)
+function glob_to_pattern(glob)
 
   local pattern = "^" -- pattern being built
   local i = 0 -- index in glob

Modified: trunk/Master/texmf-dist/scripts/l3build/l3build-install.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/l3build/l3build-install.lua	2019-07-30 20:59:04 UTC (rev 51776)
+++ trunk/Master/texmf-dist/scripts/l3build/l3build-install.lua	2019-07-30 20:59:58 UTC (rev 51777)
@@ -1,6 +1,6 @@
 --[[
 
-File l3build-install.lua Copyright (C) 2018 The LaTeX3 Project
+File l3build-install.lua Copyright (C) 2018,2019 The LaTeX3 Project
 
 It may be distributed and/or modified under the conditions of the
 LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -22,8 +22,9 @@
 
 --]]
 
-local pairs = pairs
-local print = print
+local ipairs = ipairs
+local pairs  = pairs
+local print  = print
 
 local set_program = kpse.set_program_name
 local var_value   = kpse.var_value
@@ -40,9 +41,7 @@
 end
 
 function uninstall()
-  local function uninstall_files(dir,subdir)
-    subdir = subdir or moduledir
-    dir = dir .. "/" .. subdir
+  local function zapdir(dir)
     local installdir = gethome() .. "/" .. dir
     if options["dry-run"] then
       local files = filelist(installdir)
@@ -60,6 +59,11 @@
     end
     return 0
   end
+  local function uninstall_files(dir,subdir)
+    subdir = subdir or moduledir
+    dir = dir .. "/" .. subdir
+    return zapdir(dir)
+  end
   local errorlevel = 0
   -- Any script man files need special handling
   local manfiles = { }
@@ -83,7 +87,7 @@
       print("- " .. v)
     end
   end
-  return   uninstall_files("doc")
+  errorlevel = uninstall_files("doc")
          + uninstall_files("source")
          + uninstall_files("tex")
          + uninstall_files("bibtex/bst",module)
@@ -90,6 +94,14 @@
          + uninstall_files("makeindex",module)
          + uninstall_files("scripts",module)
          + errorlevel
+  if errorlevel ~= 0 then return errorlevel end
+  -- Finally, clean up special locations
+  for _,location in ipairs(tdslocations) do
+    local path,glob = splitpath(location)
+    errorlevel = zapdir(path)
+    if errorlevel ~= 0 then return errorlevel end
+  end
+  return 0
 end
 
 function install_files(target,full,dry_run)
@@ -103,28 +115,47 @@
     end
     dir = dir .. (subdir and ("/" .. subdir) or "")
     local filenames = { }
+    local paths = { }
+    -- Generate a file list and include the directory
     for _,glob_table in pairs(files) do
       for _,glob in pairs(glob_table) do
         for file,_ in pairs(tree(source,glob)) do
-          insert(filenames,file)
+          -- Just want the name
+          local file = gsub(file,"^%./","")
+          local matched = false
+          for _,location in ipairs(tdslocations) do
+            local path,glob = splitpath(location)
+            local pattern = glob_to_pattern(glob)
+            if match(file,pattern) then
+              insert(paths,path)
+              insert(filenames,path .. "/" .. file)
+              matched = true
+              break
+            end
+          end
+          if not matched then
+            insert(paths,dir)
+            insert(filenames,dir .. "/" .. file)
+          end
         end
       end
     end
+
     local errorlevel = 0
     -- The target is only created if there are actual files to install
     if next(filenames) then
-      local installdir = target .. "/" .. dir
-      if dry_run then
-        print("\n" .. "For installation in " .. installdir .. ":")
-      else
-        errorlevel = cleandir(installdir)
-        if errorlevel ~= 0 then return errorlevel end
+      if not dry_run then
+        for _,path in pairs(paths) do
+          errorlevel = cleandir(target .. "/" .. path)
+          if errorlevel ~= 0 then return errorlevel end
+        end
       end
       for _,file in ipairs(filenames) do
         if dry_run then
-          print("- " .. select(2,splitpath(file)))
+          print("- " .. file)
         else
-          errorlevel = cp(file,source,installdir)
+          local path,file = splitpath(file)
+          errorlevel = cp(file,source,target .. "/" .. path)
           if errorlevel ~= 0 then return errorlevel end
         end
       end
@@ -180,6 +211,10 @@
     typesetlist = excludelist(docfiledir,typesetfiles,{sourcefiles})
     sourcelist = excludelist(sourcefiledir,sourcefiles,
       {bstfiles,installfiles,makeindexfiles,scriptfiles})
+ 
+  if dry_run then
+    print("\nFor installation inside " .. target .. ":")
+  end 
     
     errorlevel = install_files(sourcefiledir,"source",{sourcelist})
       + install_files(docfiledir,"doc",
@@ -212,9 +247,8 @@
       end
     end
     if next(manfiles) then
-      print("\n" .. "For installation in " .. target .. "/doc/man:")
       for _,v in ipairs(manfiles) do
-        print("- " .. v)
+        print("- doc/man/" .. v)
       end
     end
   end

Modified: trunk/Master/texmf-dist/scripts/l3build/l3build-variables.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/l3build/l3build-variables.lua	2019-07-30 20:59:04 UTC (rev 51776)
+++ trunk/Master/texmf-dist/scripts/l3build/l3build-variables.lua	2019-07-30 20:59:58 UTC (rev 51777)
@@ -1,6 +1,6 @@
 --[[
 
-File l3build-variables.lua Copyright (C) 2018 The LaTeX3 Project
+File l3build-variables.lua Copyright (C) 2018,2019 The LaTeX3 Project
 
 It may be distributed and/or modified under the conditions of the
 LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -197,6 +197,9 @@
 -- Manifest options
 manifestfile = manifestfile or "MANIFEST.md"
 
+-- Non-standard installation locations
+tdslocations = tdslocations or { }
+
 -- Upload settings
 curlexe  = curlexe  or "curl"
 uploadconfig = uploadconfig or {}

Modified: trunk/Master/texmf-dist/scripts/l3build/l3build.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/l3build/l3build.lua	2019-07-30 20:59:04 UTC (rev 51776)
+++ trunk/Master/texmf-dist/scripts/l3build/l3build.lua	2019-07-30 20:59:58 UTC (rev 51777)
@@ -25,7 +25,7 @@
 --]]
 
 -- Version information
-release_date = "2019-06-27"
+release_date = "2019-07-30"
 
 -- File operations are aided by the LuaFileSystem module
 local lfs = require("lfs")

Modified: trunk/Master/texmf-dist/source/latex/l3build/l3build.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/l3build/l3build.dtx	2019-07-30 20:59:04 UTC (rev 51776)
+++ trunk/Master/texmf-dist/source/latex/l3build/l3build.dtx	2019-07-30 20:59:58 UTC (rev 51777)
@@ -153,6 +153,8 @@
 \luavarset{recordstatus}{false}       {Switch to include error level from test runs in \texttt{.tlg} files}
 \luavarset{manifestfile}        {"MANIFEST.md"} {Filename to use for the manifest file}
 \luavarseparator
+\luavarset{tdslocations}{\{ \}}{Map for non-standard file installations}
+\luavarseparator
 \luavarset{uploadconfig}        {\meta{table}} {Metadata to describe the package for CTAN (see Table~\ref{tab:upload-setup})}
 \luavarset{uploadconfig.pkg}{ctanpkg}{Name of the CTAN package}
 \luavarseparator
@@ -227,7 +229,7 @@
 %    }^^A
 % }
 %
-% \date{Released 2019-06-27}
+% \date{Released 2019-07-30}
 %
 % \maketitle
 % \tableofcontents
@@ -1214,6 +1216,47 @@
 %
 % \section{Release-focussed features}
 %
+% \subsection{Installation structure}
+%
+% With the standard settings, \pkg{l3build} will install files within
+% the \TeX{} directory structure (TDS) as follows
+% \begin{itemize}
+%   \item \var{installfiles} within a \texttt{\meta{bundle}/\meta{module}}
+%     (or \texttt{\meta{module}}) directory inside \texttt{tex/\meta{format}}
+%   \item \var{sourcefiles} within a \texttt{\meta{bundle}/\meta{module}}
+%     (or \texttt{\meta{module}}) directory inside \texttt{source/\meta{format}}
+%   \item Typeset PDFs within a \texttt{\meta{bundle}/\meta{module}}
+%     (or \texttt{\meta{module}}) directory inside \texttt{doc/\meta{format}}
+%   \item \var{bstfiles} within a \texttt{\meta{bundle}/\meta{module}}
+%     (or \texttt{\meta{module}}) directory inside \texttt{bibtex/bst}
+%   \item \var{bibfiles} within a \texttt{\meta{bundle}/\meta{module}}
+%     (or \texttt{\meta{module}}) directory inside \texttt{bibtex/bib}
+%   \item \var{makeindexfiles} within a \texttt{\meta{bundle}/\meta{module}}
+%     (or \texttt{\meta{module}}) directory inside \texttt{makeindex}
+% \end{itemize}
+%
+% For more complex set ups, this can be customised using the
+% \luavar{tdslocations} table. Each entry there should be a glob specifying the
+% TDS position of a file or files. Any files not specified in the table
+% will use the standard locations above. For example, to place some files
+% in the generic tree, some in the plain \TeX{} tree and some in the \LaTeX{}
+% tree, one might use the set up shown in Figure~\ref{fig:tds}.
+% \begin{figure}
+%   \begin{lstlisting}[frame=single,language={[5.2]Lua},gobble = 6]
+%     tdslocations = 
+%       {
+%         "tex/generic/mypkg/*.generic.tex" ,
+%         "tex/plain/mypkg/*.plain.tex"    ,
+%         "tex/latex/mypkg/*.latex.tex"
+%       }
+%   \end{lstlisting}
+%   \caption{Example \texttt{tdslocations} table.}
+%   \label{fig:tds}
+% \end{figure}
+%
+% The table is read in order, and thus specific file names should come before
+% potential wild-card matches.
+%
 % \subsection{Automatic tagging}
 % \label{sec:tagging}
 %
@@ -1580,6 +1623,13 @@
 %   all files in the \meta{path}.
 % \end{function}
 %
+% \begin{function}{glob_to_pattern()}
+%   \begin{syntax}
+%     |glob_to_pattern(|\meta{glob}|)|
+%   \end{syntax}
+%   Returns the \meta{glob} converted to a Lua pattern.
+% \end{function}
+%
 % \begin{function}{jobname()}
 %   \begin{syntax}
 %     |jobname(|\meta{file}|)|
@@ -2246,15 +2296,20 @@
       \relax
   \fi
 \else
-  \special{%
-    pdf: docinfo
-      <<
-        /Creator        (TeX)
-        /CreationDate   ()
-        /ModDate        ()
-        /Producer       (\ifx\XeTeXversion\@undefined\else x\fi dvipdfmx)
-      >>
-  }
+  \ifnum 0%
+  \ifx\XeTeXversion\@undefined\else 1\fi
+  \ifx\kanjiskip\@undefined\else 1\fi
+  >0 %
+    \special{%
+      pdf: docinfo
+        <<
+          /Creator        (TeX)
+          /CreationDate   ()
+          /ModDate        ()
+          /Producer       (\ifx\XeTeXversion\@undefined\else x\fi dvipdfmx)
+        >>
+    }
+  \fi
 \fi
 %    \end{macrocode}
 %
@@ -2272,8 +2327,13 @@
     \pdfvariable objcompresslevel=0 %
   \fi
 \else
-  \special{dvipdfmx:config z 0}% Compress level
-  \special{dvipdfmx:config C 0x40}% Object compression
+  \ifnum 0%
+  \ifx\XeTeXversion\@undefined\else 1\fi
+  \ifx\kanjiskip\@undefined\else 1\fi
+  >0 %
+    \special{dvipdfmx:config z 0}% Compress level
+    \special{dvipdfmx:config C 0x40}% Object compression
+  \fi
 \fi
 %    \end{macrocode}
 %

Modified: trunk/Master/texmf-dist/tex/latex/l3build/regression-test.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/l3build/regression-test.tex	2019-07-30 20:59:04 UTC (rev 51776)
+++ trunk/Master/texmf-dist/tex/latex/l3build/regression-test.tex	2019-07-30 20:59:58 UTC (rev 51777)
@@ -186,15 +186,20 @@
       \relax
   \fi
 \else
-  \special{%
-    pdf: docinfo
-      <<
-        /Creator        (TeX)
-        /CreationDate   ()
-        /ModDate        ()
-        /Producer       (\ifx\XeTeXversion\@undefined\else x\fi dvipdfmx)
-      >>
-  }
+  \ifnum 0%
+  \ifx\XeTeXversion\@undefined\else 1\fi
+  \ifx\kanjiskip\@undefined\else 1\fi
+  >0 %
+    \special{%
+      pdf: docinfo
+        <<
+          /Creator        (TeX)
+          /CreationDate   ()
+          /ModDate        ()
+          /Producer       (\ifx\XeTeXversion\@undefined\else x\fi dvipdfmx)
+        >>
+    }
+  \fi
 \fi
 \ifnum 0%
   \ifx\pdfoutput\@undefined\else\ifnum\pdfoutput>0 1\fi\fi
@@ -208,8 +213,13 @@
     \pdfvariable objcompresslevel=0 %
   \fi
 \else
-  \special{dvipdfmx:config z 0}% Compress level
-  \special{dvipdfmx:config C 0x40}% Object compression
+  \ifnum 0%
+  \ifx\XeTeXversion\@undefined\else 1\fi
+  \ifx\kanjiskip\@undefined\else 1\fi
+  >0 %
+    \special{dvipdfmx:config z 0}% Compress level
+    \special{dvipdfmx:config C 0x40}% Object compression
+  \fi
 \fi
 \reset at catcodes
 %% 



More information about the tex-live-commits mailing list