diff --git a/socket_wrapper-fix-cmocka-1.1.6+-support.patch b/socket_wrapper-fix-cmocka-1.1.6+-support.patch new file mode 100644 index 0000000..1e1ef98 --- /dev/null +++ b/socket_wrapper-fix-cmocka-1.1.6+-support.patch @@ -0,0 +1,33 @@ +From 97fe09e583f6e2ef94623c872e0c56bcd8817303 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Fri, 17 Feb 2023 17:51:27 +0100 +Subject: [PATCH] cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Andreas Schneider +Reviewed-by: Pavel Filipenský +--- + tests/CMakeLists.txt | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 6c3aae9..3748461 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -7,6 +7,11 @@ include_directories( + ${CMOCKA_INCLUDE_DIR} + ) + ++# Required for cmocka >= 1.1.6 ++if (TARGET cmocka::cmocka) ++ set(CMOCKA_LIBRARY cmocka::cmocka) ++endif() ++ + set(TORTURE_LIBRARY torture) + + # RFC862 echo server +-- +2.39.2 + diff --git a/socket_wrapper.spec b/socket_wrapper.spec index a348625..9f8d6b1 100644 --- a/socket_wrapper.spec +++ b/socket_wrapper.spec @@ -1,14 +1,15 @@ Name: socket_wrapper Version: 1.4.0 -Release: 1%{?dist} +Release: 2%{?dist} -License: BSD +License: BSD-3-Clause Summary: A library passing all socket communications through Unix sockets Url: http://cwrap.org/ Source0: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz Source1: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz.asc Source2: socket_wrapper.keyring +Patch0: socket_wrapper-fix-cmocka-1.1.6+-support.patch BuildRequires: cmake BuildRequires: gcc @@ -48,7 +49,7 @@ Development headers for applications with the need to call socket_wrapper_enabled(). %prep -gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0} +%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %autosetup -p1 %build @@ -90,6 +91,9 @@ LD_PRELOAD=%{__cmake_builddir}/src/libsocket_wrapper.so bash -c '>/dev/null' %{_libdir}/pkgconfig/socket_wrapper_noop.pc %changelog +* Thu Feb 23 2023 Andreas Schneider - 1.4.0-2 +- Fix building with cmocka >= 1.1.6 + * Thu Jan 19 2023 Andreas Schneider - 1.4.0-1 - Update to version 1.4.0 * https://gitlab.com/cwrap/socket_wrapper/-/blob/socket_wrapper-1.4.0/CHANGELOG