commit:     b23e2cd1aefb1b2ff49da3d12c1fb96f2cf361c0
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 27 18:48:23 2019 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Fri Dec 27 18:51:45 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b23e2cd1

net-firewall/ipt_netflow: Check for NF_NAT in kernel >=5.2

Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 net-firewall/ipt_netflow/ipt_netflow-2.4.ebuild  | 17 ++++++++++++++---
 net-firewall/ipt_netflow/ipt_netflow-9999.ebuild | 17 ++++++++++++++---
 2 files changed, 28 insertions(+), 6 deletions(-)

diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.4.ebuild 
b/net-firewall/ipt_netflow/ipt_netflow-2.4.ebuild
index 88d6cef84f3..b8e3956550b 100644
--- a/net-firewall/ipt_netflow/ipt_netflow-2.4.ebuild
+++ b/net-firewall/ipt_netflow/ipt_netflow-2.4.ebuild
@@ -31,12 +31,23 @@ PATCHES=(
 )
 
 pkg_setup() {
+       linux-info_pkg_setup
+
+       local CONFIG_CHECK="~IP_NF_IPTABLES VLAN_8021Q"
+       use debug && CONFIG_CHECK+=" ~DEBUG_FS"
+       if use natevents; then
+               CONFIG_CHECK+=" NF_CONNTRACK_EVENTS"
+               if kernel_is lt 5 2; then
+                       CONFIG_CHECK+=" NF_NAT_NEEDED"
+               else
+                       CONFIG_CHECK+=" NF_NAT"
+               fi
+       fi
+
        BUILD_TARGETS="all"
        MODULE_NAMES="ipt_NETFLOW(ipt_netflow:${S})"
        IPT_LIB="/usr/$(get_libdir)/xtables"
-       local CONFIG_CHECK="~IP_NF_IPTABLES VLAN_8021Q"
-       use debug && CONFIG_CHECK+=" ~DEBUG_FS"
-       use natevents && CONFIG_CHECK+=" NF_CONNTRACK_EVENTS NF_NAT_NEEDED"
+
        linux-mod_pkg_setup
 }
 

diff --git a/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild 
b/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
index 71ba1b74afb..7414800f8c3 100644
--- a/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
+++ b/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
@@ -31,12 +31,23 @@ PATCHES=(
 )
 
 pkg_setup() {
+       linux-info_pkg_setup
+
+       local CONFIG_CHECK="~IP_NF_IPTABLES VLAN_8021Q"
+       use debug && CONFIG_CHECK+=" ~DEBUG_FS"
+       if use natevents; then
+               CONFIG_CHECK+=" NF_CONNTRACK_EVENTS"
+               if kernel_is lt 5 2; then
+                       CONFIG_CHECK+=" NF_NAT_NEEDED"
+               else
+                       CONFIG_CHECK+=" NF_NAT"
+               fi
+       fi
+
        BUILD_TARGETS="all"
        MODULE_NAMES="ipt_NETFLOW(ipt_netflow:${S})"
        IPT_LIB="/usr/$(get_libdir)/xtables"
-       local CONFIG_CHECK="~IP_NF_IPTABLES VLAN_8021Q"
-       use debug && CONFIG_CHECK+=" ~DEBUG_FS"
-       use natevents && CONFIG_CHECK+=" NF_CONNTRACK_EVENTS NF_NAT_NEEDED"
+
        linux-mod_pkg_setup
 }
 

Reply via email to