Skip to content

Commit

Permalink
net-firewall/nftables: Sync 9999
Browse files Browse the repository at this point in the history
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Patrick McLean <[email protected]>
  • Loading branch information
patrick-mclean authored and chutz committed Jan 31, 2022
1 parent bb71ed3 commit b7fb1e2
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions net-firewall/nftables/nftables-9999.ebuild
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python3_{7..10} )

inherit autotools linux-info python-r1 systemd
DISTUTILS_OPTIONAL=1
inherit autotools linux-info distutils-r1 systemd

DESCRIPTION="Linux kernel (3.13+) firewall, NAT and packet mangling tools"
HOMEPAGE="https://netfilter.org/projects/nftables/"
Expand Down Expand Up @@ -56,15 +56,6 @@ PATCHES=(
"${FILESDIR}/${PN}-0.9.8-slibtool.patch"
)

python_make() {
emake \
-C py \
abs_builddir="${S}" \
DESTDIR="${D}" \
PYTHON_BIN="${PYTHON}" \
"${@}"
}

pkg_setup() {
if kernel_is ge 3 13; then
if use modern-kernel && kernel_is lt 3 18; then
Expand All @@ -87,6 +78,12 @@ src_prepare() {
-i files/osf/Makefile.am || die

eautoreconf

if use python; then
pushd py >/dev/null || die
distutils-r1_src_prepare
popd >/dev/null || die
fi
}

src_configure() {
Expand All @@ -104,13 +101,21 @@ src_configure() {
$(use_with xtables)
)
econf "${myeconfargs[@]}"

if use python; then
pushd py >/dev/null || die
distutils-r1_src_configure
popd >/dev/null || die
fi
}

src_compile() {
default

if use python; then
python_foreach_impl python_make
pushd py >/dev/null || die
distutils-r1_src_compile
popd >/dev/null || die
fi
}

Expand All @@ -134,8 +139,9 @@ src_install() {
systemd_dounit "${FILESDIR}"/systemd/${PN}-restore.service

if use python ; then
python_foreach_impl python_make install
python_foreach_impl python_optimize
pushd py >/dev/null || die
distutils-r1_src_install
popd >/dev/null || die
fi

find "${ED}" -type f -name "*.la" -delete || die
Expand Down

0 comments on commit b7fb1e2

Please sign in to comment.