diff options
author | Karl Berry <karl@freefriends.org> | 2016-05-05 22:12:02 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-05-05 22:12:02 +0000 |
commit | 3155ad2afcd7018662195b194e415a9e14e62d2a (patch) | |
tree | 4b8af85c3d71a3e46971af79ef211f84d86e62c7 /Build | |
parent | beca1fbcde73fa759a0e6567a580d8035c224eb3 (diff) |
luaotfload (5may16)
git-svn-id: svn://tug.org/texlive/trunk@40902 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rwxr-xr-x | Build/source/texk/texlive/linked_scripts/luaotfload/luaotfload-tool.lua | 95 | ||||
-rwxr-xr-x | Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl | 24 |
2 files changed, 67 insertions, 52 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/luaotfload/luaotfload-tool.lua b/Build/source/texk/texlive/linked_scripts/luaotfload/luaotfload-tool.lua index 4b4dc50ecda..35dc9b3d143 100755 --- a/Build/source/texk/texlive/linked_scripts/luaotfload/luaotfload-tool.lua +++ b/Build/source/texk/texlive/linked_scripts/luaotfload/luaotfload-tool.lua @@ -7,10 +7,11 @@ -- LICENSE: GPL v2.0 ----------------------------------------------------------------------- -luaotfload = luaotfload or { } -local version = "2.7" -luaotfload.version = version -luaotfload.self = "luaotfload-tool" +luaotfload = luaotfload or { } +local version = "2.7" +luaotfload.version = version +luaotfload.min_luatex_version = { 0, 95, 0 } --- i. e. 0.95.0 +luaotfload.self = "luaotfload-tool" --[[doc-- @@ -33,16 +34,6 @@ see the luaotfload documentation for more info. Report bugs to kpse.set_program_name "luatex" ---[[doc-- - - We test for Lua 5.1 by means of capability detection to see if - we’re running an outdated Luatex. If so, we bail. - - \url{http://lua-users.org/wiki/LuaVersionCompatibility} - ---doc]]-- - - local iowrite = io.write local kpsefind_file = kpse.find_file local mathfloor = math.floor @@ -59,19 +50,32 @@ local texiowrite = texio.write local tonumber = tonumber local type = type -local runtime -if _G.getfenv ~= nil then -- 5.1 or LJ - if _G.jit ~= nil then - runtime = { "jit", jit.version } - else - runtime = { "stock", _VERSION } - print "FATAL ERROR" - print "Luaotfload requires a Luatex version >=0.76." - print "Please update your TeX distribution!" - os.exit (-1) - end -else -- 5.2 - runtime = { "stock", _VERSION } +do + local runtime = _G.jit and { "jit" , jit.version } + or { "stock", _VERSION } + local stats = status and status.list () + local minimum = luaotfload.min_luatex_version + local actual = { 0, 0, 0 } + if stats then + local major = stats.luatex_version / 100 + local minor = stats.luatex_version % 100 + local revision = stats.luatex_revision --[[ : string ]] + local revno = tonumber (revision) + actual = { major, minor, revno or 0 } + end + + if actual [1] < minimum [1] or actual [2] < minimum [2] + or actual [3] < minimum [3] + then + texio.write_nl ("term and log", + string.format ("\tFATAL ERROR\n\z + \tLuaotfload requires a Luatex version >= %d.%d.%d.\n\z + \tPlease update your TeX distribution!\n\n", + (unpack or table.unpack) (minimum))) + error "version check failed" + end + luaotfload.runtime = runtime + luaotfload.luatex_version = actual end local C, Ct, P, S = lpeg.C, lpeg.Ct, lpeg.P, lpeg.S @@ -336,15 +340,21 @@ local version_msg = function ( ) local out = function (...) texiowrite_nl (stringformat (...)) end local uname = os.uname () local meta = fonts.names.getmetadata () - local info = status.list () + + local runtime = luaotfload.runtime + local actual = luaotfload.luatex_version + local status = config.luaotfload.status + local notes = status and status.notes or { } + out (about, luaotfload.self) out ("%s version: %q", luaotfload.self, version) - out ("Revision: %q", config.luaotfload.status.notes.revision) + if notes.description then + out ("Luaotfload: %q", notes.description) + end + out ("Revision: %q", notes.revision) out ("Lua interpreter: %s; version %q", runtime[1], runtime[2]) --[[out ("Luatex SVN revision: %d", info.luatex_svn)]] --> SVN r5624 - out ("Luatex version: %.2f.%d", - info.luatex_version / 100, - info.luatex_revision) + out ("Luatex version: %d.%d", actual [1], actual [2]) out ("Platform: type=%s name=%s", os.type, os.name) local uname_vars = tablesortedkeys (uname) @@ -356,7 +366,7 @@ local version_msg = function ( ) out("No database metadata available.") else out ("Index: version=%q created=%q modified=%q", - config.luaotfload.status.notes.revision, + meta.version or "too old", meta.created or "ages ago", meta.modified or "ages ago") end @@ -1160,16 +1170,21 @@ actions.query = function (job) tmpspec.size = 655360 --- assume 10pt end - local foundname, subfont, success + local foundname, subfont, success, needle - if tmpspec.lookup == "name" - or tmpspec.lookup == "anon" --- not *exactly* as resolvers.anon - then - foundname, _, success = fonts.names.lookup_font_name (tmpspec) - if foundname then - foundname, _, success = fonts.names.lookup_font_file (foundname) + if tmpspec.lookup == "name" then + if fonts.definers.resolvers.name (tmpspec) then + needle = tmpspec.resolved + end + elseif tmpspec.lookup == "anon" then + if fonts.definers.resolvers.anon (tmpspec) then + needle = tmpspec.resolved or tmpspec.name end elseif tmpspec.lookup == "file" then + needle = tmpspec.name + end + + if needle then foundname, _, success = fonts.names.lookup_font_file (tmpspec.name) end diff --git a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl index 07ffe926c50..244de847ad3 100755 --- a/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl +++ b/Build/source/texk/texlive/linked_scripts/texlive/tlmgr.pl @@ -1,13 +1,13 @@ #!/usr/bin/env perl -# $Id: tlmgr.pl 40800 2016-04-28 17:56:52Z karl $ +# $Id: tlmgr.pl 40844 2016-05-02 23:46:44Z karl $ # # Copyright 2008-2016 Norbert Preining # This file is licensed under the GNU General Public License version 2 # or any later version. # -my $svnrev = '$Revision: 40800 $'; -my $datrev = '$Date: 2016-04-28 19:56:52 +0200 (Thu, 28 Apr 2016) $'; +my $svnrev = '$Revision: 40844 $'; +my $datrev = '$Date: 2016-05-03 01:46:44 +0200 (Tue, 03 May 2016) $'; my $tlmgrrevision; my $prg; if ($svnrev =~ m/: ([0-9]+) /) { @@ -7637,7 +7637,7 @@ The allowed keys are: =over 4 -=item C<auto-remove, value 0 or 1 (default 1), same as command-line +=item C<auto-remove>, value 0 or 1 (default 1), same as command-line option. =item C<gui-expertmode>, value 0 or 1 (default 1). @@ -7661,7 +7661,7 @@ The system-wide config file can contain one additional key: =over 4 -=item C<allowed-actions> I<action1[,I<action>,...] +=item C<allowed-actions> I<action1> [,I<action>,...] The value is a comma-separated list of C<tlmgr> actions which are allowed to be executed when C<tlmgr> is invoked in system mode (that is, without C<--usermode>). @@ -7679,13 +7679,13 @@ to checksums computed locally after downloading. C<no-checksums> disables this. The checksum algorithm is SHA-512. Your system must have (looked for in -this order) the Perl L<Digest::SHA> module, the C<openssl> program -(L<openssl.org>), or the C<sha512sum> program (from GNU Coreutils, -L<http://www.gnu.org/software/coreutils>). If none of these are -available, a warning is issued and C<tlmgr> proceeds without checking -checksums. (Incidentally, other SHA implementations, such as the pure -Perl and pure Lua modules, are much too slow to be usable in our -context.) C<no-checksums> also avoids the warning. +this order) the Perl C<Digest::SHA> module, the C<openssl> program +(L<http://openssl.org>), or the C<sha512sum> program (from GNU +Coreutils, L<http://www.gnu.org/software/coreutils>). If none of these +are available, a warning is issued and C<tlmgr> proceeds without +checking checksums. (Incidentally, other SHA implementations, such as +the pure Perl and pure Lua modules, are much too slow to be usable in +our context.) C<no-checksums> also avoids the warning. =head1 CRYPTOGRAPHIC VERIFICATION |