Commit 7294a771 authored by Ted Trask's avatar Ted Trask

main/lua-subprocess: update to 0.0.20141229

parent beea7418
# Contributor: Ted Trask <ttrask01@yahoo.com>
# Maintainer: Ted Trask <ttrask01@yahoo.com>
_luaversions="5.1 5.2"
pkgname=lua-subprocess
pkgver=0.0.20121211
pkgrel=2
pkgver=0.0.20141229
pkgrel=0
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"
url="https://github.com/tdtrask/lua-subprocess"
arch="all"
license="AS-IS"
depends=""
depends_dev=""
makedepends="$depends_dev lua-dev"
install=""
depends_dev=""
makedepends="$depends_dev asciidoc"
subpackages=""
for _i in $_luaversions; do
makedepends="$makedepends lua$_i-dev"
subpackages="$subpackages lua$_i-subprocess:split_${_i/./_}"
done
source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz
luafileobject.patch
openexception.patch
makefile.patch"
_builddir="$srcdir/$pkgname-$pkgver"
_giturl="git://github.com/xlq/lua-subprocess.git"
_giturl="git://github.com/tdtrask/lua-subprocess.git"
_upload="dev.alpinelinux.org:/archive/$pkgname/"
snapshot() {
......@@ -40,26 +44,55 @@ snapshot() {
abuild checksum
}
_sdir="$srcdir"/$pkgname-$pkgver
prepare() {
local i
cd "$_builddir"
cd "$_sdir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
for _i in $_luaversions; do
cp -r "$_sdir" "$srcdir"/build-$_i
done
}
build() {
cd "$_builddir"
for _i in $_luaversions; do
cd "$srcdir"/build-$_i
make lua_package="lua$_i" || return 1
done
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
for _i in $_luaversions; do
cd "$srcdir"/build-$_i
make lua_package="lua$_i" DESTDIR="$pkgdir" install || return 1
done
}
_split() {
local d= _ver=$1
pkgdesc="A Lua $_ver module written in C that allows you to create child processes and communicate with them"
replaces="$pkgname"
depends=
for d in usr/lib/lua usr/share/lua; do
if [ -d "$pkgdir"/$d/$_ver ]; then
mkdir -p "$subpkgdir"/$d
mv "$pkgdir"/$d/$_ver "$subpkgdir"/$d/ || return 1
fi
done
}
md5sums="c2f13ef8e1fb83af43d61586ff611957 lua-subprocess-0.0.20121211.tar.gz
4e16e1e15c3625a739b9ccff15341895 luafileobject.patch
fa869a7c9a11faf77ad9fd98ba35f62a openexception.patch
65e10847e5b8dccc1053d69855f6fc76 makefile.patch"
for _i in $_luaversions; do
eval "split_${_i/./_}() { _split $_i; }"
done
md5sums="a2ab629c701eba6f3300405daf104f1d lua-subprocess-0.0.20141229.tar.gz
f1e3718f4bcc74c7903354c5ddab0229 makefile.patch"
sha256sums="6d58417d9e2791408092ec2b232072c0461343954d3f72ee6943b0103ac6ce20 lua-subprocess-0.0.20141229.tar.gz
0f99c91db81e4dc2d3f49fdb6ab4bc6970f369752f2092c286456c6641ada1f3 makefile.patch"
sha512sums="5d0648a883102172bc086a0054f76832d25ce760149f0e0ddac927a325815b1937e780efc5d553bb6b751ed7642d728ff37745be134dfdb42753bde3b338a1b9 lua-subprocess-0.0.20141229.tar.gz
86cccb94ad5bf13c0ce85bc61d899f83d48ee46f06f8a49ef1f720c08a055165c2cb1b5b0596f8d14a237bcab7f2de7e9b2f2ecb11441802e07e6baa01d50b1f makefile.patch"
--- 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);
......@@ -9,13 +9,3 @@
subprocess.html: subprocess.txt
$(ASCIIDOC) $<
@@ -36,7 +36,8 @@ clean:
.PHONY: install
install: subprocess.so
- $(INSTALL) -m755 subprocess.so $(INSTALL_CMOD)/
+ mkdir -p $(DESTDIR)$(INSTALL_CMOD)/
+ $(INSTALL) -m755 subprocess.so $(DESTDIR)$(INSTALL_CMOD)/
.PHONY: uninstall
uninstall:
--- ./src/lua-subprocess-0.0.20121211/subprocess.c
+++ ./subprocess.c
@@ -1130,6 +1130,8 @@
if (r != 1){
return r;
}
+ lua_replace(L, 1);
+ lua_settop(L, 1);
return proc_wait(L);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment