diff --git a/libquvi-0.9.4-lua-5.2.patch b/libquvi-0.9.4-lua-5.2.patch new file mode 100644 index 0000000..d76dd7d --- /dev/null +++ b/libquvi-0.9.4-lua-5.2.patch @@ -0,0 +1,22 @@ +Index: libquvi-0.9.4/src/lua/init.c +=================================================================== +--- libquvi-0.9.4.orig/src/lua/init.c ++++ libquvi-0.9.4/src/lua/init.c +@@ -80,10 +80,17 @@ QuviError l_init(_quvi_t q) + return (QUVI_ERROR_LUA_INIT); + + luaL_openlibs(q->handle.lua); ++#if LUA_VERSION_NM < 502 + luaL_register(q->handle.lua, "quvi", quvi_reg_meth); + luaL_register(q->handle.lua, "quvi.http", quvi_http_reg_meth); + luaL_register(q->handle.lua, "quvi.crypto", quvi_crypto_reg_meth); + luaL_register(q->handle.lua, "quvi.base64", quvi_base64_reg_meth); ++#else ++ luaL_newlib(q->handle.lua, quvi_reg_meth); ++ luaL_newlib(q->handle.lua, quvi_http_reg_meth); ++ luaL_newlib(q->handle.lua, quvi_crypto_reg_meth); ++ luaL_newlib(q->handle.lua, quvi_base64_reg_meth); ++#endif + + return (QUVI_OK); + } diff --git a/libquvi.changes b/libquvi.changes index 1222585..c3928a3 100644 --- a/libquvi.changes +++ b/libquvi.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Jul 18 02:45:31 UTC 2015 - i@marguerite.su + +- add patch: libquvi-0.9.4-lua-5.2.patch + * compatibility w/ lua 5.2+ + * luaL_register replaced by luaL_newlib + ------------------------------------------------------------------- Tue Mar 10 13:00:17 CET 2015 - sbrabec@suse.cz diff --git a/libquvi.spec b/libquvi.spec index b84b807..df13ad3 100644 --- a/libquvi.spec +++ b/libquvi.spec @@ -29,6 +29,8 @@ Source: http://sourceforge.net/projects/quvi/files/0.9/libquvi/libquvi-0 Source1: %{name}.rpmlintrc # PATCH-FEATURE-OPENSUSE libquvi-stable-build-date.patch sbrabec@suse.cz -- Don't embed build date. Triggers rebuild. Patch0: %{name}-stable-build-date.patch +# PATCH-FIX-UPSTREAM marguerite@opensuse.org -- compatibility for lua 5.2+ +Patch1: %{name}-%{version}-lua-5.2.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool @@ -74,6 +76,7 @@ if test -f %{_sourcedir}/%{name}.changes ; then echo "timestamp for BUILD_TIME" >stamp-build-time touch -d "$(sed -n '2s/ - .*$//p' <%{_sourcedir}/%{name}.changes)" stamp-build-time fi +%patch1 -p1 %build export CFLAGS="%{optflags} -DLUA_COMPAT_MODULE"