net-vpn/iodine: fix automagic selinux, systemd; add dep on new selinux policy

Closes: https://bugs.gentoo.org/517536
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2026-05-25 02:25:55 +01:00
parent deb5c3288c
commit 9f663e8e30

View File

@@ -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
@@ -14,12 +14,19 @@ CONFIG_CHECK="~TUN"
LICENSE="ISC GPL-2" #GPL-2 for init script bug #426060
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86"
IUSE="test"
IUSE="selinux systemd test"
RESTRICT="!test? ( test )"
RDEPEND="virtual/zlib:="
DEPEND="${RDEPEND}
test? ( dev-libs/check )"
RDEPEND="
virtual/zlib:=
selinux? ( sys-libs/libselinux )
systemd? ( sys-apps/systemd:= )
"
DEPEND="
${RDEPEND}
test? ( dev-libs/check )
"
RDEPEND+=" selinux? ( sec-policy/selinux-iodine )"
PATCHES=(
"${FILESDIR}"/${P}-TestMessage.patch
@@ -33,6 +40,14 @@ src_prepare() {
-e 's:^\(\s\)@:\1:' \
-i {,src/}Makefile || die
if ! use selinux ; then
sed -i -e 's:libselinux:idonotexist&:' src/osflags || die
fi
if ! use systemd ; then
sed -i -e 's:libsystemd:idonotexist&:' src/osflags || die
fi
tc-export CC
}