From ef7b0ca2381417010921206f8ef7c16110c5d54334c8729b820747d0288d3384 Mon Sep 17 00:00:00 2001 From: Andreas Stieger Date: Tue, 22 Jul 2025 00:15:48 +0200 Subject: [PATCH] fix gcc15 and other stuff --- libstrophe-0.14.0-gcc15.patch | 53 +++++++++++++++++++++++++++ libstrophe-0.14.0.tar.xz.asc | 7 ++++ libstrophe.changes | 7 ++++ libstrophe.keyring | 24 +++++++++++++ libstrophe.spec | 67 +++++++++++++++++++---------------- 5 files changed, 127 insertions(+), 31 deletions(-) create mode 100644 libstrophe-0.14.0-gcc15.patch create mode 100644 libstrophe-0.14.0.tar.xz.asc create mode 100644 libstrophe.keyring diff --git a/libstrophe-0.14.0-gcc15.patch b/libstrophe-0.14.0-gcc15.patch new file mode 100644 index 0000000..e3cadb9 --- /dev/null +++ b/libstrophe-0.14.0-gcc15.patch @@ -0,0 +1,53 @@ +From dfb3e868248d86fc0f5553dffbb6f7c367c3c383 Mon Sep 17 00:00:00 2001 +From: Steffen Jaeckel +Date: Wed, 26 Mar 2025 14:14:19 +0100 +Subject: [PATCH] Use `void*` to store function pointer when compiled as C23. + +[0] decided that `rettype (*foo)();` must now be interpreted as +`rettype (*foo)(void);`. Luckily it also allows now to store function +pointers in a `void*` (c.f. Ch. J.5.7). + +[0]: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf + +Signed-off-by: Steffen Jaeckel +--- + src/common.h | 7 ++++++- + src/handler.c | 2 -- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/src/common.h b/src/common.h +index 75134bea..c387c0fe 100644 +--- a/src/common.h ++++ b/src/common.h +@@ -30,12 +30,17 @@ + #include "snprintf.h" + + /** handlers **/ ++#if (__STDC_VERSION__ >= 202000L) ++typedef void* xmpp_void_handler; ++#else ++typedef int (*xmpp_void_handler)(); ++#endif + + typedef struct _xmpp_handlist_t xmpp_handlist_t; + struct _xmpp_handlist_t { + /* common members */ + int user_handler; +- int (*handler)(); ++ xmpp_void_handler handler; + void *userdata; + int enabled; /* handlers are added disabled and enabled after the + * handler chain is processed to prevent stanzas from +diff --git a/src/handler.c b/src/handler.c +index 1c9bf9f7..05772522 100644 +--- a/src/handler.c ++++ b/src/handler.c +@@ -25,8 +25,6 @@ + #include "common.h" + #include "ostypes.h" + +-typedef int (*xmpp_void_handler)(); +- + /* Remove item from the list pointed by head, but don't free it. + * There can be a situation when user's handler deletes another handler which + * is the previous in the list. handler_fire_stanza() and handler_fire_timed() diff --git a/libstrophe-0.14.0.tar.xz.asc b/libstrophe-0.14.0.tar.xz.asc new file mode 100644 index 0000000..34e90ce --- /dev/null +++ b/libstrophe-0.14.0.tar.xz.asc @@ -0,0 +1,7 @@ +-----BEGIN PGP SIGNATURE----- + +iHUEABYKAB0WIQT4rcH5pop6/w4sieQ5Gl78LRcJ3gUCaCn3zAAKCRA5Gl78LRcJ +3pmfAP9mWrzwKU/7hlkSWz5ALvGjCRmVQ5WRx7rh+CGpZEGHcwD/UmaXF3Ae38Zf +L3hCJVz0fKMHBhtEhb3y2kPfRW0Wxws= +=TmDi +-----END PGP SIGNATURE----- diff --git a/libstrophe.changes b/libstrophe.changes index 0e13af2..f84ad03 100644 --- a/libstrophe.changes +++ b/libstrophe.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Jul 21 22:14:40 UTC 2025 - Andreas Stieger + +- fix gcc15 build, add libstrophe-0.14.0-gcc15.patch from upstream +- add upstream signing key +- do not bootstrap during build, and other spec file tweaks + ------------------------------------------------------------------- Thu Mar 13 14:15:02 UTC 2025 - Michael Vetter diff --git a/libstrophe.keyring b/libstrophe.keyring new file mode 100644 index 0000000..0c5f796 --- /dev/null +++ b/libstrophe.keyring @@ -0,0 +1,24 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Comment: F8AD C1F9 A68A 7AFF 0E2C 89E4 391A 5EFC 2D17 09DE +Comment: Steffen Jaeckel +Comment: Steffen Jaeckel + +xjMEXnNywRYJKwYBBAHaRw8BAQdASY7Vabe7Q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git a/libstrophe.spec b/libstrophe.spec index da15f95..fcc472e 100644 --- a/libstrophe.spec +++ b/libstrophe.spec @@ -2,6 +2,7 @@ # spec file for package libstrophe # # Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 Andreas Stieger # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,75 +17,79 @@ # -%define c_lib libstrophe0 +%define sover 0 Name: libstrophe Version: 0.14.0 Release: 0 Summary: A XMPP library for C License: GPL-3.0-or-later OR MIT Group: Development/Libraries/C and C++ -URL: http://strophe.im/libstrophe/ +URL: https://strophe.im/libstrophe/ Source0: https://github.com/strophe/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: gcc -BuildRequires: libopenssl-devel -BuildRequires: libtool -BuildRequires: libxml2-devel -BuildRequires: make +Source1: https://github.com/strophe/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz.asc +# https://github.com/strophe/libstrophe/blob/0.14.0/README.markdown +# "Releases are signed with the GPG key with ID F8ADC1F9A68A7AFF0E2C89E4391A5EFC2D1709DE" +Source2: %{name}.keyring +Patch0: libstrophe-0.14.0-gcc15.patch BuildRequires: pkgconfig +BuildRequires: pkgconfig(libcrypto) +BuildRequires: pkgconfig(libssl) +BuildRequires: pkgconfig(libxml-2.0) >= 2.7 +BuildRequires: pkgconfig(zlib) %description Strophe is a collection of libraries for speaking the XMPP protocol. -While most XMPP libraries and implementations are focused on chat-based applications, -Strophe takes a grander view. +While most XMPP libraries and implementations are focused on chat-based +applications, Strophe takes a grander view. -It has been used to implement real-time games, notification systems, search engines, -as well as traditional instant messaging. +It has been used to implement real-time games, notification systems, search +engines, as well as traditional instant messaging. -The implementations are production ready, well documented, -easy to use, and easy to extend. +The implementations are production ready, well documented, easy to use, and +easy to extend. -%package -n libstrophe-devel +%package devel Summary: Development files for libstrophe Group: Development/Libraries/C and C++ -Requires: libstrophe0 = %{version} +Requires: %{name}%{sover} = %{version} -%description -n libstrophe-devel +%description devel Development files and headers for libstrophe -%package -n %{c_lib} +%package -n %{name}%{sover} Summary: A XMPP library for C Group: System/Libraries -%description -n %{c_lib} +%description -n %{name}%{sover} The libstrophe library is a XMPP library written in C. %prep -%setup -q +%autosetup -p1 %build -./bootstrap.sh -%configure --with-libxml2 -make %{?_smp_mflags} +%configure \ + --with-libxml2 \ + --disable-static \ + %{nil} +%make_build %install %make_install -rm %{buildroot}%{_libdir}/libstrophe.{a,la} +find %{buildroot} -type f -name "*.la" -delete -print %check -make check +%make_build check -%post -n libstrophe0 -p /sbin/ldconfig -%postun -n libstrophe0 -p /sbin/ldconfig +%ldconfig_scriptlets -n %{name}%{sover} -%files -n libstrophe0 +%files -n %{name}%{sover} %license COPYING %doc ChangeLog README -%{_libdir}/libstrophe.so.* +%{_libdir}/libstrophe.so.%{sover}{,.*} -%files -n libstrophe-devel +%files devel +%license COPYING %{_libdir}/libstrophe.so %{_includedir}/strophe.h %{_libdir}/pkgconfig/libstrophe.pc -- 2.49.0