diff --git a/srcpkgs/nss_wrapper/patches/nss_wrapper-fix-for-cmocka-1.1.6.patch b/srcpkgs/nss_wrapper/patches/nss_wrapper-fix-for-cmocka-1.1.6.patch new file mode 100644 index 00000000000..ba2589be2d0 --- /dev/null +++ b/srcpkgs/nss_wrapper/patches/nss_wrapper-fix-for-cmocka-1.1.6.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/srcpkgs/nss_wrapper/template b/srcpkgs/nss_wrapper/template new file mode 100644 index 00000000000..94fa88b333c --- /dev/null +++ b/srcpkgs/nss_wrapper/template @@ -0,0 +1,27 @@ +# Template file for 'nss_wrapper' +pkgname=nss_wrapper +version=1.1.15 +revision=1 +archs="~*-musl" # complains about the getXXent_r functions missing +build_style=cmake +hostmakedepends="pkg-config" +short_desc="Wrapper for the user, group and hosts NSS API" +maintainer="Otto Modinos " +license="BSD-3-Clause" +homepage="http://cwrap.org/nss_wrapper.html" +distfiles="https://download.samba.org/pub/cwrap/${pkgname}-${version}.tar.gz" +checksum=36f874832a4f2158e04f69aa77e5515e16cf6e3bf81968d5dd8496db7d6906ad + +if [ "$XBPS_TARGET_LIBC" = glibc ]; then + makedepends+=" libxcrypt-devel" +fi + +if [ "$XBPS_CHECK_PKGS" ]; then + configure_args+=" -DUNIT_TESTING=ON" + makedepends+=" cmocka-devel uid_wrapper" + checkdepends+=" cmocka" +fi + +post_install() { + vlicense LICENSE +}