commit:     d516ee5db761e2e138a2958dc006523a7a26bbdf
Author:     Vadim A. Misbakh-Soloviov <git <AT> mva <DOT> name>
AuthorDate: Thu Aug 23 10:21:59 2018 +0000
Commit:     Vadim A. Misbakh-Soloviov <mva <AT> mva <DOT> name>
CommitDate: Thu Aug 23 10:21:59 2018 +0000
URL:        https://gitweb.gentoo.org/proj/lua.git/commit/?id=d516ee5d

lua-{spawn,stdlib,vips,zip,zlib},messagepack,specl: make them build again

 .../files/patches/9999/compat53-luajit21.patch     | 93 ++++++++++++----------
 dev-lua/lua-spawn/lua-spawn-9999.ebuild            | 10 +--
 dev-lua/lua-stdlib/lua-stdlib-9999.ebuild          |  8 +-
 dev-lua/lua-vips/lua-vips-9999.ebuild              |  2 +
 dev-lua/lua-zip/lua-zip-9999.ebuild                |  5 +-
 dev-lua/lua-zlib/lua-zlib-9999.ebuild              | 12 +--
 dev-lua/messagepack/messagepack-9999.ebuild        |  2 +-
 dev-lua/specl/specl-9999.ebuild                    | 15 ++--
 8 files changed, 72 insertions(+), 75 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
index 7b35a62..0c4b8f9 100644
--- a/dev-lua/lua-spawn/files/patches/9999/compat53-luajit21.patch
+++ b/dev-lua/lua-spawn/files/patches/9999/compat53-luajit21.patch
@@ -1,6 +1,6 @@
 --- 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 @@
+@@ -128,8 +128,10 @@ COMPAT53_API void lua_arith (lua_State *
  #define lua_compare COMPAT53_CONCAT(COMPAT53_PREFIX, _compare)
  COMPAT53_API int lua_compare (lua_State *L, int idx1, int idx2, int op);
  
@@ -10,57 +10,51 @@
 +#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);
+   (lua_getfenv((L), (i)), lua_type((L), -1))
+@@ -167,8 +169,10 @@ COMPAT53_API void lua_rawsetp(lua_State
  
-+#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)
+ #define lua_tointeger(L, i) lua_tointegerx((L), (i), NULL)
  
 +#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 @@
+@@ -191,6 +195,7 @@ COMPAT53_API int luaL_getsubtable (lua_S
  #define luaL_len COMPAT53_CONCAT(COMPAT53_PREFIX, L_len)
- COMPAT53_API int luaL_len (lua_State *L, int i);
+ COMPAT53_API lua_Integer 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 @@
+@@ -199,6 +204,7 @@ COMPAT53_API void luaL_setmetatable (lua
  
  #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);
+ #define luaL_traceback COMPAT53_CONCAT(COMPAT53_PREFIX, L_traceback)
+ COMPAT53_API void luaL_traceback (lua_State *L, lua_State *L1, const char 
*msg, int level);
+@@ -296,8 +302,10 @@ COMPAT53_API int lua_geti (lua_State *L,
+ #define lua_isinteger COMPAT53_CONCAT(COMPAT53_PREFIX, _isinteger)
+ COMPAT53_API int lua_isinteger (lua_State *L, int index);
+ 
++#ifndef COMPAT53_IS_LUAJIT
+ #define lua_tointegerx COMPAT53_CONCAT(COMPAT53_PREFIX, _tointegerx_53)
+ COMPAT53_API lua_Integer lua_tointegerx (lua_State *L, int i, int *isnum);
++#endif
+ 
+ #define lua_numbertointeger(n, p) \
+   ((*(p) = (lua_Integer)(n)), 1)
 --- 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;
+@@ -160,12 +160,14 @@ COMPAT53_API int lua_compare (lua_State
  }
  
--
+ 
 +#ifndef COMPAT53_IS_LUAJIT
  COMPAT53_API void lua_copy (lua_State *L, int from, int to) {
    int abs_to = lua_absindex(L, to);
@@ -68,21 +62,19 @@
    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);
+@@ -204,6 +206,7 @@ COMPAT53_API void lua_rawsetp (lua_State
  }
  
--
+ 
 +#ifndef COMPAT53_IS_LUAJIT
- COMPAT53_API lua_Integer lua_tointegerx (lua_State *L, int i, int *isnum) {
-   lua_Integer n = lua_tointeger(L, i);
+ COMPAT53_API lua_Number lua_tonumberx (lua_State *L, int i, int *isnum) {
+   lua_Number n = lua_tonumber(L, i);
    if (isnum != NULL) {
-@@ -148,6 +147,7 @@
+@@ -211,6 +214,7 @@ COMPAT53_API lua_Number lua_tonumberx (l
    }
    return n;
  }
@@ -90,22 +82,35 @@
  
  
  COMPAT53_API void luaL_checkversion (lua_State *L) {
-@@ -194,7 +194,7 @@
-   return res;
+@@ -259,6 +263,7 @@ COMPAT53_API lua_Integer luaL_len (lua_S
  }
  
--
+ 
 +#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 @@
+@@ -295,6 +300,7 @@ COMPAT53_API void *luaL_testudata (lua_S
    }
    return p;
  }
--
 +#endif
  
- COMPAT53_API const char *luaL_tolstring (lua_State *L, int idx, size_t *len) {
-   if (!luaL_callmeta(L, idx, "__tostring")) {
-
+ 
+ static int compat53_countlevels (lua_State *L) {
+@@ -731,6 +737,7 @@ COMPAT53_API int lua_isinteger (lua_Stat
+ }
+ 
+ 
++#ifndef COMPAT53_IS_LUAJIT
+ COMPAT53_API lua_Integer lua_tointegerx (lua_State *L, int i, int *isnum) {
+   int ok = 0;
+   lua_Number n = lua_tonumberx(L, i, &ok);
+@@ -745,6 +752,7 @@ COMPAT53_API lua_Integer lua_tointegerx
+     *isnum = 0;
+   return 0;
+ }
++#endif
+ 
+ 
+ static void compat53_reverse (lua_State *L, int a, int b) {

diff --git a/dev-lua/lua-spawn/lua-spawn-9999.ebuild 
b/dev-lua/lua-spawn/lua-spawn-9999.ebuild
index 0f4bed8..a3354bf 100644
--- a/dev-lua/lua-spawn/lua-spawn-9999.ebuild
+++ b/dev-lua/lua-spawn/lua-spawn-9999.ebuild
@@ -25,21 +25,19 @@ DEPEND="
 RDEPEND="
        ${RDEPEND}
 "
-
-PATCHES=("${FILESDIR}/patches/${PV}")
+MY_PN="${PN##lua-}"
 
 all_lua_prepare() {
-       mv "${PN}/posix.c" "${S}"
+       mv "${MY_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
+       ${CC} ${CFLAGS} ${LDFLAGS} -I./vendor/compat-5.3/c-api/ 
"-I$(lua_get_incdir)" posix.c -o "${MY_PN}"/posix.so
 }
 
 each_lua_install() {
-       dolua "${PN}"
-       dolua "${PN}.so"
+       dolua "${MY_PN}"/
 }
 

diff --git a/dev-lua/lua-stdlib/lua-stdlib-9999.ebuild 
b/dev-lua/lua-stdlib/lua-stdlib-9999.ebuild
index 0cfe7b0..d3c80ad 100644
--- a/dev-lua/lua-stdlib/lua-stdlib-9999.ebuild
+++ b/dev-lua/lua-stdlib/lua-stdlib-9999.ebuild
@@ -20,10 +20,10 @@ DOCS=(README.md NEWS.md STYLE.md)
 
 all_lua_prepare() {
        lua_default
-    mkdir -p html
-    sed \
-        -e '/^dir/s@"."@"../html"@' \
-        -i doc/config.ld.in
+       mkdir -p html
+       sed \
+               -e '/^dir/s@"."@"../html"@' \
+               -i doc/config.ld.in
 }
 
 each_lua_compile() { :; }

diff --git a/dev-lua/lua-vips/lua-vips-9999.ebuild 
b/dev-lua/lua-vips/lua-vips-9999.ebuild
index 9152c95..ab7402f 100644
--- a/dev-lua/lua-vips/lua-vips-9999.ebuild
+++ b/dev-lua/lua-vips/lua-vips-9999.ebuild
@@ -26,6 +26,8 @@ DEPEND="
 
 DOCS=(README.md)
 
+src_compile() { :; }
+
 each_lua_install() {
        dolua_jit src/*
 }

diff --git a/dev-lua/lua-zip/lua-zip-9999.ebuild 
b/dev-lua/lua-zip/lua-zip-9999.ebuild
index 5802e33..2505469 100644
--- a/dev-lua/lua-zip/lua-zip-9999.ebuild
+++ b/dev-lua/lua-zip/lua-zip-9999.ebuild
@@ -5,12 +5,13 @@ EAPI=6
 
 VCS="git"
 #GITHUB_A="brimworks"
-GITHUB_A="markuman"
+#GITHUB_A="markuman"
 
 inherit cmake-utils lua
 
 DESCRIPTION="Lua bindings to libzip"
-HOMEPAGE="https://github.com/brimworks/lua-zip";
+HOMEPAGE="https://git.osuv.de/m/lua-zip";
+EGIT_REPO_URI="https://git.osuv.de/m/lua-zip";
 
 LICENSE="MIT"
 SLOT="0"

diff --git a/dev-lua/lua-zlib/lua-zlib-9999.ebuild 
b/dev-lua/lua-zlib/lua-zlib-9999.ebuild
index bc1ef13..772bea0 100644
--- a/dev-lua/lua-zlib/lua-zlib-9999.ebuild
+++ b/dev-lua/lua-zlib/lua-zlib-9999.ebuild
@@ -6,7 +6,7 @@ EAPI=6
 VCS="git"
 GITHUB_A="brimworks"
 
-inherit lua
+inherit cmake-utils lua
 
 DESCRIPTION="Lua bindings to zlib"
 HOMEPAGE="http://github.com/brimworks/lua-zlib";
@@ -20,15 +20,7 @@ RDEPEND="sys-libs/zlib"
 DEPEND="${RDEPEND}"
 
 each_lua_configure() {
-       local myeconfargs=(
-               INCDIR=""
-               LIBDIR=""
-       )
-       lua_default
-}
-
-each_lua_compile() {
-       lua_default linux
+       cmake-utils_src_configure
 }
 
 each_lua_install() {

diff --git a/dev-lua/messagepack/messagepack-9999.ebuild 
b/dev-lua/messagepack/messagepack-9999.ebuild
index 3dd5240..b72a887 100644
--- a/dev-lua/messagepack/messagepack-9999.ebuild
+++ b/dev-lua/messagepack/messagepack-9999.ebuild
@@ -4,7 +4,7 @@
 EAPI=6
 
 VCS="git"
-GITHUB_A="fperrad"
+GITHUB_A="great90"
 GITHUB_PN="lua-${PN^}"
 
 inherit lua

diff --git a/dev-lua/specl/specl-9999.ebuild b/dev-lua/specl/specl-9999.ebuild
index 71e8ca2..7bbae01 100644
--- a/dev-lua/specl/specl-9999.ebuild
+++ b/dev-lua/specl/specl-9999.ebuild
@@ -6,11 +6,11 @@ EAPI=6
 VCS="git"
 GITHUB_A="gvvaughan"
 
-inherit lua
+inherit autotools lua
 
 EGIT_BRANCH="v14.1"
 
-DESCRIPTION="a testing tool for Lua, providing a Behaviour Driven Development 
framework in the vein of RSpec"
+DESCRIPTION="A testing tool for Lua, providing a Behaviour Driven Development"
 HOMEPAGE="https://github.com/gvvaughan/specl";
 
 LICENSE="GPL"
@@ -25,17 +25,16 @@ lua_add_bdepend dev-lua/lua-std-normalize
 
 DOCS=(README.md doc/specl.md NEWS.md)
 HTML_DOCS=(doc/.)
+#DOC_MAKE_TARGET="doc/specl.1"
 
-each_lua_compile() {
-       make lib/specl/version.lua
-}
-
-all_lua_compile() {
+all_lua_prepare() {
        lua_default
-       emake doc/specl.1
+       touch Makefile.am # Yup, kludges
+       eautoreconf
 }
 
 each_lua_install() {
        dobin bin/specl
+       rm lib/specl/version.lua.in # and here too
        dolua lib/specl
 }

Reply via email to