commit:     cd138d3f292983c6b2edac56b139bdb98009e3af
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 31 22:24:40 2020 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Fri Jan 31 22:25:05 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd138d3f

net-analyzer/netwatch: Fix CFLAGS=-fno-common

Package-Manager: Portage-2.3.86, Repoman-2.3.20
Closes: https://bugs.gentoo.org/show_bug.cgi?id=707410
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 .../files/netwatch-1.3.0.1-fno-common.patch        | 44 +++++++++++++++++++
 net-analyzer/netwatch/netwatch-1.3.0.1-r4.ebuild   | 50 ++++++++++++++++++++++
 2 files changed, 94 insertions(+)

diff --git a/net-analyzer/netwatch/files/netwatch-1.3.0.1-fno-common.patch 
b/net-analyzer/netwatch/files/netwatch-1.3.0.1-fno-common.patch
new file mode 100644
index 00000000000..02331e7deea
--- /dev/null
+++ b/net-analyzer/netwatch/files/netwatch-1.3.0.1-fno-common.patch
@@ -0,0 +1,44 @@
+--- a/dispdata.c
++++ b/dispdata.c
+@@ -173,7 +173,6 @@
+ extern int simchange;
+ extern int simfwdir;
+ extern int simarr[8];
+-char *simfmt;
+ extern int iseth;
+ extern int nw_logall;
+ extern char nw_allname[256];
+--- a/netwatch.c
++++ b/netwatch.c
+@@ -161,6 +161,9 @@
+ char mylog[MAXFILENAME] = "/root/.log";
+ char specconfigfile[MAXFILENAME] = "/root/.netwatch.conf";
+ 
++struct port_info *tcp_port_types[TCPHASH];
++struct port_info *udp_port_types[UDPHASH];
++
+ int fdlog;
+ 
+ #if defined(_LINUX_IF_ETHER_H) || defined(_NETINET_IF_ETHER_H)
+--- a/netwatch.h
++++ b/netwatch.h
+@@ -209,16 +209,17 @@
+ };
+ 
+ #define TCPHASH 1786
+-struct port_info *tcp_port_types[TCPHASH];
++extern struct port_info *tcp_port_types[TCPHASH];
+ 
+ #define UDPHASH 1786
+-struct port_info *udp_port_types[UDPHASH];
++extern struct port_info *udp_port_types[UDPHASH];
+ 
+ int hashport( int port, int hash);
+ void initlist(struct port_info *first[], int hash);
+ char *searchlist(struct port_info *first[], int port, int hash);
+ char *servicenm( char *s, int port);
+ 
++extern char *simfmt;
+ 
+       
+ struct hostinfo {

diff --git a/net-analyzer/netwatch/netwatch-1.3.0.1-r4.ebuild 
b/net-analyzer/netwatch/netwatch-1.3.0.1-r4.ebuild
new file mode 100644
index 00000000000..df6024cd653
--- /dev/null
+++ b/net-analyzer/netwatch/netwatch-1.3.0.1-r4.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools
+
+MY_PV=$(ver_cut 1-3)-$(ver_cut 4)
+
+DESCRIPTION="Ethernet/PPP IP Packet Monitor"
+HOMEPAGE="http://www.slctech.org/~mackay/netwatch.html";
+SRC_URI="http://www.slctech.org/~mackay/NETWATCH/${PN}-${MY_PV}.tgz";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+RDEPEND="sys-libs/ncurses"
+DEPEND="
+       ${RDEPEND}
+       sys-kernel/linux-headers
+       virtual/pkgconfig
+"
+PATCHES=(
+       "${FILESDIR}"/${P}-append_ldflags.patch
+       "${FILESDIR}"/${P}-open.patch
+       "${FILESDIR}"/${P}-fix-fortify.patch
+       "${FILESDIR}"/${P}-do-not-call.patch
+       "${FILESDIR}"/${P}-includes.patch
+       "${FILESDIR}"/${P}-tinfo.patch
+       "${FILESDIR}"/${P}-fno-common.patch
+)
+S=${WORKDIR}/${PN}-$(ver_cut 1-3)
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_install() {
+       dosbin netresolv netwatch
+
+       doman netwatch.1
+       dodoc BUGS CHANGES README* TODO
+
+       if use doc; then
+               docinto html
+               dodoc NetwatchKeyCommands.html
+       fi
+}

Reply via email to