diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/context/lua/mtx-install.lua | 2 | ||||
-rw-r--r-- | scripts/context/lua/mtx-update.lua | 128 | ||||
-rw-r--r-- | scripts/context/lua/mtxrun.lua | 27 | ||||
-rw-r--r-- | scripts/context/stubs/mswin/mtxrun.lua | 27 | ||||
-rw-r--r-- | scripts/context/stubs/unix/mtxrun | 27 | ||||
-rw-r--r-- | scripts/context/stubs/win64/mtxrun.lua | 27 |
6 files changed, 191 insertions, 47 deletions
diff --git a/scripts/context/lua/mtx-install.lua b/scripts/context/lua/mtx-install.lua index cf6ba4e98..5395ff6ee 100644 --- a/scripts/context/lua/mtx-install.lua +++ b/scripts/context/lua/mtx-install.lua @@ -402,7 +402,7 @@ function install.update() local osplatform = environment.arguments.platform or nil local platform = platforms[osplatform or os.platform or ""] - if platform == "unknown" and osplatform then + if (platform == "unknown" or platform == "" or not platform) and osplatform then -- catches openbsdN.M kind of specifications platform = osplatform elseif not osplatform then diff --git a/scripts/context/lua/mtx-update.lua b/scripts/context/lua/mtx-update.lua index d9deb1b36..a3297e804 100644 --- a/scripts/context/lua/mtx-update.lua +++ b/scripts/context/lua/mtx-update.lua @@ -164,19 +164,72 @@ update.goodies = { }, } -update.platforms = { +-- update.platforms = { +-- ["mswin"] = "mswin", +-- ["windows"] = "mswin", +-- ["win32"] = "mswin", +-- ["win"] = "mswin", +-- -- ["mswin"] = "win32", +-- -- ["windows"] = "win32", +-- -- ["win32"] = "win32", +-- -- ["win"] = "win32", +-- -- +-- -- ["mswin-64"] = "mswin-64", +-- -- ["windows-64"] = "mswin-64", +-- -- ["win64"] = "mswin-64", +-- ["mswin-64"] = "win64", +-- ["windows-64"] = "win64", +-- ["win64"] = "win64", +-- -- +-- ["linux"] = "linux", +-- ["linux-32"] = "linux", +-- ["linux32"] = "linux", +-- -- +-- ["linux-64"] = "linux-64", +-- ["linux64"] = "linux-64", +-- -- +-- ["linuxmusl-64"] = "linuxmusl-64", +-- -- +-- ["linux-armhf"] = "linux-armhf", +-- -- +-- ["freebsd"] = "freebsd", +-- -- +-- ["freebsd-amd64"] = "freebsd-amd64", +-- -- +-- ["kfreebsd"] = "kfreebsd-i386", +-- ["kfreebsd-i386"] = "kfreebsd-i386", +-- -- +-- ["kfreebsd-amd64"] = "kfreebsd-amd64", +-- -- +-- ["linux-ppc"] = "linux-ppc", +-- ["ppc"] = "linux-ppc", +-- -- +-- ["osx"] = "osx-intel", +-- ["macosx"] = "osx-intel", +-- ["osx-intel"] = "osx-intel", +-- ["osxintel"] = "osx-intel", +-- -- +-- ["osx-ppc"] = "osx-ppc", +-- ["osx-powerpc"] = "osx-ppc", +-- ["osxppc"] = "osx-ppc", +-- ["osxpowerpc"] = "osx-ppc", +-- -- +-- ["osx-64"] = "osx-64", +-- -- +-- ["solaris-intel"] = "solaris-intel", +-- -- +-- ["solaris-sparc"] = "solaris-sparc", +-- ["solaris"] = "solaris-sparc", +-- -- +-- ["unknown"] = "unknown", +-- } + +local platforms = { ["mswin"] = "mswin", ["windows"] = "mswin", ["win32"] = "mswin", ["win"] = "mswin", - -- ["mswin"] = "win32", - -- ["windows"] = "win32", - -- ["win32"] = "win32", - -- ["win"] = "win32", -- - -- ["mswin-64"] = "mswin-64", - -- ["windows-64"] = "mswin-64", - -- ["win64"] = "mswin-64", ["mswin-64"] = "win64", ["windows-64"] = "win64", ["win64"] = "win64", @@ -192,34 +245,39 @@ update.platforms = { -- ["linux-armhf"] = "linux-armhf", -- - ["freebsd"] = "freebsd", + ["openbsd"] = "openbsd6.5", + ["openbsd-i386"] = "openbsd6.5", + ["openbsd-amd64"] = "openbsd6.5-amd64", -- + ["freebsd"] = "freebsd", + ["freebsd-i386"] = "freebsd", ["freebsd-amd64"] = "freebsd-amd64", -- - ["kfreebsd"] = "kfreebsd-i386", - ["kfreebsd-i386"] = "kfreebsd-i386", - -- - ["kfreebsd-amd64"] = "kfreebsd-amd64", + -- ["kfreebsd"] = "kfreebsd-i386", + -- ["kfreebsd-i386"] = "kfreebsd-i386", + -- ["kfreebsd-amd64"] = "kfreebsd-amd64", -- - ["linux-ppc"] = "linux-ppc", - ["ppc"] = "linux-ppc", + -- ["linux-ppc"] = "linux-ppc", + -- ["ppc"] = "linux-ppc", -- - ["osx"] = "osx-intel", - ["macosx"] = "osx-intel", - ["osx-intel"] = "osx-intel", - ["osxintel"] = "osx-intel", + -- ["osx"] = "osx-intel", + -- ["macosx"] = "osx-intel", + -- ["osx-intel"] = "osx-intel", + -- ["osxintel"] = "osx-intel", -- - ["osx-ppc"] = "osx-ppc", - ["osx-powerpc"] = "osx-ppc", - ["osxppc"] = "osx-ppc", - ["osxpowerpc"] = "osx-ppc", + -- ["osx-ppc"] = "osx-ppc", + -- ["osx-powerpc"] = "osx-ppc", + -- ["osxppc"] = "osx-ppc", + -- ["osxpowerpc"] = "osx-ppc", -- + ["macosx"] = "osx-64", + ["osx"] = "osx-64", ["osx-64"] = "osx-64", -- - ["solaris-intel"] = "solaris-intel", + -- ["solaris-intel"] = "solaris-intel", -- - ["solaris-sparc"] = "solaris-sparc", - ["solaris"] = "solaris-sparc", + -- ["solaris-sparc"] = "solaris-sparc", + -- ["solaris"] = "solaris-sparc", -- ["unknown"] = "unknown", } @@ -652,15 +710,33 @@ if scripts.savestate then end end + -- old + local valid = update.platforms for r in gmatch(environment.argument("platform") or os.platform,"([^, ]+)") do if valid[r] then states.set("platforms." .. r, true) end end + -- new + +-- local osplatform = environment.arguments.platform or nil +-- local platform = platforms[osplatform or os.platform or ""] +-- +-- if (platform == "unknown" or platform == "" or not platform) and osplatform then +-- -- catches openbsdN.M kind of specifications +-- platform = osplatform +-- elseif not osplatform then +-- osplatform = platform +-- end +-- states.set("platforms." .. platform, true) end + + -- so far + local valid = table.tohash(update.texformats) for r in gmatch(environment.argument("formats") or "","([^, ]+)") do if valid[r] then states.set("formats." .. r, true) end end + -- local valid = table.tohash(update.mpformats) -- for r in gmatch(environment.argument("formats") or "","([^, ]+)") do -- if valid[r] then states.set("formats." .. r, true) end diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index 95df13f9f..0fd5404d7 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -17843,7 +17843,7 @@ do -- create closure to overcome 200 locals limit package.loaded["lxml-lpt"] = package.loaded["lxml-lpt"] or true --- original size: 55145, stripped down to: 30992 +-- original size: 54626, stripped down to: 31255 if not modules then modules={} end modules ['lxml-lpt']={ version=1.001, @@ -18325,6 +18325,8 @@ local builtin={ lastindex="(#ll.__p__.dt or 1)", lastelement="(ll.__p__.en or 1)", last="#list", + list="list", + self="ll", rootposition="order", order="order", element="(ll.ei or 1)", @@ -18433,7 +18435,8 @@ local function register_selector(specification) end local function register_expression(expression) local converted=lpegmatch(converter,expression) - local runner=load(format(template_e,converted)) + local wrapped=format(template_e,converted) + local runner=load(wrapped) runner=(runner and runner()) or function() errorrunner_e(expression,converted) end return { kind="expression",expression=expression,converted=converted,evaluator=runner } end @@ -18805,6 +18808,20 @@ expressions.count=function(e,pattern) local collected=applylpath(e,pattern) return pattern and (collected and #collected) or 0 end +expressions.attribute=function(e,name,value) + if type(e)=="table" and name then + local a=e.at + if a then + local v=a[name] + if value then + return v==value + else + return v + end + end + end + return nil +end expressions.oneof=function(s,...) for i=1,select("#",...) do if s==select(i,...) then @@ -18851,7 +18868,7 @@ function expressions.contains(str,pattern) end return false end -function xml.expressions.idstring(str) +function expressions.idstring(str) return type(str)=="string" and gsub(str,"^#","") or "" end local function traverse(root,pattern,handle) @@ -25840,8 +25857,8 @@ end -- of closure -- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua -- skipped libraries : - --- original bytes : 1031236 --- stripped bytes : 408771 +-- original bytes : 1030717 +-- stripped bytes : 407989 -- end library merge diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua index 95df13f9f..0fd5404d7 100644 --- a/scripts/context/stubs/mswin/mtxrun.lua +++ b/scripts/context/stubs/mswin/mtxrun.lua @@ -17843,7 +17843,7 @@ do -- create closure to overcome 200 locals limit package.loaded["lxml-lpt"] = package.loaded["lxml-lpt"] or true --- original size: 55145, stripped down to: 30992 +-- original size: 54626, stripped down to: 31255 if not modules then modules={} end modules ['lxml-lpt']={ version=1.001, @@ -18325,6 +18325,8 @@ local builtin={ lastindex="(#ll.__p__.dt or 1)", lastelement="(ll.__p__.en or 1)", last="#list", + list="list", + self="ll", rootposition="order", order="order", element="(ll.ei or 1)", @@ -18433,7 +18435,8 @@ local function register_selector(specification) end local function register_expression(expression) local converted=lpegmatch(converter,expression) - local runner=load(format(template_e,converted)) + local wrapped=format(template_e,converted) + local runner=load(wrapped) runner=(runner and runner()) or function() errorrunner_e(expression,converted) end return { kind="expression",expression=expression,converted=converted,evaluator=runner } end @@ -18805,6 +18808,20 @@ expressions.count=function(e,pattern) local collected=applylpath(e,pattern) return pattern and (collected and #collected) or 0 end +expressions.attribute=function(e,name,value) + if type(e)=="table" and name then + local a=e.at + if a then + local v=a[name] + if value then + return v==value + else + return v + end + end + end + return nil +end expressions.oneof=function(s,...) for i=1,select("#",...) do if s==select(i,...) then @@ -18851,7 +18868,7 @@ function expressions.contains(str,pattern) end return false end -function xml.expressions.idstring(str) +function expressions.idstring(str) return type(str)=="string" and gsub(str,"^#","") or "" end local function traverse(root,pattern,handle) @@ -25840,8 +25857,8 @@ end -- of closure -- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua -- skipped libraries : - --- original bytes : 1031236 --- stripped bytes : 408771 +-- original bytes : 1030717 +-- stripped bytes : 407989 -- end library merge diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun index 95df13f9f..0fd5404d7 100644 --- a/scripts/context/stubs/unix/mtxrun +++ b/scripts/context/stubs/unix/mtxrun @@ -17843,7 +17843,7 @@ do -- create closure to overcome 200 locals limit package.loaded["lxml-lpt"] = package.loaded["lxml-lpt"] or true --- original size: 55145, stripped down to: 30992 +-- original size: 54626, stripped down to: 31255 if not modules then modules={} end modules ['lxml-lpt']={ version=1.001, @@ -18325,6 +18325,8 @@ local builtin={ lastindex="(#ll.__p__.dt or 1)", lastelement="(ll.__p__.en or 1)", last="#list", + list="list", + self="ll", rootposition="order", order="order", element="(ll.ei or 1)", @@ -18433,7 +18435,8 @@ local function register_selector(specification) end local function register_expression(expression) local converted=lpegmatch(converter,expression) - local runner=load(format(template_e,converted)) + local wrapped=format(template_e,converted) + local runner=load(wrapped) runner=(runner and runner()) or function() errorrunner_e(expression,converted) end return { kind="expression",expression=expression,converted=converted,evaluator=runner } end @@ -18805,6 +18808,20 @@ expressions.count=function(e,pattern) local collected=applylpath(e,pattern) return pattern and (collected and #collected) or 0 end +expressions.attribute=function(e,name,value) + if type(e)=="table" and name then + local a=e.at + if a then + local v=a[name] + if value then + return v==value + else + return v + end + end + end + return nil +end expressions.oneof=function(s,...) for i=1,select("#",...) do if s==select(i,...) then @@ -18851,7 +18868,7 @@ function expressions.contains(str,pattern) end return false end -function xml.expressions.idstring(str) +function expressions.idstring(str) return type(str)=="string" and gsub(str,"^#","") or "" end local function traverse(root,pattern,handle) @@ -25840,8 +25857,8 @@ end -- of closure -- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua -- skipped libraries : - --- original bytes : 1031236 --- stripped bytes : 408771 +-- original bytes : 1030717 +-- stripped bytes : 407989 -- end library merge diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua index 95df13f9f..0fd5404d7 100644 --- a/scripts/context/stubs/win64/mtxrun.lua +++ b/scripts/context/stubs/win64/mtxrun.lua @@ -17843,7 +17843,7 @@ do -- create closure to overcome 200 locals limit package.loaded["lxml-lpt"] = package.loaded["lxml-lpt"] or true --- original size: 55145, stripped down to: 30992 +-- original size: 54626, stripped down to: 31255 if not modules then modules={} end modules ['lxml-lpt']={ version=1.001, @@ -18325,6 +18325,8 @@ local builtin={ lastindex="(#ll.__p__.dt or 1)", lastelement="(ll.__p__.en or 1)", last="#list", + list="list", + self="ll", rootposition="order", order="order", element="(ll.ei or 1)", @@ -18433,7 +18435,8 @@ local function register_selector(specification) end local function register_expression(expression) local converted=lpegmatch(converter,expression) - local runner=load(format(template_e,converted)) + local wrapped=format(template_e,converted) + local runner=load(wrapped) runner=(runner and runner()) or function() errorrunner_e(expression,converted) end return { kind="expression",expression=expression,converted=converted,evaluator=runner } end @@ -18805,6 +18808,20 @@ expressions.count=function(e,pattern) local collected=applylpath(e,pattern) return pattern and (collected and #collected) or 0 end +expressions.attribute=function(e,name,value) + if type(e)=="table" and name then + local a=e.at + if a then + local v=a[name] + if value then + return v==value + else + return v + end + end + end + return nil +end expressions.oneof=function(s,...) for i=1,select("#",...) do if s==select(i,...) then @@ -18851,7 +18868,7 @@ function expressions.contains(str,pattern) end return false end -function xml.expressions.idstring(str) +function expressions.idstring(str) return type(str)=="string" and gsub(str,"^#","") or "" end local function traverse(root,pattern,handle) @@ -25840,8 +25857,8 @@ end -- of closure -- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua -- skipped libraries : - --- original bytes : 1031236 --- stripped bytes : 408771 +-- original bytes : 1030717 +-- stripped bytes : 407989 -- end library merge |