aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2013-01-08 23:50:04 +0000
committerTed Trask <ttrask01@yahoo.com>2013-01-08 23:50:29 +0000
commit6361af390c11b7cbac447b830e96101b558f5931 (patch)
treedd80d8ab606c814ab595b8de4effcbc54be3b08a /main
parentae5dc1a3bd46b4e00fffee99ecbe6d11ca22b8ad (diff)
downloadaports-6361af390c11b7cbac447b830e96101b558f5931.tar.bz2
aports-6361af390c11b7cbac447b830e96101b558f5931.tar.xz
main/lua-subprocess: add patches for Lua file objects
Diffstat (limited to 'main')
-rw-r--r--main/lua-subprocess/APKBUILD6
-rw-r--r--main/lua-subprocess/luafileobject.patch12
-rw-r--r--main/lua-subprocess/makefile.patch15
3 files changed, 28 insertions, 5 deletions
diff --git a/main/lua-subprocess/APKBUILD b/main/lua-subprocess/APKBUILD
index f72c330686..c8aef5dc35 100644
--- a/main/lua-subprocess/APKBUILD
+++ b/main/lua-subprocess/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Ted Trask <ttrask01@yahoo.com>
pkgname=lua-subprocess
pkgver=0.0.20121211
-pkgrel=1
+pkgrel=2
pkgdesc="A Lua module written in C that allows you to create child processes and communicate with them"
url="https://github.com/xlq/lua-subprocess"
arch="all"
@@ -13,6 +13,7 @@ makedepends="$depends_dev lua-dev"
install=""
subpackages=""
source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz
+ luafileobject.patch
openexception.patch
makefile.patch"
_builddir="$srcdir/$pkgname-$pkgver"
@@ -59,5 +60,6 @@ package() {
}
md5sums="c2f13ef8e1fb83af43d61586ff611957 lua-subprocess-0.0.20121211.tar.gz
+4e16e1e15c3625a739b9ccff15341895 luafileobject.patch
fa869a7c9a11faf77ad9fd98ba35f62a openexception.patch
-cc680a0ec32e0461215ce61a44bbb540 makefile.patch"
+65e10847e5b8dccc1053d69855f6fc76 makefile.patch"
diff --git a/main/lua-subprocess/luafileobject.patch b/main/lua-subprocess/luafileobject.patch
new file mode 100644
index 0000000000..1385aa7b00
--- /dev/null
+++ b/main/lua-subprocess/luafileobject.patch
@@ -0,0 +1,12 @@
+--- a/liolib-copy.c
++++ b/liolib-copy.c
+@@ -312,8 +312,7 @@ static int io_fclose(lua_State *L)
+ FILE *liolib_copy_tofile(lua_State *L, int index)
+ {
+ int eq;
+- if (lua_type(L, index) != LUA_TTABLE) return NULL;
+- lua_getmetatable(L, index);
++ if (0 == lua_getmetatable(L, index)) return NULL;
+ luaL_getmetatable(L, LUA_FILEHANDLE);
+ eq = lua_equal(L, -2, -1);
+ lua_pop(L, 2);
diff --git a/main/lua-subprocess/makefile.patch b/main/lua-subprocess/makefile.patch
index 7567ca92ce..6ae43ec54f 100644
--- a/main/lua-subprocess/makefile.patch
+++ b/main/lua-subprocess/makefile.patch
@@ -1,6 +1,15 @@
---- ./src/lua-subprocess-20121211/Makefile
-+++ ./Makefile
-@@ -36,7 +36,8 @@
+--- a/Makefile
++++ b/Makefile
+@@ -25,7 +25,7 @@ LUA_CFLAGS := $(shell pkg-config --cflags --libs $(lua_package))
+ all: subprocess.so subprocess.html
+
+ subprocess.so: $(SOURCES)
+- $(CC) $(CFLAGS) $(LUA_CFLAGS) -DOS_POSIX -shared -fPIC -o $@ $(SOURCES)
++ $(CC) $(CFLAGS) $(LUA_CFLAGS) -DOS_POSIX -DSHARE_LIOLIB -shared -fPIC -o $@ $(SOURCES)
+
+ subprocess.html: subprocess.txt
+ $(ASCIIDOC) $<
+@@ -36,7 +36,8 @@ clean:
.PHONY: install
install: subprocess.so