luarocks: hardcode the properties of Lua installation
No need to call cross-compiled Lua interpreter during build time anymore.
This commit is contained in:
parent
8b32453985
commit
6c6fb4cfc7
@ -12,16 +12,17 @@ TERMUX_PKG_PLATFORM_INDEPENDENT=true
|
||||
|
||||
termux_step_configure() {
|
||||
if $TERMUX_ON_DEVICE_BUILD; then
|
||||
TERMUX_PKG_EXTRA_MAKE_ARGS="LUA=$TERMUX_PREFIX/bin/lua"
|
||||
TERMUX_PKG_EXTRA_MAKE_ARGS="LUA=$TERMUX_PREFIX/bin/lua5.3"
|
||||
else
|
||||
TERMUX_PKG_EXTRA_MAKE_ARGS="LUA=/usr/bin/lua5.3"
|
||||
fi
|
||||
|
||||
./configure --prefix=$TERMUX_PREFIX \
|
||||
--with-lua=$TERMUX_PREFIX \
|
||||
--with-lua-include=$TERMUX_PREFIX/include \
|
||||
--with-lua-include=$TERMUX_PREFIX/include/lua5.3 \
|
||||
--lua-version=5.3
|
||||
}
|
||||
|
||||
termux_step_post_massage() {
|
||||
sed -i "1 s|$|lua|" bin/luarocks
|
||||
sed -i "1 s|$|lua|" bin/luarocks-admin
|
||||
|
41
packages/luarocks/lua-props.patch
Normal file
41
packages/luarocks/lua-props.patch
Normal file
@ -0,0 +1,41 @@
|
||||
diff -uNr luarocks-3.1.3/src/luarocks/deps.lua luarocks-3.1.3.mod/src/luarocks/deps.lua
|
||||
--- luarocks-3.1.3/src/luarocks/deps.lua 2019-06-06 22:46:21.000000000 +0300
|
||||
+++ luarocks-3.1.3.mod/src/luarocks/deps.lua 2020-10-01 16:39:18.541558016 +0300
|
||||
@@ -532,34 +532,9 @@
|
||||
end
|
||||
|
||||
function deps.check_lua(vars)
|
||||
- local incdir_found = true
|
||||
- if (not vars.LUA_INCDIR) and vars.LUA_DIR then
|
||||
- vars.LUA_INCDIR = find_lua_incdir(vars.LUA_DIR, cfg.lua_version, cfg.luajit_version)
|
||||
- incdir_found = (vars.LUA_INCDIR ~= nil)
|
||||
- end
|
||||
- local shortv = cfg.lua_version:gsub("%.", "")
|
||||
- local libnames = {
|
||||
- "lua" .. cfg.lua_version,
|
||||
- "lua" .. shortv,
|
||||
- "lua-" .. cfg.lua_version,
|
||||
- "lua-" .. shortv,
|
||||
- "lua",
|
||||
- }
|
||||
- if cfg.luajit_version then
|
||||
- table.insert(libnames, 1, "luajit-" .. cfg.lua_version)
|
||||
- end
|
||||
- local cache = {}
|
||||
- for _, libname in ipairs(libnames) do
|
||||
- local ok = check_external_dependency("LUA", { library = libname }, vars, "build", cache)
|
||||
- if ok then
|
||||
- vars.LUALIB = vars.LUA_LIBDIR_FILE
|
||||
- return true
|
||||
- end
|
||||
- end
|
||||
- if not incdir_found then
|
||||
- return nil, "Failed finding Lua header files. You may need to install them or configure LUA_INCDIR.", "dependency"
|
||||
- end
|
||||
- return nil, "Failed finding Lua library. You may need to configure LUA_LIBDIR.", "dependency"
|
||||
+ vars.LUA_INCDIR = "@TERMUX_PREFIX@/include/lua5.3"
|
||||
+ vars.LUALIB = "lua5.3"
|
||||
+ return true
|
||||
end
|
||||
|
||||
local valid_deps_modes = {
|
Loading…
x
Reference in New Issue
Block a user