termux-packages/packages/luarocks/lua-props.patch

60 lines
1.8 KiB
Diff

--- ./src/luarocks/deps.lua.orig 2022-01-30 15:13:10.381305292 +0100
+++ ./src/luarocks/deps.lua 2022-01-30 15:18:36.705100349 +0100
@@ -695,52 +695,13 @@
end
function deps.check_lua_incdir(vars)
- local ljv = util.get_luajit_version()
-
- if vars.LUA_INCDIR then
- return lua_h_exists(vars.LUA_INCDIR, cfg.lua_version)
- end
-
- if vars.LUA_DIR then
- vars.LUA_INCDIR = find_lua_incdir(vars.LUA_DIR, cfg.lua_version, ljv)
- if vars.LUA_INCDIR then
- return true
- end
- end
-
- return nil, "Failed finding Lua header files. You may need to install them or configure LUA_INCDIR.", "dependency"
+ vars.LUA_INCDIR = "@TERMUX_PREFIX@/include/lua5.3"
+ return true
end
function deps.check_lua_libdir(vars)
- local fs = require("luarocks.fs")
- local ljv = util.get_luajit_version()
-
- if vars.LUA_LIBDIR and vars.LUALIB and fs.exists(dir.path(vars.LUA_LIBDIR, vars.LUALIB)) then
- return true
- end
-
- local shortv = cfg.lua_version:gsub("%.", "")
- local libnames = {
- "lua" .. cfg.lua_version,
- "lua" .. shortv,
- "lua-" .. cfg.lua_version,
- "lua-" .. shortv,
- "lua",
- }
- if ljv then
- table.insert(libnames, 1, "luajit-" .. cfg.lua_version)
- end
- local cache = {}
- local save_LUA_INCDIR = vars.LUA_INCDIR
- local ok = check_external_dependency("LUA", { library = libnames }, vars, "build", cache)
- vars.LUA_INCDIR = save_LUA_INCDIR
- if ok then
- if fs.exists(dir.path(vars.LUA_LIBDIR, vars.LUA_LIBDIR_FILE)) then
- vars.LUALIB = vars.LUA_LIBDIR_FILE
- end
- return true
- end
- return nil, "Failed finding Lua library. You may need to configure LUA_LIBDIR.", "dependency"
+ vars.LUALIB = "lua5.3"
+ return true
end
function deps.get_deps_mode(args)