summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMaster/bin/universal-darwin/asybin13831960 -> 13374064 bytes
-rwxr-xr-xMaster/bin/universal-darwin/mtxrun122
-rwxr-xr-xMaster/bin/x86_64-darwin/asybin7556704 -> 7379896 bytes
-rwxr-xr-xMaster/bin/x86_64-darwin/mtxrun122
4 files changed, 58 insertions, 186 deletions
diff --git a/Master/bin/universal-darwin/asy b/Master/bin/universal-darwin/asy
index 6d92711b0ac..fa4b0d56e85 100755
--- a/Master/bin/universal-darwin/asy
+++ b/Master/bin/universal-darwin/asy
Binary files differ
diff --git a/Master/bin/universal-darwin/mtxrun b/Master/bin/universal-darwin/mtxrun
index 37ca30d8c1d..e1783761afa 100755
--- a/Master/bin/universal-darwin/mtxrun
+++ b/Master/bin/universal-darwin/mtxrun
@@ -10749,17 +10749,6 @@ local resolvers = resolvers
texconfig.kpse_init = false
texconfig.shell_escape = 't'
-if kpse and kpse.default_texmfcnf then
- local default_texmfcnf = kpse.default_texmfcnf()
- -- looks more like context:
- default_texmfcnf = gsub(default_texmfcnf,"$SELFAUTOLOC","selfautoloc:")
- default_texmfcnf = gsub(default_texmfcnf,"$SELFAUTODIR","selfautodir:")
- default_texmfcnf = gsub(default_texmfcnf,"$SELFAUTOPARENT","selfautoparent:")
- default_texmfcnf = gsub(default_texmfcnf,"$HOME","home:")
- --
- environment.default_texmfcnf = default_texmfcnf
-end
-
kpse = { original = kpse }
setmetatable(kpse, {
@@ -11004,27 +10993,10 @@ local function f_second(a,b)
return concat(t,",")
end
--- kpsewhich --expand-braces '{a,b}{c,d}'
--- ac:bc:ad:bd
-
--- old {a,b}{c,d} => ac ad bc bd
---
--- local function f_both(a,b)
--- local t, n = { }, 0
--- for sa in gmatch(a,"[^,]+") do
--- for sb in gmatch(b,"[^,]+") do
--- n = n + 1 ; t[n] = sa .. sb
--- end
--- end
--- return concat(t,",")
--- end
---
--- new {a,b}{c,d} => ac bc ad bd
-
local function f_both(a,b)
local t, n = { }, 0
- for sb in gmatch(b,"[^,]+") do -- and not sa
- for sa in gmatch(a,"[^,]+") do -- sb
+ for sa in gmatch(a,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do
n = n + 1 ; t[n] = sa .. sb
end
end
@@ -11052,24 +11024,11 @@ local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpeggi
local t, ok, done = newlist or { }, false, false
local n = #t
str = lpegmatch(replacer_1,str)
- repeat
- local old = str
- repeat
- local old = str
- str = lpegmatch(l_first, str)
- until old == str
- repeat
- local old = str
- str = lpegmatch(l_second,str)
- until old == str
- repeat
- local old = str
- str = lpegmatch(l_both, str)
- until old == str
- repeat
- local old = str
- str = lpegmatch(l_rest, str)
- until old == str
+ repeat local old = str
+ repeat local old = str ; str = lpegmatch(l_first, str) until old == str
+ repeat local old = str ; str = lpegmatch(l_second,str) until old == str
+ repeat local old = str ; str = lpegmatch(l_both, str) until old == str
+ repeat local old = str ; str = lpegmatch(l_rest, str) until old == str
until old == str -- or not find(str,"{")
str = lpegmatch(stripper_1,str)
if validate then
@@ -11172,7 +11131,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return type(str) == "string" and lpegmatch(stripper,str) or str
+ return lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12312,7 +12271,7 @@ resolvers.luacnfstate = "unknown"
-- resolvers.luacnfspec = 'selfautoparent:{/texmf{-local,}{,/web2c}}'
--
-- which does not make texlive happy as there is a texmf-local tree one level up
--- (sigh), so we need this. We can assume web2c as mkiv does not run on older
+-- (sigh), so we need this. (We can assume web2c as mkiv does not run on older
-- texlives anyway.
--
-- texlive:
@@ -12335,16 +12294,16 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf-context/web2c
-- selfautoparent:texmf/web2c
-if environment.default_texmfcnf then
- -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
- resolvers.luacnfspec = environment.default_texmfcnf
+this_is_texlive = true
+if this_is_texlive then
+ -- resolvers.luacnfspec = '{selfautodir:,selfautoparent:}{,{/share,}/texmf{-local,}/web2c}'
+ -- resolvers.luacnfspec = '{selfautodir:{/share,}/texmf-local/web2c,selfautoparent:{/share,}/texmf{-local,}/web2c}'
+ -- resolvers.luacnfspec = 'selfautodir:/texmf-local/web2c;selfautoparent:/texmf{-local,}/web2c'
+ resolvers.luacnfspec = 'selfautodir:;selfautoparent:;{selfautodir:,selfautoparent:}{/share,}/texmf{-local,}/web2c'
else
- -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
- resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
+ resolvers.luacnfspec = 'home:texmf/web2c;selfautoparent:texmf{-local,-context,}/web2c'
end
-resolvers.luacnfspec = 'home:texmf/web2c;' .. resolvers.luacnfspec
-
-- which (as we want users to use the web2c path) be can be simplified to this:
--
-- if environment and environment.ownpath and string.find(environment.ownpath,"[\\/]texlive[\\/]") then
@@ -12678,7 +12637,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no valid format)",filename)
+ report_resolving("skipping configuration file '%s' (no file)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -13043,10 +13002,7 @@ function resolvers.expandpathfromvariable(str)
end
function resolvers.expandbraces(str) -- output variable and brace expansion of STRING
--- local ori = resolvers.variable(str)
--- if ori == "" then
- local ori = str
--- end
+ local ori = resolvers.variable(str)
local pth = expandedpathfromlist(resolvers.splitpath(ori))
return joinpath(pth)
end
@@ -14036,21 +13992,13 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- if type(str) == "table" then
- local t = { }
- for i=1,#str do
- t[i] = resolve(str[i])
- end
- return t
- else
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
- resolved[str] = res
- abstract[res] = str
- end
- return res
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
+ resolved[str] = res
+ abstract[res] = str
end
+ return res
end
local function unresolve(str)
@@ -14739,17 +14687,16 @@ function resolvers.usezipfile(archive)
if archive and not registeredfiles[archive] then
local z = zip.openarchive(archive)
if z then
- local instance = resolvers.instance
local tree = url.query(specification.query).tree or ""
if trace_locating then
report_zip("registering, registering archive '%s'",archive)
end
- statistics.starttiming(instance)
+ statistics.starttiming(resolvers.instance)
resolvers.prependhash('zip',archive)
resolvers.extendtexmfvariable(archive) -- resets hashes too
registeredfiles[archive] = z
instance.files[archive] = resolvers.registerzipfile(z,tree)
- statistics.stoptiming(instance)
+ statistics.stoptiming(resolvers.instance)
elseif trace_locating then
report_zip("registering, unknown archive '%s'",archive)
end
@@ -15240,7 +15187,6 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
- -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15316,7 +15262,7 @@ function resolvers.listers.variables(pattern)
report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset")
report_lists(" var: %s",tabstr(configured[key]) or "unset")
report_lists(" exp: %s",tabstr(expansions[key]) or "unset")
- report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
+ report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset")
end
end
instance.environment = fastcopy(env)
@@ -15328,17 +15274,7 @@ function resolvers.listers.configurations(report)
local configurations = resolvers.instance.specification
local report = report or texio.write_nl
for i=1,#configurations do
- report(format("file : %s",resolvers.resolve(configurations[i])))
- end
- report("")
- local list = resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))
- for i=1,#list do
- local li = resolvers.resolve(list[i])
- if lfs.isdir(li) then
- report(format("path - %s",li))
- else
- report(format("path + %s",li))
- end
+ report(resolvers.resolve(configurations[i]))
end
end
@@ -16680,7 +16616,7 @@ elseif e_argument("find-path") then
elseif e_argument("expand-braces") then
- -- luatools: runners.execute_ctx_script("mtx-base","--expand-braces",filename
+ -- luatools: runners.execute_ctx_script("mtx-base","--expand-braces",filename)
resolvers.load("nofiles")
runners.register_arguments(filename)
diff --git a/Master/bin/x86_64-darwin/asy b/Master/bin/x86_64-darwin/asy
index e1b871d0bc2..0f33f9dc825 100755
--- a/Master/bin/x86_64-darwin/asy
+++ b/Master/bin/x86_64-darwin/asy
Binary files differ
diff --git a/Master/bin/x86_64-darwin/mtxrun b/Master/bin/x86_64-darwin/mtxrun
index 37ca30d8c1d..e1783761afa 100755
--- a/Master/bin/x86_64-darwin/mtxrun
+++ b/Master/bin/x86_64-darwin/mtxrun
@@ -10749,17 +10749,6 @@ local resolvers = resolvers
texconfig.kpse_init = false
texconfig.shell_escape = 't'
-if kpse and kpse.default_texmfcnf then
- local default_texmfcnf = kpse.default_texmfcnf()
- -- looks more like context:
- default_texmfcnf = gsub(default_texmfcnf,"$SELFAUTOLOC","selfautoloc:")
- default_texmfcnf = gsub(default_texmfcnf,"$SELFAUTODIR","selfautodir:")
- default_texmfcnf = gsub(default_texmfcnf,"$SELFAUTOPARENT","selfautoparent:")
- default_texmfcnf = gsub(default_texmfcnf,"$HOME","home:")
- --
- environment.default_texmfcnf = default_texmfcnf
-end
-
kpse = { original = kpse }
setmetatable(kpse, {
@@ -11004,27 +10993,10 @@ local function f_second(a,b)
return concat(t,",")
end
--- kpsewhich --expand-braces '{a,b}{c,d}'
--- ac:bc:ad:bd
-
--- old {a,b}{c,d} => ac ad bc bd
---
--- local function f_both(a,b)
--- local t, n = { }, 0
--- for sa in gmatch(a,"[^,]+") do
--- for sb in gmatch(b,"[^,]+") do
--- n = n + 1 ; t[n] = sa .. sb
--- end
--- end
--- return concat(t,",")
--- end
---
--- new {a,b}{c,d} => ac bc ad bd
-
local function f_both(a,b)
local t, n = { }, 0
- for sb in gmatch(b,"[^,]+") do -- and not sa
- for sa in gmatch(a,"[^,]+") do -- sb
+ for sa in gmatch(a,"[^,]+") do
+ for sb in gmatch(b,"[^,]+") do
n = n + 1 ; t[n] = sa .. sb
end
end
@@ -11052,24 +11024,11 @@ local function splitpathexpr(str, newlist, validate) -- I couldn't resist lpeggi
local t, ok, done = newlist or { }, false, false
local n = #t
str = lpegmatch(replacer_1,str)
- repeat
- local old = str
- repeat
- local old = str
- str = lpegmatch(l_first, str)
- until old == str
- repeat
- local old = str
- str = lpegmatch(l_second,str)
- until old == str
- repeat
- local old = str
- str = lpegmatch(l_both, str)
- until old == str
- repeat
- local old = str
- str = lpegmatch(l_rest, str)
- until old == str
+ repeat local old = str
+ repeat local old = str ; str = lpegmatch(l_first, str) until old == str
+ repeat local old = str ; str = lpegmatch(l_second,str) until old == str
+ repeat local old = str ; str = lpegmatch(l_both, str) until old == str
+ repeat local old = str ; str = lpegmatch(l_rest, str) until old == str
until old == str -- or not find(str,"{")
str = lpegmatch(stripper_1,str)
if validate then
@@ -11172,7 +11131,7 @@ local stripper = Cs(
)
function resolvers.checkedvariable(str) -- assumes str is a string
- return type(str) == "string" and lpegmatch(stripper,str) or str
+ return lpegmatch(stripper,str) or str
end
-- The path splitter:
@@ -12312,7 +12271,7 @@ resolvers.luacnfstate = "unknown"
-- resolvers.luacnfspec = 'selfautoparent:{/texmf{-local,}{,/web2c}}'
--
-- which does not make texlive happy as there is a texmf-local tree one level up
--- (sigh), so we need this. We can assume web2c as mkiv does not run on older
+-- (sigh), so we need this. (We can assume web2c as mkiv does not run on older
-- texlives anyway.
--
-- texlive:
@@ -12335,16 +12294,16 @@ resolvers.luacnfstate = "unknown"
-- selfautoparent:texmf-context/web2c
-- selfautoparent:texmf/web2c
-if environment.default_texmfcnf then
- -- unfortunately we now have quite some overkill in the spec (not so nice on a network)
- resolvers.luacnfspec = environment.default_texmfcnf
+this_is_texlive = true
+if this_is_texlive then
+ -- resolvers.luacnfspec = '{selfautodir:,selfautoparent:}{,{/share,}/texmf{-local,}/web2c}'
+ -- resolvers.luacnfspec = '{selfautodir:{/share,}/texmf-local/web2c,selfautoparent:{/share,}/texmf{-local,}/web2c}'
+ -- resolvers.luacnfspec = 'selfautodir:/texmf-local/web2c;selfautoparent:/texmf{-local,}/web2c'
+ resolvers.luacnfspec = 'selfautodir:;selfautoparent:;{selfautodir:,selfautoparent:}{/share,}/texmf{-local,}/web2c'
else
- -- resolvers.luacnfspec = "selfautoparent:texmf{-local,-context,}/web2c"
- resolvers.luacnfspec = "{selfautoloc:,selfautodir:,selfautoparent:}{,/texmf{-local,}/web2c}"
+ resolvers.luacnfspec = 'home:texmf/web2c;selfautoparent:texmf{-local,-context,}/web2c'
end
-resolvers.luacnfspec = 'home:texmf/web2c;' .. resolvers.luacnfspec
-
-- which (as we want users to use the web2c path) be can be simplified to this:
--
-- if environment and environment.ownpath and string.find(environment.ownpath,"[\\/]texlive[\\/]") then
@@ -12678,7 +12637,7 @@ local function load_configuration_files()
instance.loaderror = true
end
elseif trace_locating then
- report_resolving("skipping configuration file '%s' (no valid format)",filename)
+ report_resolving("skipping configuration file '%s' (no file)",filename)
end
instance.order[#instance.order+1] = instance.setups[pathname]
if instance.loaderror then
@@ -13043,10 +13002,7 @@ function resolvers.expandpathfromvariable(str)
end
function resolvers.expandbraces(str) -- output variable and brace expansion of STRING
--- local ori = resolvers.variable(str)
--- if ori == "" then
- local ori = str
--- end
+ local ori = resolvers.variable(str)
local pth = expandedpathfromlist(resolvers.splitpath(ori))
return joinpath(pth)
end
@@ -14036,21 +13992,13 @@ function resolvers.resetresolve(str)
end
local function resolve(str) -- use schemes, this one is then for the commandline only
- if type(str) == "table" then
- local t = { }
- for i=1,#str do
- t[i] = resolve(str[i])
- end
- return t
- else
- local res = resolved[str]
- if not res then
- res = gsub(str,"([a-z][a-z]+):([^ \"\';,]*)",_resolve_) -- home:xx;selfautoparent:xx; etc (comma added)
- resolved[str] = res
- abstract[res] = str
- end
- return res
+ local res = resolved[str]
+ if not res then
+ res = gsub(str,"([a-z][a-z]+):([^ \"\';]*)",_resolve_) -- home:xx;selfautoparent:xx; etc
+ resolved[str] = res
+ abstract[res] = str
end
+ return res
end
local function unresolve(str)
@@ -14739,17 +14687,16 @@ function resolvers.usezipfile(archive)
if archive and not registeredfiles[archive] then
local z = zip.openarchive(archive)
if z then
- local instance = resolvers.instance
local tree = url.query(specification.query).tree or ""
if trace_locating then
report_zip("registering, registering archive '%s'",archive)
end
- statistics.starttiming(instance)
+ statistics.starttiming(resolvers.instance)
resolvers.prependhash('zip',archive)
resolvers.extendtexmfvariable(archive) -- resets hashes too
registeredfiles[archive] = z
instance.files[archive] = resolvers.registerzipfile(z,tree)
- statistics.stoptiming(instance)
+ statistics.stoptiming(resolvers.instance)
elseif trace_locating then
report_zip("registering, unknown archive '%s'",archive)
end
@@ -15240,7 +15187,6 @@ function resolvers.load_tree(tree,resolve)
-- local AUTOPARENT etc. although these are alwasy set new.
if resolve then
- -- resolvers.luacnfspec = resolvers.joinpath(resolvers.resolve(resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))))
resolvers.luacnfspec = resolvers.resolve(resolvers.luacnfspec)
end
@@ -15316,7 +15262,7 @@ function resolvers.listers.variables(pattern)
report_lists(" env: %s",tabstr(rawget(environment,key)) or "unset")
report_lists(" var: %s",tabstr(configured[key]) or "unset")
report_lists(" exp: %s",tabstr(expansions[key]) or "unset")
- report_lists(" res: %s",tabstr(resolvers.resolve(expansions[key])) or "unset")
+ report_lists(" res: %s",resolvers.resolve(expansions[key]) or "unset")
end
end
instance.environment = fastcopy(env)
@@ -15328,17 +15274,7 @@ function resolvers.listers.configurations(report)
local configurations = resolvers.instance.specification
local report = report or texio.write_nl
for i=1,#configurations do
- report(format("file : %s",resolvers.resolve(configurations[i])))
- end
- report("")
- local list = resolvers.expandedpathfromlist(resolvers.splitpath(resolvers.luacnfspec))
- for i=1,#list do
- local li = resolvers.resolve(list[i])
- if lfs.isdir(li) then
- report(format("path - %s",li))
- else
- report(format("path + %s",li))
- end
+ report(resolvers.resolve(configurations[i]))
end
end
@@ -16680,7 +16616,7 @@ elseif e_argument("find-path") then
elseif e_argument("expand-braces") then
- -- luatools: runners.execute_ctx_script("mtx-base","--expand-braces",filename
+ -- luatools: runners.execute_ctx_script("mtx-base","--expand-braces",filename)
resolvers.load("nofiles")
runners.register_arguments(filename)