summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-11-22 19:20:37 +0000
committerSam James <sam@gentoo.org>2022-11-22 20:10:50 +0000
commitb12b10ffe10e090a9c84145095703ed565dff05b (patch)
treed5ccdfaf4fbd881d634ae69f895cb92bbddae448 /sys-apps/shadow
parentdev-python/QtPy: Keyword 2.3.0 ppc64, #871525 (diff)
downloadgentoo-b12b10ffe10e090a9c84145095703ed565dff05b.tar.gz
gentoo-b12b10ffe10e090a9c84145095703ed565dff05b.tar.bz2
gentoo-b12b10ffe10e090a9c84145095703ed565dff05b.zip
sys-apps/shadow: fix configure w/ clang 16
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-apps/shadow')
-rw-r--r--sys-apps/shadow/files/shadow-4.13-configure-clang16.patch38
-rw-r--r--sys-apps/shadow/shadow-4.13-r1.ebuild (renamed from sys-apps/shadow/shadow-4.13.ebuild)4
2 files changed, 42 insertions, 0 deletions
diff --git a/sys-apps/shadow/files/shadow-4.13-configure-clang16.patch b/sys-apps/shadow/files/shadow-4.13-configure-clang16.patch
new file mode 100644
index 000000000000..4e703db93a6c
--- /dev/null
+++ b/sys-apps/shadow/files/shadow-4.13-configure-clang16.patch
@@ -0,0 +1,38 @@
+https://github.com/shadow-maint/shadow/commit/a281f241b592aec636d1b93a99e764499d68c7ef
+https://github.com/shadow-maint/shadow/pull/595
+
+From a281f241b592aec636d1b93a99e764499d68c7ef Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Mon, 21 Nov 2022 11:52:45 +0100
+Subject: [PATCH] Fix HAVE_SHADOWGRP configure check
+
+The missing #include <gshadow.h> causes the configure check to fail
+spuriously, resulting in HAVE_SHADOWGRP not being defined even
+on systems that actually have sgetsgent (such as current glibc).
+--- a/configure.ac
++++ b/configure.ac
+@@ -116,6 +116,10 @@ if test "$ac_cv_header_shadow_h" = "yes"; then
+ ac_cv_libc_shadowgrp,
+ AC_RUN_IFELSE([AC_LANG_SOURCE([
+ #include <shadow.h>
++ #ifdef HAVE_GSHADOW_H
++ #include <gshadow.h>
++ #endif
++ int
+ main()
+ {
+ struct sgrp *sg = sgetsgent("test:x::");
+
+--- a/configure
++++ b/configure
+@@ -15684,6 +15684,10 @@ else $as_nop
+ /* end confdefs.h. */
+
+ #include <shadow.h>
++ #ifdef HAVE_GSHADOW_H
++ #include <gshadow.h>
++ #endif
++ int
+ main()
+ {
+ struct sgrp *sg = sgetsgent("test:x::");
diff --git a/sys-apps/shadow/shadow-4.13.ebuild b/sys-apps/shadow/shadow-4.13-r1.ebuild
index 49415126ddb3..16d90343c084 100644
--- a/sys-apps/shadow/shadow-4.13.ebuild
+++ b/sys-apps/shadow/shadow-4.13-r1.ebuild
@@ -60,6 +60,10 @@ BDEPEND="
verify-sig? ( sec-keys/openpgp-keys-sergehallyn )
"
+PATCHES=(
+ "${FILESDIR}"/${P}-configure-clang16.patch
+)
+
src_prepare() {
default