From 9e2c13b12ff90635be145c6c02e21d6e9583037f Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Wed, 19 Oct 2016 23:19:58 +0200 Subject: 2016-10-19 22:59:00 --- scripts/context/lua/mtx-context.lua | 4 ++ scripts/context/lua/mtxrun.lua | 62 +++++++++++++++------------- scripts/context/stubs/install/first-setup.sh | 62 ++++++++++++++++++++++------ scripts/context/stubs/mswin/mtxrun.lua | 62 +++++++++++++++------------- scripts/context/stubs/unix/mtxrun | 62 +++++++++++++++------------- scripts/context/stubs/win64/mtxrun.lua | 62 +++++++++++++++------------- 6 files changed, 185 insertions(+), 129 deletions(-) (limited to 'scripts') diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua index c65828622..294b763c6 100644 --- a/scripts/context/lua/mtx-context.lua +++ b/scripts/context/lua/mtx-context.lua @@ -1709,6 +1709,10 @@ end -- getting it done +if getargument("timedlog") then + logs.settimedlog() +end + if getargument("nostats") then setargument("nostatistics",true) setargument("nostat",nil) diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index 79a83fb41..d13a290a5 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -6684,7 +6684,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-fil"] = package.loaded["util-fil"] or true --- original size: 5725, stripped down to: 4416 +-- original size: 5809, stripped down to: 4470 if not modules then modules={} end modules ['util-fil']={ version=1.001, @@ -6695,7 +6695,7 @@ if not modules then modules={} end modules ['util-fil']={ } local byte=string.byte local char=string.char -local extract=bit32.extract +local extract=bit32 and bit32.extract local floor=math.floor utilities=utilities or {} local files={} @@ -6857,16 +6857,18 @@ function files.readfixed4(f) return n+(0x100*c+d)/0xFFFF end end -function files.read2dot14(f) - local a,b=byte(f:read(2),1,2) - local n=0x100*a+b - local m=extract(n,0,30) - if n>0x7FFF then - n=extract(n,30,2) - return m/0x4000-4 - else - n=extract(n,30,2) - return n+m/0x4000 +if extract then + function files.read2dot14(f) + local a,b=byte(f:read(2),1,2) + local n=0x100*a+b + local m=extract(n,0,30) + if n>0x7FFF then + n=extract(n,30,2) + return m/0x4000-4 + else + n=extract(n,30,2) + return n+m/0x4000 + end end end function files.skipshort(f,n) @@ -6905,7 +6907,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-sac"] = package.loaded["util-sac"] or true --- original size: 4264, stripped down to: 3349 +-- original size: 4360, stripped down to: 3409 if not modules then modules={} end modules ['util-sac']={ version=1.001, @@ -6915,7 +6917,7 @@ if not modules then modules={} end modules ['util-sac']={ license="see context related readme files" } local byte,sub=string.byte,string.sub -local extract=bit32.extract +local extract=bit32 and bit32.extract utilities=utilities or {} local streams={} utilities.streams=streams @@ -7057,19 +7059,21 @@ function streams.readfixed4(f) return n+(0x100*c+d)/0xFFFF end end -function streams.read2dot14(f) - local i=f[2] - local j=i+1 - f[2]=j+1 - local a,b=byte(f[1],i,j) - local n=0x100*a+b - local m=extract(n,0,30) - if n>0x7FFF then - n=extract(n,30,2) - return m/0x4000-4 - else - n=extract(n,30,2) - return n+m/0x4000 +if extract then + function streams.read2dot14(f) + local i=f[2] + local j=i+1 + f[2]=j+1 + local a,b=byte(f[1],i,j) + local n=0x100*a+b + local m=extract(n,0,30) + if n>0x7FFF then + n=extract(n,30,2) + return m/0x4000-4 + else + n=extract(n,30,2) + return n+m/0x4000 + end end end function streams.skipshort(f,n) @@ -18996,8 +19000,8 @@ end -- of closure -- used libraries : l-lua.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-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 trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.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 : 806648 --- stripped bytes : 292918 +-- original bytes : 806828 +-- stripped bytes : 292984 -- end library merge diff --git a/scripts/context/stubs/install/first-setup.sh b/scripts/context/stubs/install/first-setup.sh index 9249fd2e0..ea72d55d4 100644 --- a/scripts/context/stubs/install/first-setup.sh +++ b/scripts/context/stubs/install/first-setup.sh @@ -5,14 +5,11 @@ # you may change this if you want ... CONTEXTROOT="$PWD/tex" -# suggested by Tobias Florek to check for ruby & rsync +# suggested by Tobias Florek to check for rsync if [ ! -x "`which rsync`" ]; then echo "You need to install rsync first." exit 1 fi -if [ ! -x "`which ruby`" ]; then - echo "You might want to install Ruby first if you want to use pdfTeX or XeTeX." -fi system=`uname -s` cpu=`uname -m` @@ -23,11 +20,32 @@ case "$system" in case "$cpu" in i*86) platform="linux" ;; x86_64|ia64) platform="linux-64" ;; + # a little bit of cheating with ppc64 (won't work on Gentoo) ppc|ppc64) platform="linux-ppc" ;; + # we currently support just mipsel, but Debian is lying (reports mips64) # we need more hacks to fix the situation, this is just a temporary solution mips|mips64|mipsel|mips64el) platform="linux-mipsel" ;; + + armv7l) platform="linux-armhf" + # machine id output by uname(1) is insufficent to determine whether this + # is a soft or hard float system so we check ourselves. + # 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 + platform="linux-armel" + fi + # b) debian-specific fallback + elif $(which dpkg >/dev/null 2>&1); then + if [ "$(dpkg --print-architecture)" = armel ]; then + platform="linux-armel" + fi + fi + # else go with hard fp + ;; + *) platform="unknown" ;; esac ;; # Mac OS X @@ -49,15 +67,29 @@ case "$system" in # kFreeBSD (debian) GNU/kFreeBSD) case "$cpu" in - i*86) platform="kfreebsd-i386" ;; - x86_64|amd64) platform="kfreebsd-amd64" ;; + #i*86) platform="kfreebsd-i386" ;; + #x86_64|amd64) platform="kfreebsd-amd64" ;; *) platform="unknown" ;; esac ;; # cygwin + # OpenBSD + OpenBSD|freebsd) + case "$cpu" in + i*86) platform="openbsd" ;; + x86_64) platform="openbsd" ;; # no special binaries are available yet + amd64) platform="openbsd-amd64" ;; + *) platform="unknown" ;; + esac ;; CYGWIN*) case "$cpu" in i*86) platform="cygwin" ;; - x86_64|ia64) platform="cygwin-64" ;; + x86_64|ia64) platform="cygwin" ;; + *) platform="unknown" ;; + esac ;; + # UWIN + UWIN*) + case "$cpu" in + i*86) platform="mswin" ;; *) platform="unknown" ;; esac ;; # SunOS/Solaris @@ -87,6 +119,10 @@ if test "$platform" = "unknown" ; then echo "Error: your system \"$system $cpu\" is not supported yet." echo "Please report to the ConTeXt mailing-list (ntg-context@ntg.nl)" exit +elif test "$platform" = "linux-ppc" ; then + echo "Error: support for your system \"$platform\" has been dropped." + echo "Please ask on to the ConTeXt mailing-list if you still need it (ntg-context@ntg.nl)" + exit fi # if you want to enforce some specific platform @@ -96,11 +132,16 @@ fi # download or rsync the latest scripts first rsync -rlptv rsync://contextgarden.net/minimals/setup/$platform/bin . +# use native windows binaries on cygwin +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" \ -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 --platform=$platform --texroot="$CONTEXTROOT" $@ echo echo "When you want to use context, you need to initialize the tree by typing:" @@ -113,8 +154,3 @@ echo "to PATH variable if you want to set it permanently." echo "This can usually be done in .bashrc, .bash_profile" echo "(or whatever file is used to initialize your shell)." echo - -if [ ! -x "`which ruby`" ]; then - echo "You might want to install Ruby first if you want to use pdfTeX or XeTeX." - echo -fi diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua index 79a83fb41..d13a290a5 100644 --- a/scripts/context/stubs/mswin/mtxrun.lua +++ b/scripts/context/stubs/mswin/mtxrun.lua @@ -6684,7 +6684,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-fil"] = package.loaded["util-fil"] or true --- original size: 5725, stripped down to: 4416 +-- original size: 5809, stripped down to: 4470 if not modules then modules={} end modules ['util-fil']={ version=1.001, @@ -6695,7 +6695,7 @@ if not modules then modules={} end modules ['util-fil']={ } local byte=string.byte local char=string.char -local extract=bit32.extract +local extract=bit32 and bit32.extract local floor=math.floor utilities=utilities or {} local files={} @@ -6857,16 +6857,18 @@ function files.readfixed4(f) return n+(0x100*c+d)/0xFFFF end end -function files.read2dot14(f) - local a,b=byte(f:read(2),1,2) - local n=0x100*a+b - local m=extract(n,0,30) - if n>0x7FFF then - n=extract(n,30,2) - return m/0x4000-4 - else - n=extract(n,30,2) - return n+m/0x4000 +if extract then + function files.read2dot14(f) + local a,b=byte(f:read(2),1,2) + local n=0x100*a+b + local m=extract(n,0,30) + if n>0x7FFF then + n=extract(n,30,2) + return m/0x4000-4 + else + n=extract(n,30,2) + return n+m/0x4000 + end end end function files.skipshort(f,n) @@ -6905,7 +6907,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-sac"] = package.loaded["util-sac"] or true --- original size: 4264, stripped down to: 3349 +-- original size: 4360, stripped down to: 3409 if not modules then modules={} end modules ['util-sac']={ version=1.001, @@ -6915,7 +6917,7 @@ if not modules then modules={} end modules ['util-sac']={ license="see context related readme files" } local byte,sub=string.byte,string.sub -local extract=bit32.extract +local extract=bit32 and bit32.extract utilities=utilities or {} local streams={} utilities.streams=streams @@ -7057,19 +7059,21 @@ function streams.readfixed4(f) return n+(0x100*c+d)/0xFFFF end end -function streams.read2dot14(f) - local i=f[2] - local j=i+1 - f[2]=j+1 - local a,b=byte(f[1],i,j) - local n=0x100*a+b - local m=extract(n,0,30) - if n>0x7FFF then - n=extract(n,30,2) - return m/0x4000-4 - else - n=extract(n,30,2) - return n+m/0x4000 +if extract then + function streams.read2dot14(f) + local i=f[2] + local j=i+1 + f[2]=j+1 + local a,b=byte(f[1],i,j) + local n=0x100*a+b + local m=extract(n,0,30) + if n>0x7FFF then + n=extract(n,30,2) + return m/0x4000-4 + else + n=extract(n,30,2) + return n+m/0x4000 + end end end function streams.skipshort(f,n) @@ -18996,8 +19000,8 @@ end -- of closure -- used libraries : l-lua.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-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 trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.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 : 806648 --- stripped bytes : 292918 +-- original bytes : 806828 +-- stripped bytes : 292984 -- end library merge diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun index 79a83fb41..d13a290a5 100644 --- a/scripts/context/stubs/unix/mtxrun +++ b/scripts/context/stubs/unix/mtxrun @@ -6684,7 +6684,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-fil"] = package.loaded["util-fil"] or true --- original size: 5725, stripped down to: 4416 +-- original size: 5809, stripped down to: 4470 if not modules then modules={} end modules ['util-fil']={ version=1.001, @@ -6695,7 +6695,7 @@ if not modules then modules={} end modules ['util-fil']={ } local byte=string.byte local char=string.char -local extract=bit32.extract +local extract=bit32 and bit32.extract local floor=math.floor utilities=utilities or {} local files={} @@ -6857,16 +6857,18 @@ function files.readfixed4(f) return n+(0x100*c+d)/0xFFFF end end -function files.read2dot14(f) - local a,b=byte(f:read(2),1,2) - local n=0x100*a+b - local m=extract(n,0,30) - if n>0x7FFF then - n=extract(n,30,2) - return m/0x4000-4 - else - n=extract(n,30,2) - return n+m/0x4000 +if extract then + function files.read2dot14(f) + local a,b=byte(f:read(2),1,2) + local n=0x100*a+b + local m=extract(n,0,30) + if n>0x7FFF then + n=extract(n,30,2) + return m/0x4000-4 + else + n=extract(n,30,2) + return n+m/0x4000 + end end end function files.skipshort(f,n) @@ -6905,7 +6907,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-sac"] = package.loaded["util-sac"] or true --- original size: 4264, stripped down to: 3349 +-- original size: 4360, stripped down to: 3409 if not modules then modules={} end modules ['util-sac']={ version=1.001, @@ -6915,7 +6917,7 @@ if not modules then modules={} end modules ['util-sac']={ license="see context related readme files" } local byte,sub=string.byte,string.sub -local extract=bit32.extract +local extract=bit32 and bit32.extract utilities=utilities or {} local streams={} utilities.streams=streams @@ -7057,19 +7059,21 @@ function streams.readfixed4(f) return n+(0x100*c+d)/0xFFFF end end -function streams.read2dot14(f) - local i=f[2] - local j=i+1 - f[2]=j+1 - local a,b=byte(f[1],i,j) - local n=0x100*a+b - local m=extract(n,0,30) - if n>0x7FFF then - n=extract(n,30,2) - return m/0x4000-4 - else - n=extract(n,30,2) - return n+m/0x4000 +if extract then + function streams.read2dot14(f) + local i=f[2] + local j=i+1 + f[2]=j+1 + local a,b=byte(f[1],i,j) + local n=0x100*a+b + local m=extract(n,0,30) + if n>0x7FFF then + n=extract(n,30,2) + return m/0x4000-4 + else + n=extract(n,30,2) + return n+m/0x4000 + end end end function streams.skipshort(f,n) @@ -18996,8 +19000,8 @@ end -- of closure -- used libraries : l-lua.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-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 trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.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 : 806648 --- stripped bytes : 292918 +-- original bytes : 806828 +-- stripped bytes : 292984 -- end library merge diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua index 79a83fb41..d13a290a5 100644 --- a/scripts/context/stubs/win64/mtxrun.lua +++ b/scripts/context/stubs/win64/mtxrun.lua @@ -6684,7 +6684,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-fil"] = package.loaded["util-fil"] or true --- original size: 5725, stripped down to: 4416 +-- original size: 5809, stripped down to: 4470 if not modules then modules={} end modules ['util-fil']={ version=1.001, @@ -6695,7 +6695,7 @@ if not modules then modules={} end modules ['util-fil']={ } local byte=string.byte local char=string.char -local extract=bit32.extract +local extract=bit32 and bit32.extract local floor=math.floor utilities=utilities or {} local files={} @@ -6857,16 +6857,18 @@ function files.readfixed4(f) return n+(0x100*c+d)/0xFFFF end end -function files.read2dot14(f) - local a,b=byte(f:read(2),1,2) - local n=0x100*a+b - local m=extract(n,0,30) - if n>0x7FFF then - n=extract(n,30,2) - return m/0x4000-4 - else - n=extract(n,30,2) - return n+m/0x4000 +if extract then + function files.read2dot14(f) + local a,b=byte(f:read(2),1,2) + local n=0x100*a+b + local m=extract(n,0,30) + if n>0x7FFF then + n=extract(n,30,2) + return m/0x4000-4 + else + n=extract(n,30,2) + return n+m/0x4000 + end end end function files.skipshort(f,n) @@ -6905,7 +6907,7 @@ do -- create closure to overcome 200 locals limit package.loaded["util-sac"] = package.loaded["util-sac"] or true --- original size: 4264, stripped down to: 3349 +-- original size: 4360, stripped down to: 3409 if not modules then modules={} end modules ['util-sac']={ version=1.001, @@ -6915,7 +6917,7 @@ if not modules then modules={} end modules ['util-sac']={ license="see context related readme files" } local byte,sub=string.byte,string.sub -local extract=bit32.extract +local extract=bit32 and bit32.extract utilities=utilities or {} local streams={} utilities.streams=streams @@ -7057,19 +7059,21 @@ function streams.readfixed4(f) return n+(0x100*c+d)/0xFFFF end end -function streams.read2dot14(f) - local i=f[2] - local j=i+1 - f[2]=j+1 - local a,b=byte(f[1],i,j) - local n=0x100*a+b - local m=extract(n,0,30) - if n>0x7FFF then - n=extract(n,30,2) - return m/0x4000-4 - else - n=extract(n,30,2) - return n+m/0x4000 +if extract then + function streams.read2dot14(f) + local i=f[2] + local j=i+1 + f[2]=j+1 + local a,b=byte(f[1],i,j) + local n=0x100*a+b + local m=extract(n,0,30) + if n>0x7FFF then + n=extract(n,30,2) + return m/0x4000-4 + else + n=extract(n,30,2) + return n+m/0x4000 + end end end function streams.skipshort(f,n) @@ -18996,8 +19000,8 @@ end -- of closure -- used libraries : l-lua.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-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 trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.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 : 806648 --- stripped bytes : 292918 +-- original bytes : 806828 +-- stripped bytes : 292984 -- end library merge -- cgit v1.2.3