commit:     705d3d6c86f1295fed821050eb3c92714860f6e7
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Mar  3 06:02:29 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Mar  3 06:02:29 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=705d3d6c

sys-libs/uid_wrapper: backport newer cmocka fix

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/uid_wrapper-1.3.0-cmocka-cmake.patch     | 26 ++++++++++++++++++++++
 sys-libs/uid_wrapper/uid_wrapper-1.3.0.ebuild      |  6 ++++-
 2 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/sys-libs/uid_wrapper/files/uid_wrapper-1.3.0-cmocka-cmake.patch 
b/sys-libs/uid_wrapper/files/uid_wrapper-1.3.0-cmocka-cmake.patch
new file mode 100644
index 000000000000..ada998f5f543
--- /dev/null
+++ b/sys-libs/uid_wrapper/files/uid_wrapper-1.3.0-cmocka-cmake.patch
@@ -0,0 +1,26 @@
+https://git.samba.org/?p=uid_wrapper.git;a=commit;h=850f24c6366abda30bfd77734b90330b8809d306
+
+From 850f24c6366abda30bfd77734b90330b8809d306 Mon Sep 17 00:00:00 2001
+From: Andreas Schneider <[email protected]>
+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=utf8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Andreas Schneider <[email protected]>
+Reviewed-by: Pavel Filipenský <[email protected]>
+--- 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()
++
+ add_library(uwrap_fake_socket_wrapper SHARED uwrap_fake_socket_wrapper.c)
+ target_compile_options(uwrap_fake_socket_wrapper
+                        PRIVATE
+-- 
+2.34.1

diff --git a/sys-libs/uid_wrapper/uid_wrapper-1.3.0.ebuild 
b/sys-libs/uid_wrapper/uid_wrapper-1.3.0.ebuild
index be756c6ce50b..bd23cc44cfcf 100644
--- a/sys-libs/uid_wrapper/uid_wrapper-1.3.0.ebuild
+++ b/sys-libs/uid_wrapper/uid_wrapper-1.3.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -18,6 +18,10 @@ RESTRICT="!test? ( test )"
 
 BDEPEND="test? ( dev-util/cmocka )"
 
+PATCHES=(
+       "${FILESDIR}"/${P}-cmocka-cmake.patch
+)
+
 src_configure() {
        local mycmakeargs=(
                -DUNIT_TESTING=$(usex test)

Reply via email to