commit: b12b10ffe10e090a9c84145095703ed565dff05b
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 22 19:20:37 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov 22 20:10:50 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b12b10ff
sys-apps/shadow: fix configure w/ clang 16
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/shadow-4.13-configure-clang16.patch | 38 ++++++++++++++++++++++
.../{shadow-4.13.ebuild => shadow-4.13-r1.ebuild} | 4 +++
2 files changed, 42 insertions(+)
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 <[email protected]>
+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
similarity index 99%
rename from sys-apps/shadow/shadow-4.13.ebuild
rename to 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