SHA256
1
0
forked from pool/lua-ldbus

Compare commits

5 Commits

Author SHA256 Message Date
c182eed743 Unbundle vendored compat-5.3 and build with Lua 5.5. 2026-01-23 10:09:43 +01:00
8df0f6d1e7 Enable lua55 build 2026-01-21 21:42:50 +01:00
8afe48fc3e Switch off building lua51 build of the package. 2025-10-24 16:48:14 +02:00
5e99d5dd2d Update to a version 0.0+git20250404.5cc933b:
- Lua 5.4 is now supported
  - src/message_iter: Bind dbus_mesage_iter_get_element_count()
  - Added support for DESTDIR
  - src/message_iter: Maintain reference to underlying DBusMessage
Remove obsolete conditionals for openSUSE/Leap 42.3
Remove upstreamed patch:
  - lua54.patch
Update to a version 0.0+git20250404.5cc933b:
  * src/message_iter: Maintain reference to underlying DBusMessage
  * Added support for DESTDIR
  * src/message_iter: Bind dbus_mesage_iter_get_element_count()
  * Lua 5.4 is now supported
  * Squashed 'vendor/compat-5.3/' changes from daebe77..e245d3a
2025-10-11 17:52:52 +02:00
11c85c69f7 Add luajit version to _multibuild 2025-10-06 10:47:19 +02:00
11 changed files with 192 additions and 48 deletions

1
.gitattributes vendored
View File

@@ -21,3 +21,4 @@
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*.changes merge=merge-changes

7
.gitignore vendored
View File

@@ -1 +1,6 @@
.osc
*.obscpio
*.osc
_build.*
.pbuild
ldbus/
lua*-ldbus-*-build/

View File

@@ -1,5 +1,6 @@
<multibuild>
<package>lua51</package>
<package>luajit</package>
<package>lua53</package>
<package>lua54</package>
<package>lua55</package>
</multibuild>

View File

@@ -1,16 +1,15 @@
<services>
<service name="tar_scm" mode="disabled">
<service name="tar_scm" mode="manual">
<param name="url">https://github.com/daurnimator/ldbus</param>
<param name="filename">lua-ldbus</param>
<param name="versionformat">0.0+git%cd.%h</param>
<param name="scm">git</param>
<param name="revision">9e176fe851006037a643610e6d8f3a8e597d4073</param>
<param name="changesgenerate">enable</param>
</service>
<service name="recompress" mode="disabled">
<service name="recompress" mode="manual">
<param name="compression">xz</param>
<param name="file">*.tar</param>
</service>
<service name="set_version" mode="disabled" />
<service name="set_version" mode="manual" />
</services>

View File

@@ -1,4 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/daurnimator/ldbus</param>
<param name="changesrevision">9e176fe851006037a643610e6d8f3a8e597d4073</param></service></servicedata>
<param name="changesrevision">5cc933bfad2b73674bc005ebcce771555a614792</param></service></servicedata>

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ee7ea297910ef0b727d29df129059a7c370dbd57ed5fa92f4a23e99f116345df
size 58436

Binary file not shown.

View File

@@ -1,3 +1,36 @@
-------------------------------------------------------------------
Fri Jan 23 09:09:11 UTC 2026 - Matej Cepl <mcepl@cepl.eu>
- Add unbundle-vendoring.patch to unbundle vendored compat-5.3
library and make it possible to build with Lua 5.5.
-------------------------------------------------------------------
Fri Oct 24 14:48:14 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
- Switch off building lua51 build of the package.
-------------------------------------------------------------------
Sat Oct 11 15:43:45 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
- Update to a version 0.0+git20250404.5cc933b:
- Lua 5.4 is now supported
- src/message_iter: Bind dbus_mesage_iter_get_element_count()
- Added support for DESTDIR
- src/message_iter: Maintain reference to underlying DBusMessage
- Remove obsolete conditionals for openSUSE/Leap 42.3
- Remove upstreamed patch:
- lua54.patch
-------------------------------------------------------------------
Sat Oct 11 15:25:16 UTC 2025 - Matej Cepl <mcepl@cepl.eu>
- Update to a version 0.0+git20250404.5cc933b:
* src/message_iter: Maintain reference to underlying DBusMessage
* Added support for DESTDIR
* src/message_iter: Bind dbus_mesage_iter_get_element_count()
* Lua 5.4 is now supported
* Squashed 'vendor/compat-5.3/' changes from daebe77..e245d3a
-------------------------------------------------------------------
Wed Jan 25 12:37:35 UTC 2023 - Michal Suchanek <msuchanek@suse.de>

View File

@@ -18,22 +18,21 @@
%define flavor @BUILD_FLAVOR@
%define mod_name ldbus
Version: 0.0+git20190816.9e176fe
Version: 0.0+git20250404.5cc933b
Release: 0
Summary: Lua bindings to dbus
License: MIT
Group: Development/Libraries/Other
URL: https://github.com/daurnimator/ldbus/
URL: https://github.com/daurnimator/ldbus
Source: lua-ldbus-%{version}.tar.xz
Patch0: lua54.patch
# PATCH-FIX-OPENSUSE unbundle-vendoring.patch mcepl@suse.com
# Don't rely on vendored compat-5.3
Patch0: unbundle-vendoring.patch
BuildRequires: %{flavor}-devel
BuildRequires: %{flavor}-compat-5.3
BuildRequires: lua-macros
Requires: %{flavor}
%if 0%{?suse_version} < 1330
BuildRequires: dbus-1-devel
%else
BuildRequires: pkgconfig(dbus-1)
%endif
%lua_provides
%if "%{flavor}" == ""
Name: lua-%{mod_name}
@@ -48,23 +47,16 @@ ldbus is a C binding to dbus for Lua.
%prep
%autosetup -n lua-ldbus-%{version} -p1
%if "%{flavor}" != "lua53"
sed -i -e "s/lua5.3/lua%{lua_version}/" src/Makefile
%endif
rm -r vendor/
%build
%if 0%{?suse_version} < 1330
export CFLAGS="-I/usr/include/lua%{lua_version} -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include"
%if "%{flavor}" != "lua53"
export CFLAGS="$CFLAGS -Ivendor/compat-5.3"
%endif
%endif
cd src
make %{?_make_output_sync} %{?_smp_mflags}
export CFLAGS="%{optflags} -I%{lua_incdir}"
make %{?_make_output_sync} %{?_smp_mflags} LUA_PKGNAME="lua" LUA_LIBDIR="%{lua_archdir}"
%install
cd src
%make_install LUA_LIBDIR='$(DESTDIR)%{lua_archdir}'
%make_install LUA_LIBDIR='%{lua_archdir}'
%files
%license LICENSE

View File

@@ -1,20 +0,0 @@
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

133
unbundle-vendoring.patch Normal file
View File

@@ -0,0 +1,133 @@
---
src/Makefile | 3 +--
src/bus.c | 2 +-
src/connection.c | 2 +-
src/ldbus.c | 2 +-
src/message.c | 2 +-
src/message_iter.c | 2 +-
src/pending_call.c | 2 +-
src/timeout.c | 2 +-
src/watch.c | 2 +-
9 files changed, 9 insertions(+), 10 deletions(-)
Index: lua-ldbus-0.0+git20250404.5cc933b/src/Makefile
===================================================================
--- lua-ldbus-0.0+git20250404.5cc933b.orig/src/Makefile 2025-04-04 03:51:09.000000000 +0200
+++ lua-ldbus-0.0+git20250404.5cc933b/src/Makefile 2026-01-23 09:58:57.631072662 +0100
@@ -5,11 +5,10 @@
CFLAGS += -Wall -Wextra --pedantic -Wno-long-long
CFLAGS += `$(PKG_CONFIG) --cflags $(LUA_PKGNAME) dbus-1`
CFLAGS += -fPIC
-CFLAGS += -I ../vendor/compat-5.3/c-api
LIBS = `$(PKG_CONFIG) --libs dbus-1`
-OBJS = ldbus.o error.o pending_call.o connection.o bus.o message.o message_iter.o timeout.o watch.o ../vendor/compat-5.3/c-api/compat-5.3.o
+OBJS = ldbus.o error.o pending_call.o connection.o bus.o message.o message_iter.o timeout.o watch.o
all: ldbus.so
Index: lua-ldbus-0.0+git20250404.5cc933b/src/bus.c
===================================================================
--- lua-ldbus-0.0+git20250404.5cc933b.orig/src/bus.c 2025-04-04 03:51:09.000000000 +0200
+++ lua-ldbus-0.0+git20250404.5cc933b/src/bus.c 2026-01-23 10:01:04.006511523 +0100
@@ -2,7 +2,7 @@
#include <lua.h>
#include <lauxlib.h>
-#include "compat-5.3.h"
+#include <c-api/compat-5.3.h>
#include <dbus/dbus.h>
Index: lua-ldbus-0.0+git20250404.5cc933b/src/connection.c
===================================================================
--- lua-ldbus-0.0+git20250404.5cc933b.orig/src/connection.c 2025-04-04 03:51:09.000000000 +0200
+++ lua-ldbus-0.0+git20250404.5cc933b/src/connection.c 2026-01-23 10:01:08.126519972 +0100
@@ -3,7 +3,7 @@
#include <lua.h>
#include <lauxlib.h>
-#include "compat-5.3.h"
+#include <c-api/compat-5.3.h>
#include <dbus/dbus.h>
Index: lua-ldbus-0.0+git20250404.5cc933b/src/ldbus.c
===================================================================
--- lua-ldbus-0.0+git20250404.5cc933b.orig/src/ldbus.c 2025-04-04 03:51:09.000000000 +0200
+++ lua-ldbus-0.0+git20250404.5cc933b/src/ldbus.c 2026-01-23 10:01:16.950523489 +0100
@@ -2,7 +2,7 @@
#include <lua.h>
#include <lauxlib.h>
-#include "compat-5.3.h"
+#include <c-api/compat-5.3.h>
#include <dbus/dbus.h>
Index: lua-ldbus-0.0+git20250404.5cc933b/src/message.c
===================================================================
--- lua-ldbus-0.0+git20250404.5cc933b.orig/src/message.c 2025-04-04 03:51:09.000000000 +0200
+++ lua-ldbus-0.0+git20250404.5cc933b/src/message.c 2026-01-23 10:01:21.509998949 +0100
@@ -2,7 +2,7 @@
#include <lua.h>
#include <lauxlib.h>
-#include "compat-5.3.h"
+#include <c-api/compat-5.3.h>
#include <dbus/dbus.h>
Index: lua-ldbus-0.0+git20250404.5cc933b/src/message_iter.c
===================================================================
--- lua-ldbus-0.0+git20250404.5cc933b.orig/src/message_iter.c 2025-04-04 03:51:09.000000000 +0200
+++ lua-ldbus-0.0+git20250404.5cc933b/src/message_iter.c 2026-01-23 10:01:25.614629993 +0100
@@ -4,7 +4,7 @@
#include <lua.h>
#include <lauxlib.h>
-#include "compat-5.3.h"
+#include <c-api/compat-5.3.h>
#include <dbus/dbus.h>
Index: lua-ldbus-0.0+git20250404.5cc933b/src/pending_call.c
===================================================================
--- lua-ldbus-0.0+git20250404.5cc933b.orig/src/pending_call.c 2025-04-04 03:51:09.000000000 +0200
+++ lua-ldbus-0.0+git20250404.5cc933b/src/pending_call.c 2026-01-23 10:01:28.862200121 +0100
@@ -2,7 +2,7 @@
#include <lua.h>
#include <lauxlib.h>
-#include "compat-5.3.h"
+#include <c-api/compat-5.3.h>
#include <dbus/dbus.h>
Index: lua-ldbus-0.0+git20250404.5cc933b/src/timeout.c
===================================================================
--- lua-ldbus-0.0+git20250404.5cc933b.orig/src/timeout.c 2025-04-04 03:51:09.000000000 +0200
+++ lua-ldbus-0.0+git20250404.5cc933b/src/timeout.c 2026-01-23 10:01:32.782238881 +0100
@@ -2,7 +2,7 @@
#include <lua.h>
#include <lauxlib.h>
-#include "compat-5.3.h"
+#include <c-api/compat-5.3.h>
#include <dbus/dbus.h>
Index: lua-ldbus-0.0+git20250404.5cc933b/src/watch.c
===================================================================
--- lua-ldbus-0.0+git20250404.5cc933b.orig/src/watch.c 2025-04-04 03:51:09.000000000 +0200
+++ lua-ldbus-0.0+git20250404.5cc933b/src/watch.c 2026-01-23 10:01:34.573698709 +0100
@@ -2,7 +2,7 @@
#include <lua.h>
#include <lauxlib.h>
-#include "compat-5.3.h"
+#include <c-api/compat-5.3.h>
#include <dbus/dbus.h>