[packages/netsniff-ng] - added opt patch (use our optflags also for mausezahn)

qboosh qboosh at pld-linux.org
Sun May 24 14:41:43 CEST 2020


commit c3b22c6d674d6d8987b2a98caa2061fcef90dda8
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun May 24 14:42:21 2020 +0200

    - added opt patch (use our optflags also for mausezahn)

 netsniff-ng-opt.patch | 19 +++++++++++++++++++
 netsniff-ng.spec      |  4 ++++
 2 files changed, 23 insertions(+)
---
diff --git a/netsniff-ng.spec b/netsniff-ng.spec
index 13fc74c..0cce11c 100644
--- a/netsniff-ng.spec
+++ b/netsniff-ng.spec
@@ -7,6 +7,7 @@ License:	GPL v2
 Group:		Networking/Utilities
 Source0:	http://pub.netsniff-ng.org/netsniff-ng/%{name}-%{version}.tar.xz
 # Source0-md5:	2aba9835923c30721fa891a9dc59507c
+Patch0:		%{name}-opt.patch
 URL:		http://netsniff-ng.org/
 BuildRequires:	GeoIP-devel >= 1.4.8
 BuildRequires:	bison
@@ -56,12 +57,15 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 # not autoconf configure
 ./configure \
 	--sysconfdir="%{_sysconfdir}" \
 	--prefix="%{_prefix}"
+
+# as of 0.6.7 code relies on -fcommon behaviour, force it for gcc 10+
 %{__make} \
 	CC="%{__cc}" \
 	CPPFLAGS="%{rpmcflags} %{rpmcppflags} -fcommon" \
diff --git a/netsniff-ng-opt.patch b/netsniff-ng-opt.patch
new file mode 100644
index 0000000..dce94b9
--- /dev/null
+++ b/netsniff-ng-opt.patch
@@ -0,0 +1,19 @@
+--- netsniff-ng-0.6.7/mausezahn/Makefile.orig	2020-05-04 15:15:32.000000000 +0200
++++ netsniff-ng-0.6.7/mausezahn/Makefile	2020-05-24 14:38:43.298126207 +0200
+@@ -71,7 +71,7 @@
+ 			staging/directmops.o \
+ 			staging/mausezahn.o
+ 
+-mausezahn-eflags = -O2 -I. -I.. \
++mausezahn-eflags = -I. -I.. \
+ 		   -DVERSION_STRING=\"$(VERSION_STRING)\" \
+ 		   -DVERSION_LONG=\"$(VERSION_LONG)\"
+ 
+--- netsniff-ng-0.6.7/Extra.orig	2020-05-04 15:15:32.000000000 +0200
++++ netsniff-ng-0.6.7/Extra	2020-05-24 14:39:00.224701174 +0200
+@@ -1,4 +1,4 @@
+ # Targets that need extra treatment for now
+ 
+ curvetun: LDFLAGS += -L ${CONFIG_NACL_LIB_DIR}
+-mausezahn: CFLAGS = $(mausezahn-eflags)
++mausezahn: CFLAGS += $(mausezahn-eflags)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/netsniff-ng.git/commitdiff/c3b22c6d674d6d8987b2a98caa2061fcef90dda8



More information about the pld-cvs-commit mailing list