diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/context/lua/mtx-install.lua | 41 | ||||
-rw-r--r-- | scripts/context/lua/mtxrun.lua | 60 | ||||
-rw-r--r-- | scripts/context/stubs/install/first-setup.sh | 23 | ||||
-rw-r--r-- | scripts/context/stubs/mswin/mtxrun.lua | 60 | ||||
-rw-r--r-- | scripts/context/stubs/unix/mtxrun | 60 | ||||
-rw-r--r-- | scripts/context/stubs/win64/mtxrun.lua | 60 |
6 files changed, 257 insertions, 47 deletions
diff --git a/scripts/context/lua/mtx-install.lua b/scripts/context/lua/mtx-install.lua index 49a912291..fee1ce4d6 100644 --- a/scripts/context/lua/mtx-install.lua +++ b/scripts/context/lua/mtx-install.lua @@ -90,34 +90,39 @@ local 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", } diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index 997fbcaec..1f7be7b72 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -8407,7 +8407,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-sac"] = package.loaded["util-sac"] or true --- original size: 11332, stripped down to: 8420 +-- original size: 12898, stripped down to: 9275 if not modules then modules={} end modules ['util-sac']={ version=1.001, @@ -8442,6 +8442,7 @@ end function streams.size(f) return f and f[3] or 0 end +streams.getsize=streams.size function streams.setposition(f,i) if f[4] then if i<=0 then @@ -8826,6 +8827,50 @@ else return t end end +do + local files=utilities.files + if files then + local openfile=files.open + local openstream=streams.open + local openstring=streams.openstring + local setmetatable=setmetatable + function io.newreader(str,method) + local f,m + if method=="string" then + f=openstring(str) + m=streams + elseif method=="stream" then + f=openstream(str) + m=streams + else + f=openfile(str,"rb") + m=files + end + if f then + local t={} + setmetatable(t,{ + __index=function(t,k) + local r=m[k] + if k=="close" then + if f then + m.close(f) + f=nil + end + return function() end + elseif r then + local v=function(_,a,b) return r(f,a,b) end + t[k]=v + return v + else + print("unknown key",k) + end + end + } ) + return t + end + end + end +end end -- of closure @@ -14119,7 +14164,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-lua"] = package.loaded["util-lua"] or true --- original size: 6778, stripped down to: 4699 +-- original size: 7149, stripped down to: 4997 if not modules then modules={} end modules ['util-lua']={ version=1.001, @@ -14144,6 +14189,11 @@ luautilities.nofstrippedchunks=0 luautilities.nofstrippedbytes=0 local strippedchunks={} luautilities.strippedchunks=strippedchunks +if not LUATEXENGINE then + LUATEXENGINE=status.luatex_engine and string.lower(status.luatex_engine) + JITSUPPORTED=LUATEXENGINE=="luajittex" or jit + CONTEXTLMTXMODE=CONTEXTLMTXMODE or (LUATEXENGINE=="luametatex" and 1) or 0 +end luautilities.suffixes={ tma="tma", tmc=(CONTEXTLMTXMODE and CONTEXTLMTXMODE>0 and "tmd") or (jit and "tmb") or "tmc", @@ -14153,7 +14203,7 @@ luautilities.suffixes={ luv="luv", luj="luj", tua="tua", - tuc="tuc", + tuc=(CONTEXTLMTXMODE and CONTEXTLMTXMODE>0 and "tud") or (jit and "tub") or "tuc", } local function register(name) if tracestripping then @@ -25733,8 +25783,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 : 1027480 --- stripped bytes : 407301 +-- original bytes : 1029417 +-- stripped bytes : 408085 -- end library merge diff --git a/scripts/context/stubs/install/first-setup.sh b/scripts/context/stubs/install/first-setup.sh index 71fe32c16..83af6a97e 100644 --- a/scripts/context/stubs/install/first-setup.sh +++ b/scripts/context/stubs/install/first-setup.sh @@ -48,7 +48,7 @@ case "$system" in # a) binutils, this should work almost everywhere if $(which readelf >/dev/null 2>&1); then readelf -A /proc/self/exe | grep -q '^ \+Tag_ABI_VFP_args' - if [ ! $? ]; then + if [ $? != 0 ]; then platform="linux-armel" fi # b) debian-specific fallback @@ -86,16 +86,18 @@ case "$system" in esac ;; # OpenBSD OpenBSD) + version=`uname -r` case "$cpu" in - i*86) platform="openbsd" ;; - amd64) platform="openbsd-amd64" ;; + i*86) platform="openbsd${version}" ;; + amd64) platform="openbsd${version}-amd64" ;; *) platform="unknown" ;; esac ;; # cygwin CYGWIN*) case "$cpu" in - i*86) platform="cygwin" ;; - x86_64|ia64) platform="cygwin" ;; + i*86) platform="mswin" ;; # cygwin + # Pavneet Arora. 20190924. For Cygwin 64-bit platform should be win64. + x86_64|ia64) platform="win64" ;; # cygwin-64 *) platform="unknown" ;; esac ;; # UWIN @@ -145,15 +147,18 @@ fi rsync -rlptv rsync://contextgarden.net/minimals/setup/$platform/bin . # use native windows binaries on cygwin -if test "$platform" = "cygwin" ; then - platform=mswin -fi +# Pavneet Arora. 20190924. +# ..Commented out the following section entirely. +#if test "$platform" = "cygwin" ; then +# platform=mswin +#fi # download or update the distribution # you may remove the --context=beta switch if you want to use "current" # you can use --engine=luatex if you want just mkiv env PATH="$PWD/bin:$CONTEXTROOT/texmf-$platform/bin:$PATH" MTX_PLATFORM="$platform" \ -./bin/mtxrun --script ./bin/mtx-update.lua --force --update --make --context=beta --platform="$platform" --texroot="$CONTEXTROOT" $@ +./bin/mtxrun --script ./bin/mtx-update.lua --force --update --make --context=beta --engine=luatex --platform="$platform" --texroot="$CONTEXTROOT" $@ +echo "./bin/mtxrun --script ./bin/mtx-update.lua --force --update --make --context=beta --engine=luatex --platform=\"$platform\" --texroot=\"$CONTEXTROOT\" $@" echo echo "When you want to use context, you need to initialize the tree by typing:" diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua index 997fbcaec..1f7be7b72 100644 --- a/scripts/context/stubs/mswin/mtxrun.lua +++ b/scripts/context/stubs/mswin/mtxrun.lua @@ -8407,7 +8407,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-sac"] = package.loaded["util-sac"] or true --- original size: 11332, stripped down to: 8420 +-- original size: 12898, stripped down to: 9275 if not modules then modules={} end modules ['util-sac']={ version=1.001, @@ -8442,6 +8442,7 @@ end function streams.size(f) return f and f[3] or 0 end +streams.getsize=streams.size function streams.setposition(f,i) if f[4] then if i<=0 then @@ -8826,6 +8827,50 @@ else return t end end +do + local files=utilities.files + if files then + local openfile=files.open + local openstream=streams.open + local openstring=streams.openstring + local setmetatable=setmetatable + function io.newreader(str,method) + local f,m + if method=="string" then + f=openstring(str) + m=streams + elseif method=="stream" then + f=openstream(str) + m=streams + else + f=openfile(str,"rb") + m=files + end + if f then + local t={} + setmetatable(t,{ + __index=function(t,k) + local r=m[k] + if k=="close" then + if f then + m.close(f) + f=nil + end + return function() end + elseif r then + local v=function(_,a,b) return r(f,a,b) end + t[k]=v + return v + else + print("unknown key",k) + end + end + } ) + return t + end + end + end +end end -- of closure @@ -14119,7 +14164,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-lua"] = package.loaded["util-lua"] or true --- original size: 6778, stripped down to: 4699 +-- original size: 7149, stripped down to: 4997 if not modules then modules={} end modules ['util-lua']={ version=1.001, @@ -14144,6 +14189,11 @@ luautilities.nofstrippedchunks=0 luautilities.nofstrippedbytes=0 local strippedchunks={} luautilities.strippedchunks=strippedchunks +if not LUATEXENGINE then + LUATEXENGINE=status.luatex_engine and string.lower(status.luatex_engine) + JITSUPPORTED=LUATEXENGINE=="luajittex" or jit + CONTEXTLMTXMODE=CONTEXTLMTXMODE or (LUATEXENGINE=="luametatex" and 1) or 0 +end luautilities.suffixes={ tma="tma", tmc=(CONTEXTLMTXMODE and CONTEXTLMTXMODE>0 and "tmd") or (jit and "tmb") or "tmc", @@ -14153,7 +14203,7 @@ luautilities.suffixes={ luv="luv", luj="luj", tua="tua", - tuc="tuc", + tuc=(CONTEXTLMTXMODE and CONTEXTLMTXMODE>0 and "tud") or (jit and "tub") or "tuc", } local function register(name) if tracestripping then @@ -25733,8 +25783,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 : 1027480 --- stripped bytes : 407301 +-- original bytes : 1029417 +-- stripped bytes : 408085 -- end library merge diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun index 997fbcaec..1f7be7b72 100644 --- a/scripts/context/stubs/unix/mtxrun +++ b/scripts/context/stubs/unix/mtxrun @@ -8407,7 +8407,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-sac"] = package.loaded["util-sac"] or true --- original size: 11332, stripped down to: 8420 +-- original size: 12898, stripped down to: 9275 if not modules then modules={} end modules ['util-sac']={ version=1.001, @@ -8442,6 +8442,7 @@ end function streams.size(f) return f and f[3] or 0 end +streams.getsize=streams.size function streams.setposition(f,i) if f[4] then if i<=0 then @@ -8826,6 +8827,50 @@ else return t end end +do + local files=utilities.files + if files then + local openfile=files.open + local openstream=streams.open + local openstring=streams.openstring + local setmetatable=setmetatable + function io.newreader(str,method) + local f,m + if method=="string" then + f=openstring(str) + m=streams + elseif method=="stream" then + f=openstream(str) + m=streams + else + f=openfile(str,"rb") + m=files + end + if f then + local t={} + setmetatable(t,{ + __index=function(t,k) + local r=m[k] + if k=="close" then + if f then + m.close(f) + f=nil + end + return function() end + elseif r then + local v=function(_,a,b) return r(f,a,b) end + t[k]=v + return v + else + print("unknown key",k) + end + end + } ) + return t + end + end + end +end end -- of closure @@ -14119,7 +14164,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-lua"] = package.loaded["util-lua"] or true --- original size: 6778, stripped down to: 4699 +-- original size: 7149, stripped down to: 4997 if not modules then modules={} end modules ['util-lua']={ version=1.001, @@ -14144,6 +14189,11 @@ luautilities.nofstrippedchunks=0 luautilities.nofstrippedbytes=0 local strippedchunks={} luautilities.strippedchunks=strippedchunks +if not LUATEXENGINE then + LUATEXENGINE=status.luatex_engine and string.lower(status.luatex_engine) + JITSUPPORTED=LUATEXENGINE=="luajittex" or jit + CONTEXTLMTXMODE=CONTEXTLMTXMODE or (LUATEXENGINE=="luametatex" and 1) or 0 +end luautilities.suffixes={ tma="tma", tmc=(CONTEXTLMTXMODE and CONTEXTLMTXMODE>0 and "tmd") or (jit and "tmb") or "tmc", @@ -14153,7 +14203,7 @@ luautilities.suffixes={ luv="luv", luj="luj", tua="tua", - tuc="tuc", + tuc=(CONTEXTLMTXMODE and CONTEXTLMTXMODE>0 and "tud") or (jit and "tub") or "tuc", } local function register(name) if tracestripping then @@ -25733,8 +25783,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 : 1027480 --- stripped bytes : 407301 +-- original bytes : 1029417 +-- stripped bytes : 408085 -- end library merge diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua index 997fbcaec..1f7be7b72 100644 --- a/scripts/context/stubs/win64/mtxrun.lua +++ b/scripts/context/stubs/win64/mtxrun.lua @@ -8407,7 +8407,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-sac"] = package.loaded["util-sac"] or true --- original size: 11332, stripped down to: 8420 +-- original size: 12898, stripped down to: 9275 if not modules then modules={} end modules ['util-sac']={ version=1.001, @@ -8442,6 +8442,7 @@ end function streams.size(f) return f and f[3] or 0 end +streams.getsize=streams.size function streams.setposition(f,i) if f[4] then if i<=0 then @@ -8826,6 +8827,50 @@ else return t end end +do + local files=utilities.files + if files then + local openfile=files.open + local openstream=streams.open + local openstring=streams.openstring + local setmetatable=setmetatable + function io.newreader(str,method) + local f,m + if method=="string" then + f=openstring(str) + m=streams + elseif method=="stream" then + f=openstream(str) + m=streams + else + f=openfile(str,"rb") + m=files + end + if f then + local t={} + setmetatable(t,{ + __index=function(t,k) + local r=m[k] + if k=="close" then + if f then + m.close(f) + f=nil + end + return function() end + elseif r then + local v=function(_,a,b) return r(f,a,b) end + t[k]=v + return v + else + print("unknown key",k) + end + end + } ) + return t + end + end + end +end end -- of closure @@ -14119,7 +14164,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-lua"] = package.loaded["util-lua"] or true --- original size: 6778, stripped down to: 4699 +-- original size: 7149, stripped down to: 4997 if not modules then modules={} end modules ['util-lua']={ version=1.001, @@ -14144,6 +14189,11 @@ luautilities.nofstrippedchunks=0 luautilities.nofstrippedbytes=0 local strippedchunks={} luautilities.strippedchunks=strippedchunks +if not LUATEXENGINE then + LUATEXENGINE=status.luatex_engine and string.lower(status.luatex_engine) + JITSUPPORTED=LUATEXENGINE=="luajittex" or jit + CONTEXTLMTXMODE=CONTEXTLMTXMODE or (LUATEXENGINE=="luametatex" and 1) or 0 +end luautilities.suffixes={ tma="tma", tmc=(CONTEXTLMTXMODE and CONTEXTLMTXMODE>0 and "tmd") or (jit and "tmb") or "tmc", @@ -14153,7 +14203,7 @@ luautilities.suffixes={ luv="luv", luj="luj", tua="tua", - tuc="tuc", + tuc=(CONTEXTLMTXMODE and CONTEXTLMTXMODE>0 and "tud") or (jit and "tub") or "tuc", } local function register(name) if tracestripping then @@ -25733,8 +25783,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 : 1027480 --- stripped bytes : 407301 +-- original bytes : 1029417 +-- stripped bytes : 408085 -- end library merge |