From 595a011ea028168cc97d8aa25ac9bb55e310d0c7855e19b9d46524af79c2092f Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 27 Feb 2023 08:28:05 +0000 Subject: [PATCH] Fix building with cmocka >= 1.1.6 OBS-URL: https://build.opensuse.org/package/show/devel:tools/nss_wrapper?expand=0&rev=42 --- nss_wrapper-fix-cmocka-1.1.6+-support.patch | 31 +++++++++++++++++++++ nss_wrapper.changes | 6 ++++ nss_wrapper.spec | 1 + 3 files changed, 38 insertions(+) create mode 100644 nss_wrapper-fix-cmocka-1.1.6+-support.patch diff --git a/nss_wrapper-fix-cmocka-1.1.6+-support.patch b/nss_wrapper-fix-cmocka-1.1.6+-support.patch new file mode 100644 index 0000000..9e1ea36 --- /dev/null +++ b/nss_wrapper-fix-cmocka-1.1.6+-support.patch @@ -0,0 +1,31 @@ +From 2c879a0ffa70cee33329291d7576ec971d420da2 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 | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 3b94076..733cc4e 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -1,5 +1,9 @@ + project(tests C) + ++if (TARGET cmocka::cmocka) ++ set(CMOCKA_LIBRARY cmocka::cmocka) ++endif() ++ + set(TESTSUITE_LIBRARIES nss_utils ${NWRAP_REQUIRED_LIBRARIES} ${CMOCKA_LIBRARY}) + string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER) + +-- +2.39.2 + diff --git a/nss_wrapper.changes b/nss_wrapper.changes index 4148965..bed5e0b 100644 --- a/nss_wrapper.changes +++ b/nss_wrapper.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Feb 27 08:16:39 UTC 2023 - Andreas Schneider + +- Fix building with cmocka >= 1.1.6 + * Added socket_wrapper-fix-cmocka-1.1.6+-support.patch + ------------------------------------------------------------------- Wed Jan 25 15:45:26 UTC 2023 - Andreas Schneider diff --git a/nss_wrapper.spec b/nss_wrapper.spec index cb321a1..0620ffd 100644 --- a/nss_wrapper.spec +++ b/nss_wrapper.spec @@ -33,6 +33,7 @@ Source0: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz Source1: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz.asc Source2: https://cryptomilk.org/gpgkey-8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D.gpg#/%{name}.keyring Source3: %{name}-rpmlintrc +Patch0: nss_wrapper-fix-cmocka-1.1.6+-support.patch BuildRequires: cmake BuildRequires: libcmocka-devel BuildRequires: netcfg