Browse Source

luarocks: update to 3.0.4

emacs-27
Henrik Grimler 6 years ago
parent
commit
05056bca1e
  1. 6
      packages/luarocks/build.sh
  2. 40
      packages/luarocks/configure.patch
  3. 17
      packages/luarocks/lua.lua.patch
  4. 17
      packages/luarocks/src-luarocks-cfg.lua.patch
  5. 11
      packages/luarocks/src-luarocks-core-cfg.lua.patch
  6. 15
      packages/luarocks/unix-tools.lua.patch

6
packages/luarocks/build.sh

@ -1,14 +1,14 @@
TERMUX_PKG_HOMEPAGE=https://luarocks.org/
TERMUX_PKG_DESCRIPTION="Deployment and management system for Lua modules"
TERMUX_PKG_LICENSE="BSD"
TERMUX_PKG_VERSION=2.4.4
TERMUX_PKG_REVISION=1
TERMUX_PKG_SHA256=3938df33de33752ff2c526e604410af3dceb4b7ff06a770bc4a240de80a1f934
TERMUX_PKG_VERSION=3.0.4
TERMUX_PKG_SRCURL=https://luarocks.org/releases/luarocks-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=1236a307ca5c556c4fed9fdbd35a7e0e80ccf063024becc8c3bf212f37ff0edf
TERMUX_PKG_DEPENDS="curl, lua"
TERMUX_PKG_BUILD_DEPENDS="liblua-dev"
TERMUX_PKG_BUILD_IN_SRC=yes
TERMUX_PKG_PLATFORM_INDEPENDENT=yes
TERMUX_PKG_EXTRA_MAKE_ARGS="LUA=/usr/bin/lua"
termux_step_configure() {
./configure --prefix=$TERMUX_PREFIX \

40
packages/luarocks/configure.patch

@ -1,30 +1,40 @@
diff -u -r ../luarocks-2.4.3/configure ./configure
--- ../luarocks-2.4.3/configure 2017-09-13 01:46:14.000000000 +0200
+++ ./configure 2017-10-14 23:43:39.753730578 +0200
@@ -305,26 +305,6 @@
--- ./configure.orig 2019-03-10 15:10:39.226464224 +0100
+++ ./configure 2019-03-10 15:13:22.879796367 +0100
@@ -377,37 +377,6 @@
}
fi
done
-if [ "$lua_interp_found" != "yes" ]
-then
- [ "$LUA_VERSION_SET" ] && { interp="Lua $LUA_VERSION" ;} || { interp="Lua" ;}
- [ "$LUA_DIR_SET" -o "$LUA_BINDIR_SET" ] && { where="$LUA_BINDIR" ;} || { where="\$PATH" ;}
- echo "$interp interpreter not found in $where"
- die "You may want to use the flags --with-lua, --with-lua-bin and/or --lua-suffix. See --help."
- if [ "$LUA_VERSION_SET" ]
- then
- interp="Lua $LUA_VERSION"
- else
- interp="Lua"
- fi
- if [ "$LUA_DIR_SET" ] || [ "$LUA_BINDIR_SET" ]
- then
- where="$LUA_BINDIR"
- else
- where="\$PATH"
- fi
- echo "$(RED $interp interpreter not found) in $where"
- echo "You may want to use the flags $(BOLD --with-lua), $(BOLD --with-lua-bin) and/or $(BOLD --lua-version)"
- die "Run $(BOLD ./configure --help) for details."
-fi
-
-if [ "$LUA_VERSION_SET" = "yes" ]
-then
- echo_n "Checking if $LUA_BINDIR/lua$LUA_SUFFIX is Lua version $LUA_VERSION... "
- if detect_lua_version "$LUA_BINDIR/lua$LUA_SUFFIX"
- echo_n "Checking if $LUA_BINDIR/$LUA_INTERPRETER is Lua version $LUA_VERSION... "
- if detect_lua_version "$LUA_BINDIR/$LUA_INTERPRETER"
- then
- echo "yes"
- else
- echo "no"
- die "You may want to use the flags --with-lua, --with-lua-bin and/or --lua-suffix. See --help."
- die "You may want to use the flags --with-lua, --with-lua-bin and/or --lua-version. See --help."
- fi
-fi
-
if [ "$LUA_INCDIR_SET" != "yes" ]
then
LUA_INCDIR="$LUA_DIR/include"
# ----------------------------------------
# Additional checks
# ----------------------------------------

17
packages/luarocks/lua.lua.patch

@ -1,12 +1,11 @@
diff -u -r ../luarocks-2.4.0/src/luarocks/fs/lua.lua ./src/luarocks/fs/lua.lua
--- ../luarocks-2.4.0/src/luarocks/fs/lua.lua 2016-09-08 14:39:09.000000000 -0400
+++ ./src/luarocks/fs/lua.lua 2016-09-26 09:13:06.062435573 -0400
@@ -781,7 +781,7 @@
assert(type(name) == "string")
name = dir.normalize(name)
--- ./src/luarocks/fs/lua.lua.orig 2019-03-10 15:14:28.333129223 +0100
+++ ./src/luarocks/fs/lua.lua 2019-03-10 15:32:29.349788026 +0100
@@ -961,7 +961,7 @@
assert(type(name_pattern) == "string")
name_pattern = dir.normalize(name_pattern)
- return posix.mkdtemp((os.getenv("TMPDIR") or "/tmp") .. "/luarocks_" .. name:gsub(dir.separator, "_") .. "-XXXXXX")
+ return posix.mkdtemp((os.getenv("TMPDIR") or "@TERMUX_PREFIX@/tmp") .. "/luarocks_" .. name:gsub(dir.separator, "_") .. "-XXXXXX")
- 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

17
packages/luarocks/src-luarocks-cfg.lua.patch

@ -1,17 +0,0 @@
--- ../cfg.lua.orig 2018-05-25 06:56:17.183526289 +0000
+++ ./src/luarocks/cfg.lua 2018-05-25 06:57:25.695490218 +0000
@@ -517,10 +517,10 @@
defaults.lib_extension = "so"
defaults.external_lib_extension = "so"
defaults.obj_extension = "o"
- defaults.external_deps_dirs = { "/usr/local", "/usr" }
- defaults.variables.LUA_BINDIR = site_config.LUA_BINDIR or "/usr/local/bin"
- defaults.variables.LUA_INCDIR = site_config.LUA_INCDIR or "/usr/local/include"
- defaults.variables.LUA_LIBDIR = site_config.LUA_LIBDIR or "/usr/local/lib"
+ defaults.external_deps_dirs = { "@TERMUX_PREFIX@/local", "@TERMUX_PREFIX@" }
+ defaults.variables.LUA_BINDIR = site_config.LUA_BINDIR or "@TERMUX_PREFIX@/local/bin"
+ defaults.variables.LUA_INCDIR = site_config.LUA_INCDIR or "@TERMUX_PREFIX@/local/include"
+ defaults.variables.LUA_LIBDIR = site_config.LUA_LIBDIR or "@TERMUX_PREFIX@/local/lib"
defaults.variables.CFLAGS = "-O2"
defaults.cmake_generator = "Unix Makefiles"
defaults.variables.CC = "gcc"

11
packages/luarocks/src-luarocks-core-cfg.lua.patch

@ -0,0 +1,11 @@
--- ./src/luarocks/core/cfg.lua~ 2018-10-30 18:31:40.000000000 +0100
+++ ./src/luarocks/core/cfg.lua 2019-03-10 16:33:24.676428404 +0100
@@ -358,7 +358,7 @@
defaults.static_lib_extension = "a"
defaults.external_lib_extension = "so"
defaults.obj_extension = "o"
- defaults.external_deps_dirs = { "/usr/local", "/usr", "/" }
+ defaults.external_deps_dirs = { "@TERMUX_PREFIX@/local", "@TERMUX_PREFIX@" }
defaults.variables.CFLAGS = "-O2"
defaults.cmake_generator = "Unix Makefiles"
defaults.variables.CC = "gcc"

15
packages/luarocks/unix-tools.lua.patch

@ -1,12 +1,11 @@
diff -u -r ../luarocks-2.4.0/src/luarocks/fs/unix/tools.lua ./src/luarocks/fs/unix/tools.lua
--- ../luarocks-2.4.0/src/luarocks/fs/unix/tools.lua 2016-09-08 14:39:09.000000000 -0400
+++ ./src/luarocks/fs/unix/tools.lua 2016-09-26 09:19:08.200979160 -0400
@@ -224,7 +224,7 @@
assert(type(name) == "string")
name = dir.normalize(name)
--- ./src/luarocks/fs/unix/tools.lua.orig 2019-03-10 16:35:27.583094191 +0100
+++ ./src/luarocks/fs/unix/tools.lua 2019-03-10 16:36:17.913093843 +0100
@@ -300,7 +300,7 @@
assert(type(name_pattern) == "string")
name_pattern = dir.normalize(name_pattern)
- local template = (os.getenv("TMPDIR") or "/tmp") .. "/luarocks_" .. name:gsub(dir.separator, "_") .. "-XXXXXX"
+ local template = (os.getenv("TMPDIR") or "@TERMUX_PREFIX@/tmp") .. "/luarocks_" .. name:gsub(dir.separator, "_") .. "-XXXXXX"
- local template = (os.getenv("TMPDIR") or "/tmp") .. "/luarocks_" .. name_pattern:gsub("/", "_") .. "-XXXXXX"
+ local template = (os.getenv("TMPDIR") or "@TERMUX_PREFIX@/tmp") .. "/luarocks_" .. name_pattern:gsub("/", "_") .. "-XXXXXX"
local pipe = io.popen(vars.MKTEMP.." -d "..fs.Q(template))
local dirname = pipe:read("*l")
pipe:close()

Loading…
Cancel
Save