diff options
Diffstat (limited to 'net-firewall/nftables/nftables-9999.ebuild')
-rw-r--r-- | net-firewall/nftables/nftables-9999.ebuild | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/net-firewall/nftables/nftables-9999.ebuild b/net-firewall/nftables/nftables-9999.ebuild index db4ad6e3feb7..7a679d809706 100644 --- a/net-firewall/nftables/nftables-9999.ebuild +++ b/net-firewall/nftables/nftables-9999.ebuild @@ -17,8 +17,10 @@ if [[ ${PV} =~ ^[9]{4,}$ ]]; then EGIT_REPO_URI="https://git.netfilter.org/${PN}" BDEPEND="sys-devel/bison" else - SRC_URI="https://netfilter.org/projects/nftables/files/${P}.tar.xz - verify-sig? ( https://netfilter.org/projects/nftables/files/${P}.tar.xz.sig )" + SRC_URI=" + https://netfilter.org/projects/nftables/files/${P}.tar.xz + verify-sig? ( https://netfilter.org/projects/nftables/files/${P}.tar.xz.sig ) + " KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" BDEPEND="verify-sig? ( sec-keys/openpgp-keys-netfilter )" fi @@ -70,9 +72,6 @@ src_prepare() { src_configure() { local myeconfargs=( - # We handle python separately - --disable-python - --disable-static --sbindir="${EPREFIX}"/sbin $(use_enable debug) $(use_enable doc man-doc) @@ -83,6 +82,7 @@ src_configure() { $(use_enable static-libs static) $(use_with xtables) ) + econf "${myeconfargs[@]}" if use python; then @@ -111,10 +111,19 @@ src_test() { ewarn "Skipping shell tests (requires root)" fi - # Need to rig up Python eclass if using this, but it doesn't seem to work - # for me anyway. - #cd tests/py || die - #"${EPYTHON}" nft-test.py || die + if use python; then + pushd tests/py >/dev/null || die + distutils-r1_src_test + popd >/dev/null || die + fi +} + +python_test() { + if [[ ${EUID} == 0 ]]; then + edo "${EPYTHON}" nft-test.py + else + ewarn "Skipping Python tests (requires root)" + fi } src_install() { |