summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim A. Misbakh-Soloviov <git@mva.name>2017-06-19 19:09:49 +0700
committerVadim A. Misbakh-Soloviov <git@mva.name>2017-06-19 19:09:49 +0700
commit01a331ab70ede091196cab177ab88af7f7edffca (patch)
tree7f61464d4231c905f40e6345262dd1d5e5167b13 /dev-lua/lua-spawn
parentvips: fixes (diff)
downloadlua-01a331ab70ede091196cab177ab88af7f7edffca.tar.gz
lua-01a331ab70ede091196cab177ab88af7f7edffca.tar.bz2
lua-01a331ab70ede091196cab177ab88af7f7edffca.zip
moving some non-resty packages to non-colliding naming
Diffstat (limited to 'dev-lua/lua-spawn')
-rw-r--r--dev-lua/lua-spawn/files/patches/9999/compat53-luajit21.patch111
-rw-r--r--dev-lua/lua-spawn/lua-spawn-9999.ebuild45
-rw-r--r--dev-lua/lua-spawn/metadata.xml14
3 files changed, 170 insertions, 0 deletions
diff --git a/dev-lua/lua-spawn/files/patches/9999/compat53-luajit21.patch b/dev-lua/lua-spawn/files/patches/9999/compat53-luajit21.patch
new file mode 100644
index 0000000..7b35a62
--- /dev/null
+++ b/dev-lua/lua-spawn/files/patches/9999/compat53-luajit21.patch
@@ -0,0 +1,111 @@
+--- a/vendor/compat-5.3/c-api/compat-5.3.h 2017-05-10 19:43:02.701992608 +0700
++++ b/vendor/compat-5.3/c-api/compat-5.3.h 2017-05-10 19:42:51.026426540 +0700
+@@ -95,8 +95,10 @@
+ #define lua_compare COMPAT53_CONCAT(COMPAT53_PREFIX, _compare)
+ COMPAT53_API int lua_compare (lua_State *L, int idx1, int idx2, int op);
+
++#ifndef COMPAT53_IS_LUAJIT
+ #define lua_copy COMPAT53_CONCAT(COMPAT53_PREFIX, _copy)
+ COMPAT53_API void lua_copy (lua_State *L, int from, int to);
++#endif
+
+ #define lua_getuservalue(L, i) \
+ (lua_getfenv(L, i), lua_type(L, -1))
+@@ -106,10 +108,12 @@
+ #define lua_len COMPAT53_CONCAT(COMPAT53_PREFIX, _len)
+ COMPAT53_API void lua_len (lua_State *L, int i);
+
++#ifndef COMPAT53_IS_LUAJIT
+ #define luaL_newlibtable(L, l) \
+ (lua_createtable(L, 0, sizeof(l)/sizeof(*(l))-1))
+ #define luaL_newlib(L, l) \
+ (luaL_newlibtable(L, l), luaL_register(L, NULL, l))
++#endif
+
+ #define lua_pushglobaltable(L) \
+ lua_pushvalue(L, LUA_GLOBALSINDEX)
+@@ -122,11 +126,13 @@
+
+ #define lua_rawlen(L, i) lua_objlen(L, i)
+
++#ifndef COMPAT53_IS_LUAJIT
+ #define lua_tointegerx COMPAT53_CONCAT(COMPAT53_PREFIX, _tointegerx)
+ COMPAT53_API lua_Integer lua_tointegerx (lua_State *L, int i, int *isnum);
+
+ #define lua_tonumberx COMPAT53_CONCAT(COMPAT53_PREFIX, _tonumberx)
+ COMPAT53_API lua_Number lua_tonumberx (lua_State *L, int i, int *isnum);
++#endif
+
+ #define luaL_checkversion COMPAT53_CONCAT(COMPAT53_PREFIX, L_checkversion)
+ COMPAT53_API void luaL_checkversion (lua_State *L);
+@@ -140,6 +146,7 @@
+ #define luaL_len COMPAT53_CONCAT(COMPAT53_PREFIX, L_len)
+ COMPAT53_API int luaL_len (lua_State *L, int i);
+
++#ifndef COMPAT53_IS_LUAJIT
+ #define luaL_setfuncs COMPAT53_CONCAT(COMPAT53_PREFIX, L_setfuncs)
+ COMPAT53_API void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup);
+
+@@ -148,6 +155,7 @@
+
+ #define luaL_testudata COMPAT53_CONCAT(COMPAT53_PREFIX, L_testudata)
+ COMPAT53_API void *luaL_testudata (lua_State *L, int i, const char *tname);
++#endif
+
+ #define luaL_tolstring COMPAT53_CONCAT(COMPAT53_PREFIX, L_tolstring)
+ COMPAT53_API const char *luaL_tolstring (lua_State *L, int idx, size_t *len);
+--- a/vendor/compat-5.3/c-api/compat-5.3.c 2017-05-10 19:58:14.246778970 +0700
++++ b/vendor/compat-5.3/c-api/compat-5.3.c 2017-05-10 19:58:07.354038934 +0700
+@@ -89,14 +89,14 @@
+ return 0;
+ }
+
+-
++#ifndef COMPAT53_IS_LUAJIT
+ COMPAT53_API void lua_copy (lua_State *L, int from, int to) {
+ int abs_to = lua_absindex(L, to);
+ luaL_checkstack(L, 1, "not enough stack slots");
+ lua_pushvalue(L, from);
+ lua_replace(L, abs_to);
+ }
+-
++#endif
+
+ COMPAT53_API void lua_len (lua_State *L, int i) {
+ switch (lua_type(L, i)) {
+@@ -131,7 +131,7 @@
+ lua_rawset(L, abs_i);
+ }
+
+-
++#ifndef COMPAT53_IS_LUAJIT
+ COMPAT53_API lua_Integer lua_tointegerx (lua_State *L, int i, int *isnum) {
+ lua_Integer n = lua_tointeger(L, i);
+ if (isnum != NULL) {
+@@ -148,6 +147,7 @@
+ }
+ return n;
+ }
++#endif
+
+
+ COMPAT53_API void luaL_checkversion (lua_State *L) {
+@@ -194,7 +194,7 @@
+ return res;
+ }
+
+-
++#ifndef COMPAT53_IS_LUAJIT
+ COMPAT53_API void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) {
+ luaL_checkstack(L, nup+1, "too many upvalues");
+ for (; l->name != NULL; l++) { /* fill the table with given functions */
+@@ -231,7 +231,7 @@
+ }
+ return p;
+ }
+-
++#endif
+
+ COMPAT53_API const char *luaL_tolstring (lua_State *L, int idx, size_t *len) {
+ if (!luaL_callmeta(L, idx, "__tostring")) {
+
diff --git a/dev-lua/lua-spawn/lua-spawn-9999.ebuild b/dev-lua/lua-spawn/lua-spawn-9999.ebuild
new file mode 100644
index 0000000..0f4bed8
--- /dev/null
+++ b/dev-lua/lua-spawn/lua-spawn-9999.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+VCS="git"
+GITHUB_A="daurnimator"
+IS_MULTILIB=true
+
+inherit lua
+
+DESCRIPTION="A lua library to spawn programs"
+HOMEPAGE="https://github.com/daurnimator/lua-spawn"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS=""
+IUSE="examples"
+
+EXAMPLES=(spec/.)
+
+DEPEND="
+ dev-lua/lunix
+"
+RDEPEND="
+ ${RDEPEND}
+"
+
+PATCHES=("${FILESDIR}/patches/${PV}")
+
+all_lua_prepare() {
+ mv "${PN}/posix.c" "${S}"
+ lua_default
+}
+
+each_lua_compile() {
+ _lua_setFLAGS
+ ${CC} ${CFLAGS} ${LDFLAGS} -I./vendor/compat-5.3/c-api/ -I$(lua_get_incdir) posix.c -o ${PN}.so
+}
+
+each_lua_install() {
+ dolua "${PN}"
+ dolua "${PN}.so"
+}
+
diff --git a/dev-lua/lua-spawn/metadata.xml b/dev-lua/lua-spawn/metadata.xml
new file mode 100644
index 0000000..23da526
--- /dev/null
+++ b/dev-lua/lua-spawn/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>mva@mva.name</email>
+ <description>
+ If you have any issues, please contact me, or try to find me in IRC on Freenode, OFTC or RusNet.
+ </description>
+ <name>Vadim A. Misbakh-Soloviov</name>
+</maintainer>
+<longdescription>FIXME</longdescription>
+<use>
+</use>
+</pkgmetadata>