summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/libs-imp-kpse.lmt
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2020-11-23 19:48:34 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2020-11-23 19:48:34 +0100
commit18499e46a49b8ccf4346686d1cf626ada33935b8 (patch)
treebd0ae7b601b323e20954c10c07598637d9403e00 /tex/context/base/mkiv/libs-imp-kpse.lmt
parent4b089e589d39346a66a27d04f9857fe16e4b7b41 (diff)
downloadcontext-18499e46a49b8ccf4346686d1cf626ada33935b8.tar.gz
2020-11-23 18:39:00
Diffstat (limited to 'tex/context/base/mkiv/libs-imp-kpse.lmt')
-rw-r--r--tex/context/base/mkiv/libs-imp-kpse.lmt58
1 files changed, 0 insertions, 58 deletions
diff --git a/tex/context/base/mkiv/libs-imp-kpse.lmt b/tex/context/base/mkiv/libs-imp-kpse.lmt
deleted file mode 100644
index f8e4a9907..000000000
--- a/tex/context/base/mkiv/libs-imp-kpse.lmt
+++ /dev/null
@@ -1,58 +0,0 @@
-if not modules then modules = { } end modules ['libs-imp-kpse'] = {
- version = 1.001,
- comment = "companion to luat-imp-kpse.mkxl",
- author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
- copyright = "PRAGMA ADE / ConTeXt Development Team",
- license = "see context related readme files"
-}
-
--- This is an experiment. It might make sense to have this available in case I want
--- more runners to use LuaMetaTeX in which case (as with mtxrun using LuaTeX) we
--- need to load kpse.
-
-local libname = "kpse"
-local libfile = (os.platform == "win64" and "kpathsea*w64")
- or (os.platform == "win32" and "kpathsea*w32")
- or "libkpathsea"
-local libkpse = resolvers.libraries.validoptional(libname)
-
-if package.loaded[libname] then
- return package.loaded[libname]
-end
-
--- This is a variant that loaded directly:
-
--- kpse = libkpse -- the library will issue warnings anyway
---
--- resolvers.libraries.optionalloaded(libname,libfile) -- no need to chedk if true
-
--- This variant delays loading and has a bit more protection:
-
-local function okay()
- if libkpse and resolvers.libraries.optionalloaded(libname,libfile) then
- okay = function() return true end
- else
- okay = function() return false end
- end
- return okay()
-end
-
-local kpse = { }
-
-for k, v in next, libkpse do
- kpse[k] = function(...) if okay() then return v(...) end end
-end
-
--- We properly register the module:
-
-package.loaded[libname] = kpse
-
-optional.loaded.kpse = kpse
-
--- A simple test:
-
--- kpse.set_program_name("pdftex")
--- print("find file:",kpse.find_file("oeps.tex"))
--- print("find file:",kpse.find_file("context.mkii"))
-
-return kpse