fix luarocks and liblua
This commit is contained in:
parent
ec6be91aef
commit
55dec17a72
@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://www.lua.org/
|
|||||||
TERMUX_PKG_DESCRIPTION="Shared library for the Lua interpreter"
|
TERMUX_PKG_DESCRIPTION="Shared library for the Lua interpreter"
|
||||||
TERMUX_PKG_LICENSE="MIT"
|
TERMUX_PKG_LICENSE="MIT"
|
||||||
TERMUX_PKG_VERSION=5.3.5
|
TERMUX_PKG_VERSION=5.3.5
|
||||||
TERMUX_PKG_REVISION=2
|
TERMUX_PKG_REVISION=3
|
||||||
TERMUX_PKG_SHA256=0c2eed3f960446e1a3e4b9a1ca2f3ff893b6ce41942cf54d5dd59ab4b3b058ac
|
TERMUX_PKG_SHA256=0c2eed3f960446e1a3e4b9a1ca2f3ff893b6ce41942cf54d5dd59ab4b3b058ac
|
||||||
TERMUX_PKG_SRCURL=https://www.lua.org/ftp/lua-${TERMUX_PKG_VERSION}.tar.gz
|
TERMUX_PKG_SRCURL=https://www.lua.org/ftp/lua-${TERMUX_PKG_VERSION}.tar.gz
|
||||||
TERMUX_PKG_EXTRA_MAKE_ARGS=linux
|
TERMUX_PKG_EXTRA_MAKE_ARGS=linux
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
diff -uNr lua-5.3.4/src/loslib.c lua-5.3.4.mod/src/loslib.c
|
--- ./src/loslib.c.orig 2019-06-07 23:19:03.666887235 +0000
|
||||||
--- lua-5.3.4/src/loslib.c 2016-07-18 20:58:58.000000000 +0300
|
+++ ./src/loslib.c 2019-06-07 23:19:47.295164822 +0000
|
||||||
+++ lua-5.3.4.mod/src/loslib.c 2017-09-14 13:42:35.922862573 +0300
|
@@ -112,10 +112,10 @@
|
||||||
@@ -115,7 +115,7 @@
|
|
||||||
#define LUA_TMPNAMBUFSIZE 32
|
#include <unistd.h>
|
||||||
|
|
||||||
|
-#define LUA_TMPNAMBUFSIZE 32
|
||||||
|
+#define LUA_TMPNAMBUFSIZE 128
|
||||||
|
|
||||||
#if !defined(LUA_TMPNAMTEMPLATE)
|
#if !defined(LUA_TMPNAMTEMPLATE)
|
||||||
-#define LUA_TMPNAMTEMPLATE "/tmp/lua_XXXXXX"
|
-#define LUA_TMPNAMTEMPLATE "/tmp/lua_XXXXXX"
|
||||||
+#define LUA_TMPNAMTEMPLATE "@TERMUX_PREFIX@/tmp/lua_XXXXXX"
|
+#define LUA_TMPNAMTEMPLATE "@TERMUX_PREFIX@/tmp/lua_XXXXXX"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define lua_tmpnam(b,e) { \
|
#define lua_tmpnam(b,e,s) { \
|
||||||
|
11
packages/luarocks/GNUmakefile.patch
Normal file
11
packages/luarocks/GNUmakefile.patch
Normal file
@ -0,0 +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
|
||||||
|
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
|
@ -1,9 +1,9 @@
|
|||||||
TERMUX_PKG_HOMEPAGE=https://luarocks.org/
|
TERMUX_PKG_HOMEPAGE=https://luarocks.org/
|
||||||
TERMUX_PKG_DESCRIPTION="Deployment and management system for Lua modules"
|
TERMUX_PKG_DESCRIPTION="Deployment and management system for Lua modules"
|
||||||
TERMUX_PKG_LICENSE="BSD"
|
TERMUX_PKG_LICENSE="BSD"
|
||||||
TERMUX_PKG_VERSION=3.0.4
|
TERMUX_PKG_VERSION=3.1.3
|
||||||
TERMUX_PKG_SRCURL=https://luarocks.org/releases/luarocks-${TERMUX_PKG_VERSION}.tar.gz
|
TERMUX_PKG_SRCURL=https://luarocks.org/releases/luarocks-${TERMUX_PKG_VERSION}.tar.gz
|
||||||
TERMUX_PKG_SHA256=1236a307ca5c556c4fed9fdbd35a7e0e80ccf063024becc8c3bf212f37ff0edf
|
TERMUX_PKG_SHA256=c573435f495aac159e34eaa0a3847172a2298eb6295fcdc35d565f9f9b990513
|
||||||
TERMUX_PKG_DEPENDS="curl, lua"
|
TERMUX_PKG_DEPENDS="curl, lua"
|
||||||
TERMUX_PKG_BUILD_DEPENDS="liblua-dev"
|
TERMUX_PKG_BUILD_DEPENDS="liblua-dev"
|
||||||
TERMUX_PKG_BUILD_IN_SRC=yes
|
TERMUX_PKG_BUILD_IN_SRC=yes
|
||||||
@ -13,5 +13,10 @@ TERMUX_PKG_EXTRA_MAKE_ARGS="LUA=/usr/bin/lua5.3"
|
|||||||
termux_step_configure() {
|
termux_step_configure() {
|
||||||
./configure --prefix=$TERMUX_PREFIX \
|
./configure --prefix=$TERMUX_PREFIX \
|
||||||
--with-lua=$TERMUX_PREFIX \
|
--with-lua=$TERMUX_PREFIX \
|
||||||
|
--with-lua-include=$TERMUX_PREFIX/include \
|
||||||
--lua-version=5.3
|
--lua-version=5.3
|
||||||
}
|
}
|
||||||
|
termux_step_post_massage() {
|
||||||
|
sed -i "1 s|$|lua|" bin/luarocks
|
||||||
|
sed -i "1 s|$|lua|" bin/luarocks-admin
|
||||||
|
}
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
--- ./src/luarocks/fs/lua.lua.orig 2019-03-10 15:14:28.333129223 +0100
|
--- ./src/luarocks/fs/lua.lua.orig 2019-06-07 22:33:12.441995154 +0000
|
||||||
+++ ./src/luarocks/fs/lua.lua 2019-03-10 15:32:29.349788026 +0100
|
+++ ./src/luarocks/fs/lua.lua 2019-06-07 22:33:22.938066139 +0000
|
||||||
@@ -961,7 +961,7 @@
|
@@ -259,7 +259,7 @@
|
||||||
assert(type(name_pattern) == "string")
|
|
||||||
name_pattern = dir.normalize(name_pattern)
|
|
||||||
|
|
||||||
- return posix.mkdtemp((os.getenv("TMPDIR") or "/tmp") .. "/luarocks_" .. name_pattern:gsub("/", "_") .. "-XXXXXX")
|
|
||||||
+ return posix.mkdtemp((os.getenv("TMPDIR") or "@TERMUX_PREFIX@/tmp") .. "/luarocks_" .. name_pattern:gsub("/", "_") .. "-XXXXXX")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end -- if posix.mkdtemp
|
function fs_lua.system_temp_dir()
|
||||||
|
- return os.getenv("TMPDIR") or os.getenv("TEMP") or "/tmp"
|
||||||
|
+ return os.getenv("TMPDIR") or os.getenv("TEMP") or "@TERMUX_PREFIX@/tmp"
|
||||||
|
end
|
||||||
|
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user