From 0e1e1e85defbec257e0a24dbdeb62c8fe2d024c483148a50dfb181361520479d Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 9 Jul 2020 13:52:34 +0000 Subject: [PATCH] Accepting request 819727 from home:gmbr3:testing - Added lua54.patch to fix building with Lua 5.4 OBS-URL: https://build.opensuse.org/request/show/819727 OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-lgi?expand=0&rev=22 --- lua-lgi.changes | 5 +++++ lua-lgi.spec | 3 ++- lua54.patch | 16 ++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 lua54.patch diff --git a/lua-lgi.changes b/lua-lgi.changes index 280f54c..a43ed51 100644 --- a/lua-lgi.changes +++ b/lua-lgi.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jul 9 13:23:34 UTC 2020 - Callum Farmer + +- Added lua54.patch to fix building with Lua 5.4 + ------------------------------------------------------------------- Mon Jul 6 19:04:01 UTC 2020 - Matej Cepl diff --git a/lua-lgi.spec b/lua-lgi.spec index a3e28bc..bb9c37d 100644 --- a/lua-lgi.spec +++ b/lua-lgi.spec @@ -26,6 +26,7 @@ License: MIT Group: Development/Languages/Other URL: https://github.com/pavouk/lgi Source0: https://github.com/pavouk/%{mod_name}/archive/%{version}.tar.gz#/%{mod_name}-%{version}.tar.gz +Patch: lua54.patch BuildRequires: %{flavor}-devel BuildRequires: pkgconfig BuildRequires: pkgconfig(gmodule-2.0) @@ -58,7 +59,7 @@ using gobject-introspection. Allows using GObject-based libraries directly from Lua. %prep -%setup -q -n %{mod_name}-%{version} +%autosetup -n %{mod_name}-%{version} -p1 %build make %{?_smp_mflags} V=1 \ diff --git a/lua54.patch b/lua54.patch new file mode 100644 index 0000000..041502d --- /dev/null +++ b/lua54.patch @@ -0,0 +1,16 @@ +diff --git a/lgi/callable.c b/lgi/callable.c +index e96d3af..3234b64 100644 +--- a/lgi/callable.c ++++ b/lgi/callable.c +@@ -1355,7 +1355,10 @@ closure_callback (ffi_cif *cif, void *ret, void **args, void *closure_arg) + } + else + { +-#if LUA_VERSION_NUM >= 502 ++#if LUA_VERSION_NUM >= 504 ++ int nresults; ++ res = lua_resume (L, NULL, npos, &nresults); ++#elif LUA_VERSION_NUM >= 502 + res = lua_resume (L, NULL, npos); + #else + res = lua_resume (L, npos);