gentoo-ebuilds/net-firewall/ipt_netflow/files/ipt_netflow-9999-gentoo.patch
Jaco Kroon 09ee4581ec
net-firewall/ipt_netflow: add 2.6_p20250317
Snapshot version of https://github.com/aabc/ipt-netflow/pull/239

Updated the -gentoo.patch to sort out LDFLAGS not respected QA error.

Signed-off-by: Jaco Kroon <jaco@uls.co.za>
Bug: https://bugs.gentoo.org/950506
Bug: https://bugs.gentoo.org/831306
Part-of: https://github.com/gentoo/gentoo/pull/41138
Closes: https://github.com/gentoo/gentoo/pull/41138
Signed-off-by: Sam James <sam@gentoo.org>
2025-05-21 21:55:08 +01:00

64 lines
2.1 KiB
Diff

diff --git a/Makefile.in b/Makefile.in
index 65edf4c..7d6ccc8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -13,7 +13,7 @@ CARGS = @CARGS@
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
@@ -24,7 +24,7 @@ all: ipt_NETFLOW.ko libipt_NETFLOW.so libip6t_NETFLOW.so @SNMPTARGET@
ipt_NETFLOW.ko: version.h ipt_NETFLOW.c ipt_NETFLOW.h compat_def.h compat.h Makefile
@echo Compiling $(shell ./version.sh) for kernel $(KVERSION)
- make -C $(KDIR) M=$(CURDIR) modules
+ $(MAKE) -C $(KDIR) M=$(CURDIR) modules
@touch $@
compat_def.h: gen_compat_def
./gen_compat_def > $@-
@@ -32,24 +32,24 @@ compat_def.h: gen_compat_def
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 compat_def.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 " *"
@@ -69,10 +69,10 @@ sinstall: | snmp_NETFLOW.so IPT-NETFLOW-MIB.my
fi
%_sh.o: libipt_NETFLOW.c
- $(CC) $(CFLAGS) -O2 -Wall -Wunused $(IPTABLES_CFLAGS) -fPIC -o $@ -c libipt_NETFLOW.c
+ $(CC) $(CFLAGS) -Wall -Wunused $(IPTABLES_CFLAGS) -fPIC -o $@ -c libipt_NETFLOW.c
%.so: %_sh.o
- $(CC) -shared -o $@ $<
+ $(CC) $(LDFLAGS) -shared -o $@ $<
version.h: ipt_NETFLOW.c ipt_NETFLOW.h compat.h Makefile
@./version.sh --define > version.h