diff options
author | Karl Berry <karl@freefriends.org> | 2024-03-01 21:45:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-03-01 21:45:25 +0000 |
commit | 0eaa5c8aa577036e91ec287c5797a3e96bcffb8c (patch) | |
tree | 3dfd8d61f8e75ac5f4a1495811f6e946f6ad1e88 /Master/texmf-dist/tex/luatex | |
parent | 268ab64930166e650aaf4c3bf3ef95198a1cfb4e (diff) |
luamplib (1mar24)
git-svn-id: svn://tug.org/texlive/trunk@70309 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex')
-rw-r--r-- | Master/texmf-dist/tex/luatex/luamplib/luamplib.lua | 43 | ||||
-rw-r--r-- | Master/texmf-dist/tex/luatex/luamplib/luamplib.sty | 2 |
2 files changed, 19 insertions, 26 deletions
diff --git a/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua b/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua index 2654bd28e33..0d2cc763dad 100644 --- a/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua +++ b/Master/texmf-dist/tex/luatex/luamplib/luamplib.lua @@ -11,8 +11,8 @@ luatexbase.provides_module { name = "luamplib", - version = "2.25.3", - date = "2024/01/25", + version = "2.26.0", + date = "2024/03/01", description = "Lua package to typeset Metapost with LuaTeX's MPLib.", } @@ -71,7 +71,7 @@ local is_writable = file.is_writable or function(name) end end end -local mk_full_path = lfs.mkdirs or function(path) +local mk_full_path = lfs.mkdirp or lfs.mkdirs or function(path) local full = "" for sub in path:gmatch("(/*[^\\/]+)") do full = full .. sub @@ -86,31 +86,24 @@ local currenttime = os.time() local outputdir if lfstouch then - local texmfvar = kpse.expand_var('$TEXMFVAR') - if texmfvar and texmfvar ~= "" and texmfvar ~= '$TEXMFVAR' then - for _,dir in next, texmfvar:explode(os.type == "windows" and ";" or ":") do - if not lfsisdir(dir) then - mk_full_path(dir) - end - if is_writable(dir) then - local cached = format("%s/luamplib_cache",dir) - lfsmkdir(cached) - outputdir = cached - break + for i,v in ipairs{'TEXMFVAR','TEXMF_OUTPUT_DIRECTORY','.','TEXMFOUTPUT'} do + local var = i == 3 and v or kpse.var_value(v) + if var and var ~= "" then + for _,vv in next, var:explode(os.type == "unix" and ":" or ";") do + local dir = format("%s/%s",vv,"luamplib_cache") + if not lfsisdir(dir) then + mk_full_path(dir) + end + if is_writable(dir) then + outputdir = dir + break + end end + if outputdir then break end end end end -if not outputdir then - outputdir = "." - for _,v in ipairs(arg) do - local t = v:match("%-output%-directory=(.+)") - if t then - outputdir = t - break - end - end -end +outputdir = outputdir or '.' function luamplib.getcachedir(dir) dir = dir:gsub("##","#") @@ -143,7 +136,7 @@ local noneedtoreplace = { ["mp-grph.mpiv"] = true, ["mp-idea.mpiv"] = true, ["mp-luas.mpiv"] = true, ["mp-mlib.mpiv"] = true, ["mp-node.mpiv"] = true, ["mp-page.mpiv"] = true, ["mp-shap.mpiv"] = true, ["mp-step.mpiv"] = true, ["mp-text.mpiv"] = true, - ["mp-tool.mpiv"] = true, + ["mp-tool.mpiv"] = true, ["mp-cont.mpiv"] = true, } luamplib.noneedtoreplace = noneedtoreplace diff --git a/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty b/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty index 06a8f321ef8..d2810d80e9c 100644 --- a/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty +++ b/Master/texmf-dist/tex/luatex/luamplib/luamplib.sty @@ -14,7 +14,7 @@ \else \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{luamplib} - [2024/01/25 v2.25.3 mplib package for LuaTeX] + [2024/03/01 v2.26.0 mplib package for LuaTeX] \ifx\newluafunction\@undefined \input ltluatex \fi |