SHA256
10
0
forked from pool/lua-ldbus

Accepting request 819730 from home:gmbr3:testing

- Added lua54.patch to fix building with Lua 5.4

OBS-URL: https://build.opensuse.org/request/show/819730
OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua-ldbus?expand=0&rev=12
This commit is contained in:
2020-07-09 13:51:31 +00:00
committed by Git OBS Bridge
parent 111fe3c7a2
commit 20f8ac11c7
3 changed files with 27 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Jul 9 13:41:16 UTC 2020 - Callum Farmer <callumjfarmer13@gmail.com>
- Added lua54.patch to fix building with Lua 5.4
-------------------------------------------------------------------
Mon Jul 6 19:03:42 UTC 2020 - Matej Cepl <mcepl@suse.com>

View File

@@ -25,6 +25,7 @@ License: MIT
Group: Development/Libraries/Other
URL: https://github.com/daurnimator/ldbus/
Source: lua-ldbus-%{version}.tar.xz
Patch: lua54.patch
BuildRequires: %{flavor}-devel
Requires: %{flavor}
%if 0%{?suse_version} < 1330
@@ -47,7 +48,7 @@ Name: %{flavor}-%{mod_name}
ldbus is a C binding to dbus for Lua.
%prep
%setup -q -n lua-ldbus-%{version}
%autosetup -n lua-ldbus-%{version} -p1
%if "%{flavor}" != "lua53"
sed -i -e "s/lua5.3/lua%{lua_version}/" src/Makefile
%endif

20
lua54.patch Normal file
View File

@@ -0,0 +1,20 @@
diff --git a/vendor/compat-5.3/c-api/compat-5.3.h b/vendor/compat-5.3/c-api/compat-5.3.h
index 8e10893..52d2830 100644
--- a/vendor/compat-5.3/c-api/compat-5.3.h
+++ b/vendor/compat-5.3/c-api/compat-5.3.h
@@ -397,11 +397,11 @@ COMPAT53_API void luaL_requiref (lua_State *L, const char *modname,
/* other Lua versions */
-#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501 || LUA_VERSION_NUM > 503
+#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501
-# error "unsupported Lua version (i.e. not Lua 5.1, 5.2, or 5.3)"
+# error "unsupported Lua version (i.e. less than Lua 5.1)"
-#endif /* other Lua versions except 5.1, 5.2, and 5.3 */
+#endif