aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-posix
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-03-05 13:23:30 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2013-03-05 16:49:04 +0100
commitf86bc1f714dba602505312ca08e1a5139f2e014a (patch)
tree62dec626f94cb93bf1b8616f2c5f179bb59e72c6 /main/lua-posix
parent5922ff1669d75f7ce66b82a13bf54f448e27ce74 (diff)
downloadaports-f86bc1f714dba602505312ca08e1a5139f2e014a.tar.bz2
aports-f86bc1f714dba602505312ca08e1a5139f2e014a.tar.xz
main/lua-posix: fix 5.1 incompat issue
Diffstat (limited to 'main/lua-posix')
-rw-r--r--main/lua-posix/0001-Removed-Lua-5.2-functions-lua_len-and-lua_tointegerx.patch30
-rw-r--r--main/lua-posix/APKBUILD22
2 files changed, 47 insertions, 5 deletions
diff --git a/main/lua-posix/0001-Removed-Lua-5.2-functions-lua_len-and-lua_tointegerx.patch b/main/lua-posix/0001-Removed-Lua-5.2-functions-lua_len-and-lua_tointegerx.patch
new file mode 100644
index 0000000000..c6fffd54fb
--- /dev/null
+++ b/main/lua-posix/0001-Removed-Lua-5.2-functions-lua_len-and-lua_tointegerx.patch
@@ -0,0 +1,30 @@
+From 9f6c2a8fe34db847df957e55e0375b5cf15a44b9 Mon Sep 17 00:00:00 2001
+From: nmcveity <nmcveity@gmail.com>
+Date: Mon, 4 Mar 2013 22:49:27 -0800
+Subject: [PATCH] Removed Lua 5.2 functions lua_len and lua_tointegerx
+
+This fixes issue #71.
+---
+ lposix.c | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/lposix.c b/lposix.c
+index ffd3c57..bf5accb 100644
+--- a/lposix.c
++++ b/lposix.c
+@@ -901,11 +901,7 @@ static int runexec(lua_State *L, int use_shell)
+ const char *path = luaL_checkstring(L, 1);
+ int i,n=lua_gettop(L), table = 0;
+ if (n >= 1 && lua_type(L, 2) == LUA_TTABLE) {
+- int isint;
+- lua_len(L, 2);
+- n = lua_tointegerx(L, -1, &isint);
+- if (!isint)
+- luaL_error(L, "argument 2 is a table, but has non-numeric length");
++ n = lua_objlen(L, 2);
+ table = 1;
+ } else
+ n--;
+--
+1.8.1.5
+
diff --git a/main/lua-posix/APKBUILD b/main/lua-posix/APKBUILD
index 6bd66bde49..1dd8bcdb74 100644
--- a/main/lua-posix/APKBUILD
+++ b/main/lua-posix/APKBUILD
@@ -2,14 +2,15 @@
pkgname=lua-posix
_name=luaposix
pkgver=5.1.26
-pkgrel=0
+pkgrel=1
pkgdesc="POSIX library for Lua"
url="https://github.com/luaposix/luaposix"
arch="all"
license="MIT"
depends="lua lua-bitlib"
makedepends="lua-dev perl ncurses-dev"
-source="luaposix-$pkgver.tar.gz::https://github.com/luaposix/luaposix/archive/release-v$pkgver.tar.gz"
+source="luaposix-$pkgver.tar.gz::https://github.com/luaposix/luaposix/archive/release-v$pkgver.tar.gz
+ 0001-Removed-Lua-5.2-functions-lua_len-and-lua_tointegerx.patch"
replaces="luaposix"
subpackages="lua-curses $pkgname-doc"
@@ -18,6 +19,14 @@ _builddir="$srcdir"/$_name-release-v$pkgver
_lualib=/usr/lib/lua/5.1
_luashare=/usr/share/lua/5.1
+prepare() {
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
build() {
cd "$_builddir"
./configure --prefix=/usr \
@@ -40,6 +49,9 @@ curses() {
mv "$pkgdir"/$_lualib/curses* "$subpkgdir"/$_lualib/ || return 1
mv "$pkgdir"/$_luashare/curses* "$subpkgdir"/$_luashare/ || return 1
}
-md5sums="26018f1e581e24d2875e848a77d03139 luaposix-5.1.26.tar.gz"
-sha256sums="8de25b0013cc97ccf5ccd8b23012a548fb8ed682d8d95c849c3798bdfbda9866 luaposix-5.1.26.tar.gz"
-sha512sums="48e8a7ab8752d0a87326226813c1feb4f76596c568eb657777c8861837fd036835107c1ef7125d9512d42326ce560249057a791e99c36e29228fae665443fb59 luaposix-5.1.26.tar.gz"
+md5sums="26018f1e581e24d2875e848a77d03139 luaposix-5.1.26.tar.gz
+2af13134ae7e936e74f6f1f2f011a3ba 0001-Removed-Lua-5.2-functions-lua_len-and-lua_tointegerx.patch"
+sha256sums="8de25b0013cc97ccf5ccd8b23012a548fb8ed682d8d95c849c3798bdfbda9866 luaposix-5.1.26.tar.gz
+256504f015850b3126a53d40d6210b8d6f473bc3c180b74621c62709d3db594d 0001-Removed-Lua-5.2-functions-lua_len-and-lua_tointegerx.patch"
+sha512sums="48e8a7ab8752d0a87326226813c1feb4f76596c568eb657777c8861837fd036835107c1ef7125d9512d42326ce560249057a791e99c36e29228fae665443fb59 luaposix-5.1.26.tar.gz
+b460d42e39c790ca4dd44b16923a9a44267a2b2088995eed9cdbfc9b852d9beb30f96a30cceddd6bbe32e2ed2cc806515e8d9e9fb7a3d877043a65f1f1f2394e 0001-Removed-Lua-5.2-functions-lua_len-and-lua_tointegerx.patch"