summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/luatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-09-26 20:49:48 +0000
committerKarl Berry <karl@freefriends.org>2018-09-26 20:49:48 +0000
commit3a0140d05a7e481750ec23a30ed5cf3cdef61eb7 (patch)
tree8fac1dc16795d22db3b45205fa55db220a9beed4 /Master/texmf-dist/source/luatex
parentb573c63f79c24b5c8dff312e023c2745b49f6089 (diff)
lualibs (26sep18)
git-svn-id: svn://tug.org/texlive/trunk@48770 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/luatex')
-rw-r--r--Master/texmf-dist/source/luatex/lualibs/Makefile138
-rw-r--r--Master/texmf-dist/source/luatex/lualibs/lualibs.dtx26
-rw-r--r--Master/texmf-dist/source/luatex/lualibs/test-lualibs.lua82
-rw-r--r--Master/texmf-dist/source/luatex/lualibs/whatsnew.lua171
4 files changed, 14 insertions, 403 deletions
diff --git a/Master/texmf-dist/source/luatex/lualibs/Makefile b/Master/texmf-dist/source/luatex/lualibs/Makefile
deleted file mode 100644
index 5e0fd2a9b44..00000000000
--- a/Master/texmf-dist/source/luatex/lualibs/Makefile
+++ /dev/null
@@ -1,138 +0,0 @@
-# Makefile for lualibs.
-
-NAME = lualibs
-DTX = $(wildcard *.dtx)
-DOC_DTX = $(patsubst %.dtx, %.pdf, $(DTX))
-LUALIBS = $(wildcard lualibs-*.lua)
-MODULES = $(filter-out $(UNPACKED),$(LUALIBS))
-
-# Files grouped by generation mode
-TESTSCRIPT = test-lualibs.lua
-DIFFSCRIPT = whatsnew.lua
-SCRIPTS = $(TESTSCRIPT) $(DIFFSCRIPT)
-UNPACKED = lualibs.lua lualibs-extended.lua lualibs-basic.lua
-COMPILED = $(DOC_DTX)
-GENERATED = $(UNPACKED) $(DOC_DTX) $(MERGED)
-SOURCE = $(DTX) $(MODULES) $(SCRIPTS) LICENSE README Makefile NEWS
-MERGED = lualibs-basic-merged.lua lualibs-extended-merged.lua
-
-# Files grouped by installation location
-RUNFILES = $(UNPACKED) $(MODULES)
-DOCFILES = $(DOC_DTX) LICENSE README NEWS
-SRCFILES = $(DTX) $(SRC_TEX) Makefile $(SCRIPTS)
-
-# The following definitions should be equivalent
-# ALL_FILES = $(RUNFILES) $(DOCFILES) $(SRCFILES)
-ALL_FILES = $(SOURCE) $(filter-out $(SOURCE),$(GENERATED))
-
-# Installation locations
-FORMAT = luatex
-RUNDIR = $(TEXMFROOT)/tex/$(FORMAT)/$(NAME)
-DOCDIR = $(TEXMFROOT)/doc/$(FORMAT)/$(NAME)
-SRCDIR = $(TEXMFROOT)/source/$(FORMAT)/$(NAME)
-DISTDIR = ./lualibs
-TEXMFROOT = ./texmf
-
-CTAN_ZIP = $(NAME).zip
-CTAN_ZIPSIG = $(CTAN_ZIP).asc
-TDS_ZIP = $(NAME).tds.zip
-ZIPS = $(CTAN_ZIP) $(TDS_ZIP)
-
-DO_TEX = luatex --interaction=batchmode $< >/dev/null
-DO_PDFLATEX = latexmk -pdf -e '$$pdflatex = q(lualatex %O %S)' -silent $< >/dev/null
-DO_MAKEINDEX = makeindex -s gind.ist $(subst .dtx,,$<) >/dev/null 2>&1
-DO_PACKAGE = mtxrun --script package --merge $< >/dev/null
-
-all: $(GENERATED) $(DOC_TEX)
-doc: $(COMPILED)
-unpack: $(UNPACKED)
-ctan: check $(CTAN_ZIP)
-sign: $(CTAN_ZIPSIG)
-tds: $(TDS_ZIP)
-world: all ctan
-
-check: $(TESTSCRIPT)
- @texlua $(TESTSCRIPT)
-
-news: $(DIFFSCRIPT)
- @texlua $(DIFFSCRIPT)
-
-.PHONY: all doc unpack ctan tds world check news
-
-%.pdf: %.dtx
- $(DO_PDFLATEX)
- $(DO_MAKEINDEX)
- $(DO_PDFLATEX)
- $(DO_PDFLATEX)
-
-%-merged.lua: %.lua
- $(DO_PACKAGE)
-
-$(UNPACKED): lualibs.dtx
- $(DO_TEX)
-
-define make-ctandir
-@if [ -d $(DISTDIR) ] ; \
- then \
- rm -r $(DISTDIR) ; \
- fi
-@mkdir $(DISTDIR) && cp $(ALL_FILES) $(DISTDIR)
-endef
-
-$(CTAN_ZIP): $(ALL_FILES) $(TDS_ZIP)
- @echo "Making $@ for CTAN upload."
- @$(RM) -- $@
- $(make-ctandir)
- @zip -r -9 $@ $(DISTDIR) $(TDS_ZIP) >/dev/null
-
-$(CTAN_ZIPSIG): $(CTAN_ZIP)
- @echo "Signing package $(CTAN_ZIP)"
- @$(RM) -- $@
- @gpg --batch --armor --detach-sign "$(CTAN_ZIP)"
-
-define run-install
-@mkdir -p $(RUNDIR) && cp $(RUNFILES) $(RUNDIR)
-@mkdir -p $(DOCDIR) && cp $(DOCFILES) $(DOCDIR)
-@mkdir -p $(SRCDIR) && cp $(SRCFILES) $(SRCDIR)
-endef
-
-$(TDS_ZIP): TEXMFROOT=./tmp-texmf
-$(TDS_ZIP): $(ALL_FILES)
- @echo "Making TDS-ready archive $@."
- @$(RM) -- $@
- $(run-install)
- @cd $(TEXMFROOT) && zip -9 ../$@ -r . >/dev/null
- @$(RM) -r -- $(TEXMFROOT)
-
-.PHONY: install manifest clean mrproper
-
-install: $(ALL_FILES)
- @echo "Installing in '$(TEXMFROOT)'."
- $(run-install)
-
-manifest:
- @echo "Source files:"
- @for f in $(SOURCE); do echo $$f; done
- @echo ""
- @echo "Derived files:"
- @for f in $(GENERATED); do echo $$f; done
-
-clean:
- @$(RM) -- *.log *.aux *.toc *.idx *.ind *.ilg
-
-mrproper: clean
- @$(RM) -- $(GENERATED) $(ZIPS)
- @$(RM) -r $(DISTDIR)
-
-merge: $(MERGED)
-
-ifndef DESTDIR
-install:
- $(error "in order to install you need to provide $$DESTDIR")
-else
-install: $(TDS_ZIP)
- $(info installing to destination “$(DESTDIR)”)
- install -dm755 "$(DESTDIR)"
- unzip "$(TDS_ZIP)" -d "$(DESTDIR)"
-endif
-
diff --git a/Master/texmf-dist/source/luatex/lualibs/lualibs.dtx b/Master/texmf-dist/source/luatex/lualibs/lualibs.dtx
index fe9525e3ba8..58c097dafd4 100644
--- a/Master/texmf-dist/source/luatex/lualibs/lualibs.dtx
+++ b/Master/texmf-dist/source/luatex/lualibs/lualibs.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2009--2017 by
+% Copyright (C) 2009--2018 by
%
% PRAGMA ADE / ConTeXt Development Team
% The LuaLaTeX Dev Team
@@ -37,7 +37,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: lualibs 2017-02-01 v2.5 Lua additional functions.}
+\Msg{* Package: lualibs 2018-09-21 v2.6 Lua additional functions.}
\Msg{************************************************************************}
\keepsilent
@@ -48,7 +48,7 @@
\preamble
This is a generated file.
-Copyright (C) 2009--2017 by
+Copyright (C) 2009--2018 by
PRAGMA ADE / ConTeXt Development Team
The LuaLaTeX Dev Team
@@ -107,7 +107,7 @@ and lualibs-extended.lua.
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{lualibs.drv}
- [2017/02/01 v2.5 Lua Libraries.]
+ [2018/09/21 v2.6 Lua Libraries.]
\documentclass{ltxdoc}
\usepackage{fancyvrb,xspace}
\usepackage[x11names]{xcolor}
@@ -208,9 +208,11 @@ and lualibs-extended.lua.
% \GetFileInfo{lualibs.drv}
%
% \title{The \identifier{lualibs} package}
-% \date{2017/02/01 v2.5}
+% \date{2018/09/21 v2.6}
% \author{Élie Roux · \email{elie.roux@telecom-bretagne.eu}\\
-% Philipp Gesang · \email{phg@phi-gamma.net}}
+% Philipp Gesang · \email{phg@phi-gamma.net}\\
+% Ulrike Fischer · \email{fischer@troubleshooting-tex.de}\\
+% }
%
% \maketitle
%
@@ -427,8 +429,8 @@ lualibs = lualibs or { }
lualibs.module_info = {
name = "lualibs",
- version = 2.5,
- date = "2017-02-01",
+ version = 2.6,
+ date = "2018-09-21",
description = "ConTeXt Lua standard libraries.",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL & Elie Roux & Philipp Gesang",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -582,8 +584,8 @@ local loadmodule = lualibs.loadmodule
local lualibs_basic_module = {
name = "lualibs-basic",
- version = 2.5,
- date = "2017-02-01",
+ version = 2.6,
+ date = "2018-09-21",
description = "ConTeXt Lua libraries -- basic collection.",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL & Elie Roux & Philipp Gesang",
copyright = "PRAGMA ADE / ConTeXt Development Team",
@@ -664,8 +666,8 @@ lualibs = lualibs or { }
local lualibs_extended_module = {
name = "lualibs-extended",
- version = 2.5,
- date = "2017-02-01",
+ version = 2.6,
+ date = "2018-09-21",
description = "ConTeXt Lua libraries -- extended collection.",
author = "Hans Hagen, PRAGMA-ADE, Hasselt NL & Elie Roux & Philipp Gesang",
copyright = "PRAGMA ADE / ConTeXt Development Team",
diff --git a/Master/texmf-dist/source/luatex/lualibs/test-lualibs.lua b/Master/texmf-dist/source/luatex/lualibs/test-lualibs.lua
deleted file mode 100644
index afc674db689..00000000000
--- a/Master/texmf-dist/source/luatex/lualibs/test-lualibs.lua
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/usr/bin/env texlua
-
-local luafiles = {
- "lualibs-boolean.lua", "lualibs-compat.lua",
- "lualibs-dir.lua", "lualibs-file.lua",
- "lualibs-gzip.lua",
- "lualibs-function.lua", "lualibs-io.lua",
- "lualibs-lpeg.lua", "lualibs-lua.lua",
- "lualibs-math.lua", "lualibs-md5.lua",
- "lualibs-number.lua", "lualibs-os.lua",
- "lualibs-package.lua", "lualibs-set.lua",
- "lualibs-string.lua", "lualibs-table.lua",
- "lualibs-trac-inf.lua", "lualibs-unicode.lua",
- "lualibs-url.lua", "lualibs-util-deb.lua",
- "lualibs-util-dim.lua",
- "lualibs-util-jsn.lua", "lualibs-util-lua.lua",
- "lualibs-util-prs.lua", "lualibs-util-sta.lua",
- "lualibs-util-sto.lua", "lualibs-util-str.lua",
- "lualibs-util-tab.lua",
- "lualibs-util-tpl.lua", "lualibs.lua",
- "lualibs-basic.lua", "lualibs-basic-merged.lua",
- "lualibs-extended.lua", "lualibs-extended-merged.lua",
-}
-
-local test_cmd = "texluac -p %s &> /dev/null"
-
-local check_wellformed = function (file)
- io.write"testing "
- io.write(file)
- io.write" ... "
- local exit_status = os.execute(string.format(test_cmd, file))
- if exit_status == 0 then
- io.write"SUCCESS!\n"
- return true
- end
- io.write"FAIL :-/\n"
- return false
-end
-
-local check_files check_files = function (lst, n)
- if n == nil then
- return check_files(lst, 1)
- end
- local this = lst[n]
- if this then
- if check_wellformed(this) then
- return check_files(lst, n+1)
- else
- return false
- end
- end
- return true
-end
-
-config = { lualibs = { force_reload = true } }
-
-local load_all = function ( )
-
- io.write"testing merged packages ... "
- config.lualibs.prefer_merged = true
- if not pcall(function () dofile"lualibs.lua"end) then
- io.write"FAIL :-/\n"
- end
- io.write"SUCCESS\n"
-
- io.write"testing files ... "
- config.lualibs.prefer_merged = false
- if not pcall(function () dofile"lualibs.lua"end) then
- io.write"FAIL :-/\n"
- end
- io.write"SUCCESS\n"
- return true
-end
-
-local main = function ( )
- local retval = 0
- retval = check_files(luafiles) and retval or 1
- retval = load_all() and retval or 1
- os.exit(retval)
-end
-
-return main()
diff --git a/Master/texmf-dist/source/luatex/lualibs/whatsnew.lua b/Master/texmf-dist/source/luatex/lualibs/whatsnew.lua
deleted file mode 100644
index 35533ca8142..00000000000
--- a/Master/texmf-dist/source/luatex/lualibs/whatsnew.lua
+++ /dev/null
@@ -1,171 +0,0 @@
-#!/usr/bin/env texlua
---[===[--
-
- whatsnew.lua -- Scan Context for changes in Lua libraries.
- Part of the Lualibs package.
- https://github.com/lualatex/lualibs
-
- Copyright 2013 Philipp Gesang
- License: GPL v2.0
-
---]===]--
-
------------------------------------------------------------------------
---- configuration
------------------------------------------------------------------------
-
-local prefixsep = "-"
-local namespace = "lualibs"
-local luasuffix = ".lua"
-local basedir = "/home/phg/context/tex/texmf-context/tex/context/base/mkiv"
-local cmd_diff = [[diff "%s" "%s"]]
-
------------------------------------------------------------------------
---- locals
------------------------------------------------------------------------
-
-local iopopen = io.popen
-local stringexplode = string.explode
-local stringformat = string.format
-local stringsub = string.sub
-local tableunpack = table.unpack
-
------------------------------------------------------------------------
---- files
------------------------------------------------------------------------
-
---- (prefix, keep) hash_t
-local namespaces = { { "l" , false },
- { "util" , true },
- { "trac" , true }, }
-
---- (prefix, name list) hash_t
-local filenames = {
- ["l"] = {
- "boolean",
- "dir",
- "file",
- "function",
- "gzip",
- "io",
- "lpeg",
- "lua",
- "math",
- "md5",
- "number",
- "os",
- "package",
- "set",
- "string",
- "table",
- "unicode",
- "url",
- },
-
- ["trac"] = { "inf" },
-
- ["util"] = {
- "deb",
- "dim",
- "jsn",
- "lua",
- "prs",
- "sta",
- "sto",
- "str",
- "tab",
- "tpl",
- },
-}
-
------------------------------------------------------------------------
---- helpers
------------------------------------------------------------------------
-
---- string -> string -> bool -> (string, string)
-local mknames = function (pfx, name, keeppfx)
- local libname = basedir .. "/" .. pfx
- .. prefixsep .. name .. luasuffix
- local ourname = prefixsep .. name .. luasuffix
- if keeppfx == true then
- ourname = prefixsep .. pfx .. ourname
- end
- ourname = namespace .. ourname
- ourname = "./" .. ourname
- return ourname, libname
-end
-
---- string -> (int * int)
-local count_changes = function (str)
- local added, removed = 0, 0
- for n, line in next, stringexplode(str, "\n") do
- local first = stringsub(line, 1, 1)
- if first == "<" then
- removed = removed + 1
- elseif first == ">" then
- added = added + 1
- end
- end
- return added, removed
-end
-
---- string -> string -> (int * int)
-local run_diff = function (f1, f2)
- local cmd = stringformat(cmd_diff, f1, f2)
- local res = iopopen(cmd, "r")
- local dat = res:read"*all"
- res:close()
- return count_changes(dat)
-end
-
------------------------------------------------------------------------
---- main
------------------------------------------------------------------------
-
-local libs_done = 0
-local total_added = 0
-local total_removed = 0
-
-for n, namespace in next, namespaces do
- local pfx, keeppfx = tableunpack(namespace)
- local libs = filenames[pfx]
- for i=1, #libs do
- libs_done = libs_done + 1
- local current = libs[i]
- local from, to = mknames(pfx, current, keeppfx)
- if lfs.isfile(from) and lfs.isfile(to) then
- local added, removed = run_diff (from, to)
- if added > 0 or removed > 0 then
- total_added = total_added + added
- total_removed = total_removed + removed
- print(stringformat(
- "(library %q (plus %d) (minus %d))",
- from, added, removed
- ))
- end
- else
- if not lfs.isfile(from) then
- print("cannot read file", from)
- elseif not lfs.isfile(to) then
- print("cannot read file", to)
- end
- goto fail
- end
- end
-end
-
-::done::
-if total_added == 0 and total_removed == 0 then
- print "stagnation"
-else
- print(stringformat(
- "(progress (n-files %d) (added %d) (removed %d))",
- libs_done, total_added, total_removed
- ))
-end
-os.exit(0)
-
-::fail::
-print "fatal error"
-os.exit(1)
-