summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-07-30 20:59:58 +0000
committerKarl Berry <karl@freefriends.org>2019-07-30 20:59:58 +0000
commit5e541c41c7d9b017d0dfebb337f79da3a69e5251 (patch)
treebd69c8939d2ad830c60f3e565c23acf9d9696c37 /Master/texmf-dist
parent4f9282799e6b77aab5da00b68ede2cc9a7ae33e1 (diff)
l3build (30jul19)
git-svn-id: svn://tug.org/texlive/trunk@51777 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/l3build/CHANGELOG.md13
-rw-r--r--Master/texmf-dist/doc/latex/l3build/README.md2
-rw-r--r--Master/texmf-dist/doc/latex/l3build/l3build.pdfbin700442 -> 703339 bytes
-rw-r--r--Master/texmf-dist/doc/man/man1/l3build.12
-rw-r--r--Master/texmf-dist/doc/man/man1/l3build.man1.pdfbin15273 -> 15158 bytes
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-check.lua5
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-file-functions.lua4
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-install.lua70
-rw-r--r--Master/texmf-dist/scripts/l3build/l3build-variables.lua5
-rwxr-xr-xMaster/texmf-dist/scripts/l3build/l3build.lua2
-rw-r--r--Master/texmf-dist/source/latex/l3build/l3build.dtx84
-rw-r--r--Master/texmf-dist/tex/latex/l3build/regression-test.tex32
12 files changed, 170 insertions, 49 deletions
diff --git a/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md b/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md
index 27ea28f62a6..034213b41f6 100644
--- a/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md
+++ b/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md
@@ -7,6 +7,16 @@ this project uses date-based 'snapshot' version identifiers.
## [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 @@ this project uses date-based 'snapshot' version identifiers.
- 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
diff --git a/Master/texmf-dist/doc/latex/l3build/README.md b/Master/texmf-dist/doc/latex/l3build/README.md
index bb8ae1781a7..9b50418b81a 100644
--- a/Master/texmf-dist/doc/latex/l3build/README.md
+++ b/Master/texmf-dist/doc/latex/l3build/README.md
@@ -1,7 +1,7 @@
l3build: a testing and building system for LaTeX3
=================================================
-Release 2019-06-27
+Release 2019-07-30
Overview
--------
diff --git a/Master/texmf-dist/doc/latex/l3build/l3build.pdf b/Master/texmf-dist/doc/latex/l3build/l3build.pdf
index cff29fe6a68..65ea683f031 100644
--- a/Master/texmf-dist/doc/latex/l3build/l3build.pdf
+++ b/Master/texmf-dist/doc/latex/l3build/l3build.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/man/man1/l3build.1 b/Master/texmf-dist/doc/man/man1/l3build.1
index 9067893703b..58e9b7f0ca2 100644
--- a/Master/texmf-dist/doc/man/man1/l3build.1
+++ b/Master/texmf-dist/doc/man/man1/l3build.1
@@ -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
diff --git a/Master/texmf-dist/doc/man/man1/l3build.man1.pdf b/Master/texmf-dist/doc/man/man1/l3build.man1.pdf
index 5261c3aae0a..18156de4afa 100644
--- a/Master/texmf-dist/doc/man/man1/l3build.man1.pdf
+++ b/Master/texmf-dist/doc/man/man1/l3build.man1.pdf
Binary files differ
diff --git a/Master/texmf-dist/scripts/l3build/l3build-check.lua b/Master/texmf-dist/scripts/l3build/l3build-check.lua
index 9fcf9885717..6cd9ac1b324 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-check.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-check.lua
@@ -772,7 +772,10 @@ function runtest(name, engine, hide, ext, pdfmode, breakout)
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
diff --git a/Master/texmf-dist/scripts/l3build/l3build-file-functions.lua b/Master/texmf-dist/scripts/l3build/l3build-file-functions.lua
index cc1bef67fa8..9c7ac1fb6df 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-file-functions.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-file-functions.lua
@@ -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 @@ local insert = table.insert
(end license)
--]]
-local function glob_to_pattern(glob)
+function glob_to_pattern(glob)
local pattern = "^" -- pattern being built
local i = 0 -- index in glob
diff --git a/Master/texmf-dist/scripts/l3build/l3build-install.lua b/Master/texmf-dist/scripts/l3build/l3build-install.lua
index a97a24e29ec..d2222c8561e 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-install.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-install.lua
@@ -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 @@ for those people who are interested.
--]]
-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 @@ local function gethome()
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 @@ function uninstall()
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,13 +87,21 @@ function uninstall()
print("- " .. v)
end
end
- return uninstall_files("doc")
+ errorlevel = uninstall_files("doc")
+ uninstall_files("source")
+ uninstall_files("tex")
+ uninstall_files("bibtex/bst",module)
+ 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 @@ function install_files(target,full,dry_run)
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 @@ function install_files(target,full,dry_run)
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 @@ function install_files(target,full,dry_run)
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
diff --git a/Master/texmf-dist/scripts/l3build/l3build-variables.lua b/Master/texmf-dist/scripts/l3build/l3build-variables.lua
index 1288a6b7ca7..0b3c9a2e431 100644
--- a/Master/texmf-dist/scripts/l3build/l3build-variables.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build-variables.lua
@@ -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 @@ tpfext = tpfext or ".tpf"
-- Manifest options
manifestfile = manifestfile or "MANIFEST.md"
+-- Non-standard installation locations
+tdslocations = tdslocations or { }
+
-- Upload settings
curlexe = curlexe or "curl"
uploadconfig = uploadconfig or {}
diff --git a/Master/texmf-dist/scripts/l3build/l3build.lua b/Master/texmf-dist/scripts/l3build/l3build.lua
index eacada0df35..c1029d4d3bc 100755
--- a/Master/texmf-dist/scripts/l3build/l3build.lua
+++ b/Master/texmf-dist/scripts/l3build/l3build.lua
@@ -25,7 +25,7 @@ for those people who are interested.
--]]
-- Version information
-release_date = "2019-06-27"
+release_date = "2019-07-30"
-- File operations are aided by the LuaFileSystem module
local lfs = require("lfs")
diff --git a/Master/texmf-dist/source/latex/l3build/l3build.dtx b/Master/texmf-dist/source/latex/l3build/l3build.dtx
index 4ca84094d6e..563051ac4b6 100644
--- a/Master/texmf-dist/source/latex/l3build/l3build.dtx
+++ b/Master/texmf-dist/source/latex/l3build/l3build.dtx
@@ -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}
%
diff --git a/Master/texmf-dist/tex/latex/l3build/regression-test.tex b/Master/texmf-dist/tex/latex/l3build/regression-test.tex
index f7e71b6a036..22d2f0a2c0a 100644
--- a/Master/texmf-dist/tex/latex/l3build/regression-test.tex
+++ b/Master/texmf-dist/tex/latex/l3build/regression-test.tex
@@ -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@catcodes
%%