summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2019-06-19 08:11:57 +0200
committerJeroen Roovers <jer@gentoo.org>2019-06-19 08:12:13 +0200
commit5ec2dcfdfa639c7daffc1d068af45ed67cb0a58f (patch)
treef8e84835eebe8d0e2ab8eae9c91c89115bfc72e0 /net-firewall
parentapp-misc/geoclue: 2.5.3 → 2.5.3-r1 (diff)
downloadgentoo-5ec2dcfdfa639c7daffc1d068af45ed67cb0a58f.tar.gz
gentoo-5ec2dcfdfa639c7daffc1d068af45ed67cb0a58f.tar.bz2
gentoo-5ec2dcfdfa639c7daffc1d068af45ed67cb0a58f.zip
net-firewall/ipt_netflow: Fix USE=snmp
Package-Manager: Portage-2.3.67, Repoman-2.3.14 Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'net-firewall')
-rw-r--r--net-firewall/ipt_netflow/files/ipt_netflow-2.3-flags.patch55
-rw-r--r--net-firewall/ipt_netflow/ipt_netflow-2.3_p20190619.ebuild11
-rw-r--r--net-firewall/ipt_netflow/ipt_netflow-9999.ebuild11
3 files changed, 59 insertions, 18 deletions
diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-2.3-flags.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.3-flags.patch
new file mode 100644
index 000000000000..0d89e5ba90a9
--- /dev/null
+++ b/net-firewall/ipt_netflow/files/ipt_netflow-2.3-flags.patch
@@ -0,0 +1,55 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -11,7 +11,7 @@
+ SNMPTGSO = /usr/lib/snmp/dlmod/snmp_NETFLOW.so
+ SNMPCONF = /etc/snmp/snmpd.conf
+ SNMPLINE = dlmod netflow $(SNMPTGSO)
+-CC = gcc
++$(CC) ?= gcc
+
+ # https://www.kernel.org/doc/Documentation/kbuild/modules.txt
+ # https://www.kernel.org/doc/Documentation/kbuild/makefiles.txt
+@@ -22,29 +22,29 @@
+
+ ipt_NETFLOW.ko: version.h ipt_NETFLOW.c ipt_NETFLOW.h compat.h Makefile
+ @echo Compiling for kernel $(KVERSION)
+- make -C $(KDIR) M=$(CURDIR) modules CONFIG_DEBUG_INFO=y
++ $(MAKE) -C $(KDIR) M=$(CURDIR) modules CONFIG_DEBUG_INFO=y
+ @touch $@
+ sparse: | version.h ipt_NETFLOW.c ipt_NETFLOW.h compat.h Makefile
+ @rm -f ipt_NETFLOW.ko ipt_NETFLOW.o
+ @echo Compiling for kernel $(KVERSION)
+- make -C $(KDIR) M=$(CURDIR) modules C=1
++ $(MAKE) -C $(KDIR) M=$(CURDIR) modules C=1
+ @touch ipt_NETFLOW.ko
+ coverity:
+ coverity-submit -v
+
+ minstall: | ipt_NETFLOW.ko
+ @echo " *"
+- make -C $(KDIR) M=$(CURDIR) modules_install INSTALL_MOD_PATH=$(DESTDIR)
++ $(MAKE) -C $(KDIR) M=$(CURDIR) modules_install INSTALL_MOD_PATH=$(DESTDIR)
+ $(DEPMOD)
+ mclean:
+- make -C $(KDIR) M=$(CURDIR) clean
++ $(MAKE) -C $(KDIR) M=$(CURDIR) clean
+ lclean:
+ -rm -f *.so *_sh.o
+ clean: mclean lclean
+ -rm -f *.so *.o modules.order version.h
+
+ snmp_NETFLOW.so: snmp_NETFLOW.c
+- $(CC) -fPIC -shared -o $@ $< -lnetsnmp
++ $(CC) $(CFLAGS) $(LDFLAGS) -fPIC -shared -o $@ $< -lnetsnmp
+
+ sinstall: | snmp_NETFLOW.so IPT-NETFLOW-MIB.my
+ @echo " *"
+@@ -64,7 +64,7 @@
+ fi
+
+ %_sh.o: libipt_NETFLOW.c
+- $(CC) $(CFLAGS) -O2 -Wall -Wunused $(IPTABLES_CFLAGS) -fPIC -o $@ -c libipt_NETFLOW.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -Wall -Wunused $(IPTABLES_CFLAGS) -fPIC -o $@ -c libipt_NETFLOW.c
+
+ %.so: %_sh.o
+ $(CC) -shared -o $@ $<
diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.3_p20190619.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.3_p20190619.ebuild
index 07ddf25ef1d6..3a1ad78c15f5 100644
--- a/net-firewall/ipt_netflow/ipt_netflow-2.3_p20190619.ebuild
+++ b/net-firewall/ipt_netflow/ipt_netflow-2.3_p20190619.ebuild
@@ -25,10 +25,9 @@ DEPEND="${RDEPEND}
virtual/linux-sources
virtual/pkgconfig
"
-
-# set S before MODULE_NAMES
PATCHES=(
"${FILESDIR}/${PN}-2.0-configure.patch" # bug #455984
+ "${FILESDIR}/${PN}-2.3-flags.patch"
)
pkg_setup() {
@@ -48,19 +47,13 @@ src_unpack() {
}
src_prepare() {
- sed -i \
- -e 's:make -C:$(MAKE) -C:g' \
- -e 's:gcc -O2:$(CC) $(CFLAGS) $(LDFLAGS):' \
- -e 's:gcc:$(CC) $(CFLAGS) $(LDFLAGS):' \
- Makefile.in || die
+ default
# Fix incorrect module version in sources
sed -i -e "/IPT_NETFLOW_VERSION/s/2.2/${PV}/" ipt_NETFLOW.c || die
# Checking for directory is enough
sed -i -e 's:-s /etc/snmp/snmpd.conf:-d /etc/snmp:' configure || die
-
- default
}
do_conf() {
diff --git a/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild b/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
index 6d8feeb6e0a2..2a4bba4304bc 100644
--- a/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
+++ b/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
@@ -25,10 +25,9 @@ DEPEND="${RDEPEND}
virtual/linux-sources
virtual/pkgconfig
"
-
-# set S before MODULE_NAMES
PATCHES=(
"${FILESDIR}/${PN}-2.0-configure.patch" # bug #455984
+ "${FILESDIR}/${PN}-2.3-flags.patch"
)
pkg_setup() {
@@ -42,19 +41,13 @@ pkg_setup() {
}
src_prepare() {
- sed -i \
- -e 's:make -C:$(MAKE) -C:g' \
- -e 's:gcc -O2:$(CC) $(CFLAGS) $(LDFLAGS):' \
- -e 's:gcc:$(CC) $(CFLAGS) $(LDFLAGS):' \
- Makefile.in || die
+ default
# Fix incorrect module version in sources
sed -i -e "/IPT_NETFLOW_VERSION/s/2.2/${PV}/" ipt_NETFLOW.c || die
# Checking for directory is enough
sed -i -e 's:-s /etc/snmp/snmpd.conf:-d /etc/snmp:' configure || die
-
- default
}
do_conf() {