summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/luatexja/ltj-base.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/luatex/luatexja/ltj-base.lua')
-rw-r--r--Master/texmf-dist/tex/luatex/luatexja/ltj-base.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/luatex/luatexja/ltj-base.lua b/Master/texmf-dist/tex/luatex/luatexja/ltj-base.lua
index 41caef5b4c7..4a956167772 100644
--- a/Master/texmf-dist/tex/luatex/luatexja/ltj-base.lua
+++ b/Master/texmf-dist/tex/luatex/luatexja/ltj-base.lua
@@ -226,9 +226,12 @@ end
-- But sometimes we want to create only the precompiled cache,
-- when its 'text' version is already present in LuaTeX-ja distribution.
-require('lualibs-lpeg') -- string.split
-require('lualibs-os') -- os.type
-require('lualibs-gzip') -- gzip.*
+if not os.type then require'lualibs-os' end
+if not string.split then require'lualibs-lpeg' end
+if not gzip then
+ if kpse.find_file('lualibs-util-zip', 'lua') then require'lualibs-util-zip'
+ else require'lualibs-gzip' end
+end
do
local kpse_var_value = kpse.var_value