2022-01-30 15:42:22 +01:00
|
|
|
--- ./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 @@
|
2020-10-01 15:40:50 +02:00
|
|
|
end
|
|
|
|
|
2022-01-30 15:42:22 +01:00
|
|
|
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)
|
2020-10-01 15:40:50 +02:00
|
|
|
- end
|
2022-01-30 15:42:22 +01:00
|
|
|
-
|
|
|
|
- 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
|
|
|
|
-
|
2020-10-01 15:40:50 +02:00
|
|
|
- local shortv = cfg.lua_version:gsub("%.", "")
|
|
|
|
- local libnames = {
|
|
|
|
- "lua" .. cfg.lua_version,
|
|
|
|
- "lua" .. shortv,
|
|
|
|
- "lua-" .. cfg.lua_version,
|
|
|
|
- "lua-" .. shortv,
|
|
|
|
- "lua",
|
|
|
|
- }
|
2022-01-30 15:42:22 +01:00
|
|
|
- if ljv then
|
2020-10-01 15:40:50 +02:00
|
|
|
- table.insert(libnames, 1, "luajit-" .. cfg.lua_version)
|
|
|
|
- end
|
|
|
|
- local cache = {}
|
2022-01-30 15:42:22 +01:00
|
|
|
- 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
|
2020-10-01 15:40:50 +02:00
|
|
|
- vars.LUALIB = vars.LUA_LIBDIR_FILE
|
|
|
|
- end
|
2022-01-30 15:42:22 +01:00
|
|
|
- return true
|
2020-10-01 15:40:50 +02:00
|
|
|
- end
|
|
|
|
- return nil, "Failed finding Lua library. You may need to configure LUA_LIBDIR.", "dependency"
|
|
|
|
+ vars.LUALIB = "lua5.3"
|
|
|
|
+ return true
|
|
|
|
end
|
|
|
|
|
2022-01-30 15:42:22 +01:00
|
|
|
function deps.get_deps_mode(args)
|