nss-pam-ldapd: build libnss_ldap.so for musl

Use patch from gentoo for missing define in netdb.h. Disable lookup_netgroup
test for musl which fails otherwise.
This commit is contained in:
Klara Modin 2024-03-04 00:28:30 +01:00 committed by Michael Aldridge
parent 2ff9113099
commit ee251f9fe2
2 changed files with 33 additions and 2 deletions

View File

@ -0,0 +1,26 @@
Bug: https://bugs.gentoo.org/716272
--- a/nss/hosts.c
+++ b/nss/hosts.c
@@ -49,6 +49,9 @@
*h_errnop = NO_RECOVERY; \
return NSS_STATUS_UNAVAIL;
+#ifndef NETDB_INTERNAL
+#define NETDB_INTERNAL -1
+#endif
#undef ERROR_OUT_BUFERROR
#define ERROR_OUT_BUFERROR(fp) \
*errnop = ERANGE; \
--- a/nss/networks.c
+++ b/nss/networks.c
@@ -49,6 +49,9 @@
*h_errnop = NO_RECOVERY; \
return NSS_STATUS_UNAVAIL;
+#ifndef NETDB_INTERNAL
+#define NETDB_INTERNAL -1
+#endif
#undef ERROR_OUT_BUFERROR
#define ERROR_OUT_BUFERROR(fp) \
*errnop = ERANGE; \

View File

@ -1,7 +1,7 @@
# Template file for 'nss-pam-ldapd'
pkgname=nss-pam-ldapd
version=0.9.12
revision=2
revision=3
build_style=gnu-configure
configure_args="--enable-sasl --enable-kerberos --with-pam-seclib-dir=/usr/lib/security/"
conf_files="/etc/nslcd.conf"
@ -16,10 +16,15 @@ checksum=829b2371be42c040108165d2ea422eb6f6cacba6a01083f67025752a574a685b
system_accounts="nslcd"
case "$XBPS_TARGET_MACHINE" in
*musl) configure_args+=" --disable-nss";;
*musl) makedepends+=" musl-nscd-devel" ;;
esac
pre_configure() {
case "$XBPS_TARGET_MACHINE" in
*musl)
vsed -i 's/ lookup_netgroup / /' tests/Makefile.am
;;
esac
./autogen.sh
}