From 7f2b2a9d664831db3f6dcb985d3a10212ce3b752 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 13 Mar 2020 03:02:35 +0000 Subject: CTAN sync 202003130302 --- macros/latex/contrib/l3build/CHANGELOG.md | 16 +++++++++- macros/latex/contrib/l3build/README.md | 2 +- macros/latex/contrib/l3build/l3build-check.lua | 6 +++- .../contrib/l3build/l3build-file-functions.lua | 4 +-- macros/latex/contrib/l3build/l3build-install.lua | 33 ++++++++++++++------- .../latex/contrib/l3build/l3build-typesetting.lua | 29 +++++++----------- macros/latex/contrib/l3build/l3build-variables.lua | 1 + macros/latex/contrib/l3build/l3build.1 | 2 +- macros/latex/contrib/l3build/l3build.dtx | 5 +++- macros/latex/contrib/l3build/l3build.lua | 2 +- macros/latex/contrib/l3build/l3build.pdf | Bin 706664 -> 706870 bytes 11 files changed, 63 insertions(+), 37 deletions(-) (limited to 'macros/latex/contrib/l3build') diff --git a/macros/latex/contrib/l3build/CHANGELOG.md b/macros/latex/contrib/l3build/CHANGELOG.md index b0cc92a424..0d10b39b56 100644 --- a/macros/latex/contrib/l3build/CHANGELOG.md +++ b/macros/latex/contrib/l3build/CHANGELOG.md @@ -7,6 +7,19 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2020-03-12] + +### Added +- Option `ps2pdfopt` + +### Changed +- Normalise `/ID` lines in PDF comparisons +- Normalise `%%` lines in PDF comparisons + +### Fixed +- Enable `cleandir()` recursively +- Install files after *all* directory cleaning/creation + ## [2020-02-21] ### Changed @@ -434,7 +447,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/2020-02-21...HEAD +[Unreleased]: https://github.com/latex3/l3build/compare/2020-03-12...HEAD +[2020-03-12]: https://github.com/latex3/l3build/compare/2020-02-21...2020-03-12 [2020-02-21]: https://github.com/latex3/l3build/compare/2020-02-17...2020-02-21 [2020-02-17]: https://github.com/latex3/l3build/compare/2020-02-03...2020-02-17 [2020-02-03]: https://github.com/latex3/l3build/compare/2020-01-14...2020-02-03 diff --git a/macros/latex/contrib/l3build/README.md b/macros/latex/contrib/l3build/README.md index 2228c502f9..2817fa8425 100644 --- a/macros/latex/contrib/l3build/README.md +++ b/macros/latex/contrib/l3build/README.md @@ -1,7 +1,7 @@ l3build: a testing and building system for LaTeX3 ================================================= -Release 2020-02-21 +Release 2020-03-12 Overview -------- diff --git a/macros/latex/contrib/l3build/l3build-check.lua b/macros/latex/contrib/l3build/l3build-check.lua index 17e6321787..c90c8fbc5a 100644 --- a/macros/latex/contrib/l3build/l3build-check.lua +++ b/macros/latex/contrib/l3build/l3build-check.lua @@ -537,7 +537,8 @@ local function normalize_pdf(content) binary = false stream = true stream_content = "stream" .. os_newline - elseif not match(line, "^ *$") then + elseif not match(line, "^ *$") and not match(line,"^%%%%") then + line = gsub(line,"%/ID %[<[^>]+><[^>]+>]","/ID []") new_content = new_content .. line .. os_newline end end @@ -768,6 +769,9 @@ function runtest(name, engine, hide, ext, pdfmode, breakout) -- Break the loop if the result is stable if breakout and i < checkruns then if pdfmode then + if fileexists(testdir .. "/" .. name .. dviext) then + dvitopdf(name, testdir, engine, hide) + end rewrite(pdffile,npffile,normalize_pdf) if compare_pdf(name,engine,true) == 0 then break diff --git a/macros/latex/contrib/l3build/l3build-file-functions.lua b/macros/latex/contrib/l3build/l3build-file-functions.lua index e3000b45ef..6c420f80a2 100644 --- a/macros/latex/contrib/l3build/l3build-file-functions.lua +++ b/macros/latex/contrib/l3build/l3build-file-functions.lua @@ -204,7 +204,7 @@ function cleandir(dir) if errorlevel ~= 0 then return errorlevel end - return rm(dir, "*") + return rm(dir, "**") end -- Copy files 'quietly' @@ -376,7 +376,7 @@ end -- Remove file(s) based on a glob function rm(source, glob) - for _,i in ipairs(filelist(source, glob)) do + for i,_ in pairs(tree(source, glob)) do rmfile(source,i) end -- os.remove doesn't give a sensible errorlevel diff --git a/macros/latex/contrib/l3build/l3build-install.lua b/macros/latex/contrib/l3build/l3build-install.lua index 1007d2ed1b..4b95f9ef43 100644 --- a/macros/latex/contrib/l3build/l3build-install.lua +++ b/macros/latex/contrib/l3build/l3build-install.lua @@ -108,8 +108,11 @@ function install_files(target,full,dry_run) -- Needed so paths are only cleaned out once local cleanpaths = { } + -- Collect up all file data before copying: + -- ensures no files are lost during clean-up + local installmap = { } - local function install_files(source,dir,files,subdir) + local function create_install_map(source,dir,files,subdir) subdir = subdir or moduledir -- For material associated with secondary tools (BibTeX, MakeIndex) -- the structure needed is slightly different from those items going @@ -172,13 +175,14 @@ function install_files(target,full,dry_run) print("- " .. file) else local path,file = splitpath(file) - errorlevel = cp(file,sourcepaths[file],target .. "/" .. path) - if errorlevel ~= 0 then return errorlevel end + insert(installmap, + {file = file, source = sourcepaths[file], dest = target .. "/" .. path}) end end end return 0 end + local errorlevel = unpack() if errorlevel ~= 0 then return errorlevel end @@ -233,8 +237,8 @@ function install_files(target,full,dry_run) print("\nFor installation inside " .. target .. ":") end - errorlevel = install_files(sourcefiledir,"source",{sourcelist}) - + install_files(docfiledir,"doc", + errorlevel = create_install_map(sourcefiledir,"source",{sourcelist}) + + create_install_map(docfiledir,"doc", {bibfiles,demofiles,docfiles,pdffiles,textfiles,typesetlist}) if errorlevel ~= 0 then return errorlevel end @@ -272,12 +276,21 @@ function install_files(target,full,dry_run) if errorlevel ~= 0 then return errorlevel end - errorlevel = install_files(unpackdir,"tex",{installlist}) - + install_files(unpackdir,"bibtex/bst",{bstfiles},module) - + install_files(unpackdir,"makeindex",{makeindexfiles},module) - + install_files(unpackdir,"scripts",{scriptfiles},module) + errorlevel = create_install_map(unpackdir,"tex",{installlist}) + + create_install_map(unpackdir,"bibtex/bst",{bstfiles},module) + + create_install_map(unpackdir,"makeindex",{makeindexfiles},module) + + create_install_map(unpackdir,"scripts",{scriptfiles},module) + + if errorlevel ~= 0 then return errorlevel end + + -- Files are all copied in one shot: this ensures that cleandir() + -- can't be an issue even if there are complex set-ups + for _,v in ipairs(installmap) do + errorlevel = cp(v.file,v.source,v.dest) + if errorlevel ~= 0 then return errorlevel end + end - return errorlevel + return 0 end function install() diff --git a/macros/latex/contrib/l3build/l3build-typesetting.lua b/macros/latex/contrib/l3build/l3build-typesetting.lua index b76edd913b..540ac3f384 100644 --- a/macros/latex/contrib/l3build/l3build-typesetting.lua +++ b/macros/latex/contrib/l3build/l3build-typesetting.lua @@ -1,6 +1,6 @@ --[[ -File l3build-typesetting.lua Copyright (C) 2018,2019 The LaTeX3 Project +File l3build-typesetting.lua Copyright (C) 2018-2020 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 @@ -36,24 +36,15 @@ local match = string.match local os_type = os.type function dvitopdf(name, dir, engine, hide) - if match(engine, "^u?ptex$") then - run( - dir, - (forcecheckepoch and setepoch() or "") .. - "dvipdfmx " .. name .. dviext - .. (hide and (" > " .. os_null) or "") - ) - else - run( - dir, - (forcecheckepoch and setepoch() or "") .. - "dvips " .. name .. dviext - .. (hide and (" > " .. os_null) or "") - .. os_concat .. - "ps2pdf " .. name .. psext - .. (hide and (" > " .. os_null) or "") - ) - end + run( + dir, + (forcecheckepoch and setepoch() or "") .. + "dvips " .. name .. dviext + .. (hide and (" > " .. os_null) or "") + .. os_concat .. + "ps2pdf " .. ps2pdfopt .. name .. psext + .. (hide and (" > " .. os_null) or "") + ) end -- An auxiliary used to set up the environmental variables diff --git a/macros/latex/contrib/l3build/l3build-variables.lua b/macros/latex/contrib/l3build/l3build-variables.lua index e69eb5aff1..dcb2521869 100644 --- a/macros/latex/contrib/l3build/l3build-variables.lua +++ b/macros/latex/contrib/l3build/l3build-variables.lua @@ -184,6 +184,7 @@ if flattentds == nil then end maxprintline = maxprintline or 79 packtdszip = packtdszip or false +ps2pdfopt = ps2pdfopt or "" typesetcmds = typesetcmds or "" typesetruns = typesetruns or 3 recordstatus = recordstatus or false diff --git a/macros/latex/contrib/l3build/l3build.1 b/macros/latex/contrib/l3build/l3build.1 index ca160fe5dc..01cefeeeb1 100644 --- a/macros/latex/contrib/l3build/l3build.1 +++ b/macros/latex/contrib/l3build/l3build.1 @@ -1,4 +1,4 @@ -.TH l3build 1 "2020-02-21" +.TH l3build 1 "2020-03-12" .SH NAME l3build \- Checking and building packages .SH SYNOPSIS diff --git a/macros/latex/contrib/l3build/l3build.dtx b/macros/latex/contrib/l3build/l3build.dtx index 56bcbb9243..6121a0255b 100644 --- a/macros/latex/contrib/l3build/l3build.dtx +++ b/macros/latex/contrib/l3build/l3build.dtx @@ -152,6 +152,7 @@ \luavarset{flattentds} {true} {Switch to flatten any source structure when creating a TDS structure} \luavarset{maxprintline}{79} {Length of line to use in log files} \luavarset{packtdszip} {false} {Switch to build a TDS-style zip file for CTAN} +\luavarset{ps2pdfopts} {""} {Options for \texttt{ps2pdf}} \luavarset{typesetcmds} {""} {Instructions to be passed to \TeX{} when doing typesetting} \luavarset{typesetruns}{3} {Number of cycles of typesetting to carry out} \luavarset{recordstatus}{false} {Switch to include error level from test runs in \texttt{.tlg} files} @@ -233,7 +234,7 @@ % }^^A % } % -% \date{Released 2020-02-21} +% \date{Released 2020-03-12} % % \maketitle % \tableofcontents @@ -1230,7 +1231,9 @@ % normalization takes place: % \begin{itemize} % \item Replacement of binary streams by the marker |[BINARY STREAM]| +% \item Replacement of \texttt{/ID} values by |ID-STRING| % \item Removal of blank lines +% \item Removal of comment (|%%|) lines % \end{itemize} % % After this normalization takes place, the file can not usually be rendered diff --git a/macros/latex/contrib/l3build/l3build.lua b/macros/latex/contrib/l3build/l3build.lua index ccb05eed31..60b6ac5284 100755 --- a/macros/latex/contrib/l3build/l3build.lua +++ b/macros/latex/contrib/l3build/l3build.lua @@ -25,7 +25,7 @@ for those people who are interested. --]] -- Version information -release_date = "2020-02-21" +release_date = "2020-03-12" -- File operations are aided by the LuaFileSystem module local lfs = require("lfs") diff --git a/macros/latex/contrib/l3build/l3build.pdf b/macros/latex/contrib/l3build/l3build.pdf index 0739a67dab..069c548b6d 100644 Binary files a/macros/latex/contrib/l3build/l3build.pdf and b/macros/latex/contrib/l3build/l3build.pdf differ -- cgit v1.2.3