[PATCH 23/94] sys-apps/shadow: port to GNU Hurd

Sam James <[email protected]>
Newsgroups gmane.linux.gentoo.devel
Message-ID <9c4c0dfa06828455b0088e796d6292e0b3043aa9.1774994299.git.sam@gentoo.org>
Only build btrfs support (what does that even do for shadow?) on Linux
and avoid collision on /bin/login, as sys-kernel/hurd provides its own.

Signed-off-by: Sam James <[email protected]>
---
 sys-apps/shadow/shadow-4.14.8-r1.ebuild | 4 ++--
 sys-apps/shadow/shadow-4.14.8-r2.ebuild | 4 ++--
 sys-apps/shadow/shadow-4.14.8.ebuild    | 4 ++--
 sys-apps/shadow/shadow-4.19.2.ebuild    | 2 +-
 sys-apps/shadow/shadow-4.19.3.ebuild    | 9 +++++++--
 5 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/sys-apps/shadow/shadow-4.14.8-r1.ebuild b/sys-apps/shadow/shadow-4.14.8-r1.ebuild
index 79887e7b0dcaf..7ca5fc933cbfd 100644
--- a/sys-apps/shadow/shadow-4.14.8-r1.ebuild
+++ b/sys-apps/shadow/shadow-4.14.8-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2025 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -42,7 +42,7 @@ COMMON_DEPEND="
 "
 DEPEND="
 	${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-4.14
+	kernel_linux? ( >=sys-kernel/linux-headers-4.14 )
 "
 RDEPEND="
 	${COMMON_DEPEND}
diff --git a/sys-apps/shadow/shadow-4.14.8-r2.ebuild b/sys-apps/shadow/shadow-4.14.8-r2.ebuild
index b623295477ee2..5bfde451c7809 100644
--- a/sys-apps/shadow/shadow-4.14.8-r2.ebuild
+++ b/sys-apps/shadow/shadow-4.14.8-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2025 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -42,7 +42,7 @@ COMMON_DEPEND="
 "
 DEPEND="
 	${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-4.14
+	kernel_linux? ( >=sys-kernel/linux-headers-4.14 )
 "
 RDEPEND="
 	${COMMON_DEPEND}
diff --git a/sys-apps/shadow/shadow-4.14.8.ebuild b/sys-apps/shadow/shadow-4.14.8.ebuild
index 582d2920ae27b..2a0806a56e2f7 100644
--- a/sys-apps/shadow/shadow-4.14.8.ebuild
+++ b/sys-apps/shadow/shadow-4.14.8.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2025 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -42,7 +42,7 @@ COMMON_DEPEND="
 "
 DEPEND="
 	${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-4.14
+	kernel_linux? ( >=sys-kernel/linux-headers-4.14 )
 "
 RDEPEND="
 	${COMMON_DEPEND}
diff --git a/sys-apps/shadow/shadow-4.19.2.ebuild b/sys-apps/shadow/shadow-4.19.2.ebuild
index 48c058484178d..b7f41bf143b1a 100644
--- a/sys-apps/shadow/shadow-4.19.2.ebuild
+++ b/sys-apps/shadow/shadow-4.19.2.ebuild
@@ -41,7 +41,7 @@ COMMON_DEPEND="
 "
 DEPEND="
 	${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-4.14
+	kernel_linux? ( >=sys-kernel/linux-headers-4.14 )
 "
 RDEPEND="
 	${COMMON_DEPEND}
diff --git a/sys-apps/shadow/shadow-4.19.3.ebuild b/sys-apps/shadow/shadow-4.19.3.ebuild
index 6116aa4a8d94e..83cecac8ed287 100644
--- a/sys-apps/shadow/shadow-4.19.3.ebuild
+++ b/sys-apps/shadow/shadow-4.19.3.ebuild
@@ -41,7 +41,7 @@ COMMON_DEPEND="
 "
 DEPEND="
 	${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-4.14
+	kernel_linux? ( >=sys-kernel/linux-headers-4.14 )
 "
 RDEPEND="
 	${COMMON_DEPEND}
@@ -86,7 +86,7 @@ src_configure() {
 		--enable-lastlog
 		--disable-account-tools-setuid
 		--disable-static
-		--with-btrfs
+		$(use_enable kernel_linux btrfs)
 		# Use bundled replacements for readpassphrase and freezero
 		--without-libbsd
 		--without-group-name-max-length
@@ -221,6 +221,11 @@ src_install() {
 	if use elibc_musl; then
 		QA_CONFIG_IMPL_DECL_SKIP+=( sgetsgent )
 	fi
+
+	if use kernel_Hurd ; then
+		# sys-kernel/hurd provides this instead
+		rm "${ED}"/bin/login || die
+	fi
 }
 
 pkg_postinst() {
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.