From 35b77d6278f54566379cd016994350e1c428ecea9b40a44af4f175d9fe049d26 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 27 Feb 2023 10:35:02 +0000 Subject: [PATCH] Fix building with cmocka >= 1.1.6 OBS-URL: https://build.opensuse.org/package/show/devel:tools/priv_wrapper?expand=0&rev=6 --- priv_wrapper-fix-cmocka-1.1.6+-support.patch | 31 ++++++++++++++++++++ priv_wrapper.changes | 6 ++++ priv_wrapper.spec | 3 +- 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 priv_wrapper-fix-cmocka-1.1.6+-support.patch diff --git a/priv_wrapper-fix-cmocka-1.1.6+-support.patch b/priv_wrapper-fix-cmocka-1.1.6+-support.patch new file mode 100644 index 0000000..3108a83 --- /dev/null +++ b/priv_wrapper-fix-cmocka-1.1.6+-support.patch @@ -0,0 +1,31 @@ +From 295bcbe9de1fb37531678d482efb12583b77c6d0 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 d33cf15..46147cf 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() ++ + include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} +-- +2.39.2 + diff --git a/priv_wrapper.changes b/priv_wrapper.changes index 11699c1..e214934 100644 --- a/priv_wrapper.changes +++ b/priv_wrapper.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Feb 27 10:33:47 UTC 2023 - Andreas Schneider + +- Fix building with cmocka >= 1.1.6 + * Added priv_wrapper-fix-cmocka-1.1.6+-support.patch + ------------------------------------------------------------------- Thu Nov 24 14:12:36 UTC 2022 - Andreas Schneider diff --git a/priv_wrapper.spec b/priv_wrapper.spec index fad2fb6..4dc7549 100644 --- a/priv_wrapper.spec +++ b/priv_wrapper.spec @@ -1,7 +1,7 @@ # # spec file for package priv_wrapper # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # Copyright (c) 2022 Andreas Schneider # # All modifications and additions to the file contributed by third parties @@ -34,6 +34,7 @@ Source0: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz Source1: %{name}-rpmlintrc Source2: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz.asc Source3: priv_wrapper.keyring +Patch0: priv_wrapper-fix-cmocka-1.1.6+-support.patch BuildRequires: cmake BuildRequires: libcmocka-devel BuildRequires: pkgconf