luarocks: update to 3.8.0

This commit is contained in:
Henrik Grimler 2022-01-30 15:42:22 +01:00
parent aed08bf1d6
commit bcc3f5a735
No known key found for this signature in database
GPG Key ID: B0076E490B71616B
5 changed files with 74 additions and 39 deletions

View File

@ -1,11 +1,11 @@
--- ./GNUmakefile.orig 2019-06-07 23:32:53.163938603 +0000
+++ ./GNUmakefile 2019-06-07 23:33:13.536058761 +0000
@@ -52,7 +52,7 @@
echo "unset LUA_PATH LUA_PATH_5_2 LUA_PATH_5_3 LUA_PATH_5_4" >> luarocks
--- ./GNUmakefile.orig 2022-01-30 15:09:08.447445934 +0100
+++ ./GNUmakefile 2022-01-30 15:09:48.444214490 +0100
@@ -54,7 +54,7 @@
echo "unset LUA_PATH LUA_PATH_5_2 LUA_PATH_5_3 LUA_PATH_5_4 LUA_CPATH LUA_CPATH_5_2 LUA_CPATH_5_3 LUA_CPATH_5_4" >> luarocks
echo 'LUAROCKS_SYSCONFDIR="$(luarocksconfdir)" LUA_PATH="$(CURDIR)/src/?.lua;;" exec "$(LUA)" "$(CURDIR)/src/bin/luarocks" --project-tree="$(CURDIR)/lua_modules" "$$@"' >> luarocks
chmod +rx ./luarocks
- ./luarocks init
+ ./luarocks init --lua-dir=$(PREFIX)
cp $(builddir)/config-$(LUA_VERSION).lua .luarocks/config-$(LUA_VERSION).lua
luarocks-admin: config.unix
rm -f src/luarocks/core/hardcoded.lua

View File

@ -2,10 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://luarocks.org/
TERMUX_PKG_DESCRIPTION="Deployment and management system for Lua modules"
TERMUX_PKG_LICENSE="BSD"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=3.1.3
TERMUX_PKG_REVISION=6
TERMUX_PKG_VERSION=3.8.0
TERMUX_PKG_SRCURL=https://luarocks.org/releases/luarocks-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=c573435f495aac159e34eaa0a3847172a2298eb6295fcdc35d565f9f9b990513
TERMUX_PKG_SHA256=56ab9b90f5acbc42eb7a94cf482e6c058a63e8a1effdf572b8b2a6323a06d923
TERMUX_PKG_DEPENDS="curl, lua53"
TERMUX_PKG_BUILD_DEPENDS="liblua53"
TERMUX_PKG_BUILD_IN_SRC=true
@ -22,9 +21,24 @@ termux_step_configure() {
--with-lua=$TERMUX_PREFIX \
--with-lua-include=$TERMUX_PREFIX/include/lua5.3 \
--lua-version=5.3
# Create temporary symlink to workaround luarock bootstrap
# script trying to run cross-compiled lua
mv $TERMUX_PREFIX/bin/lua5.3{,.bak}
ln -sf /usr/bin/lua5.3 $TERMUX_PREFIX/bin/lua5.3
}
termux_step_post_make_install() {
# Restore lua
unlink $TERMUX_PREFIX/bin/lua5.3
mv $TERMUX_PREFIX/bin/lua5.3{.bak,}
}
termux_step_post_massage() {
sed -i "1 s|$|lua|" bin/luarocks
sed -i "1 s|$|lua|" bin/luarocks-admin
# Remove lua, due to us moving it back and fourth the package
# thinks it is a newly compiled program
rm bin/lua5.3
}

View File

@ -1,6 +1,6 @@
--- ./configure.orig 2019-03-10 15:10:39.226464224 +0100
+++ ./configure 2019-03-10 15:13:22.879796367 +0100
@@ -377,37 +377,6 @@
--- ./configure.orig 2021-11-08 16:30:37.000000000 +0100
+++ ./configure 2022-01-30 15:09:08.440779250 +0100
@@ -379,37 +379,6 @@
}
done

View File

@ -1,15 +1,35 @@
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 @@
--- ./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(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)
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,
@ -18,24 +38,22 @@ diff -uNr luarocks-3.1.3/src/luarocks/deps.lua luarocks-3.1.3.mod/src/luarocks/d
- "lua-" .. shortv,
- "lua",
- }
- if cfg.luajit_version then
- if ljv 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
- 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
- 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"
- return true
- 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 = {
function deps.get_deps_mode(args)

View File

@ -1,9 +1,12 @@
--- ./src/luarocks/core/sysdetect.lua~ 2019-06-06 21:46:21.000000000 +0200
+++ ./src/luarocks/core/sysdetect.lua 2022-01-30 15:04:29.507292068 +0100
@@ -139,59 +139,7 @@
local system = e_osabi[hdr.osabi]
local endian = hdr.endian
--- ./src/luarocks/core/sysdetect.lua.orig 2022-01-30 15:20:11.835200454 +0100
+++ ./src/luarocks/core/sysdetect.lua 2022-01-30 15:21:17.085262684 +0100
@@ -136,62 +136,7 @@
end
local function detect_elf_system(fd, hdr, sections)
- local system = e_osabi[hdr.osabi]
- local endian = hdr.endian
-
- if system == "sysv" then
- local abitag = sections[".note.ABI-tag"]
- if abitag then
@ -19,7 +22,7 @@
- elseif sections[".note.openbsd.ident"] then
- return "openbsd"
- end
-
-
- local gnu_version_r = sections[".gnu.version_r"]
- if gnu_version_r then
-
@ -35,7 +38,7 @@
-
- fd:seek("set", dynstr + vn_file)
- local libname = fd:read(64):gsub("%z.*", "")
-
-
- if hdr.e_type == 0x03 and libname == "libroot.so" then
- return "haiku"
- elseif libname:match("linux") then
@ -55,7 +58,7 @@
- end
- end
- end
-
-
- return system
+ return "linux"
end