public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/trafshow/files/, net-analyzer/trafshow/
@ 2020-09-01  6:36 Jeroen Roovers
  0 siblings, 0 replies; only message in thread
From: Jeroen Roovers @ 2020-09-01  6:36 UTC (permalink / raw
  To: gentoo-commits

commit:     ac5aed68fd7b5cf55b1a22cfa417b65ae29c400c
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  1 06:36:08 2020 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Tue Sep  1 06:36:51 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac5aed68

net-analyzer/trafshow: Fix building against libpcap-1.10.0

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

 .../trafshow/files/trafshow-5.2.3-pcap_init.patch  | 29 ++++++++++++++
 net-analyzer/trafshow/trafshow-5.2.3-r1.ebuild     | 45 ++++++++++++++++++++++
 2 files changed, 74 insertions(+)

diff --git a/net-analyzer/trafshow/files/trafshow-5.2.3-pcap_init.patch b/net-analyzer/trafshow/files/trafshow-5.2.3-pcap_init.patch
new file mode 100644
index 00000000000..046795a5832
--- /dev/null
+++ b/net-analyzer/trafshow/files/trafshow-5.2.3-pcap_init.patch
@@ -0,0 +1,29 @@
+--- a/trafshow.c
++++ b/trafshow.c
+@@ -58,7 +58,7 @@
+ static void vers();
+ static void usage();
+ static pcap_if_t *pcap_matchdev(pcap_if_t *dp, const char *name);
+-static int pcap_init(PCAP_HANDLER **ph_list, pcap_if_t *dp);
++static int ts_pcap_init(PCAP_HANDLER **ph_list, pcap_if_t *dp);
+ static void *pcap_feed(void *arg); /* PCAP_HANDLER *ph */
+ #ifdef	HAVE_PCAP_GET_SELECTABLE_FD
+ static void *pcap_feed2(void *arg); /* PCAP_HANDLER *ph */
+@@ -172,7 +172,7 @@
+ 	}
+ 
+ 	/* initialize list of pcap handlers */
+-	if ((op = pcap_init(&ph_list, dev_list)) < 1) {
++	if ((op = ts_pcap_init(&ph_list, dev_list)) < 1) {
+ 		fprintf(stderr, "No packet capture device available (no permission?)\n");
+ 		exit(1);
+ 	}
+@@ -298,7 +298,7 @@
+ }
+ 
+ static int
+-pcap_init(ph_list, dp)
++ts_pcap_init(ph_list, dp)
+ 	PCAP_HANDLER **ph_list;
+ 	pcap_if_t *dp;
+ {

diff --git a/net-analyzer/trafshow/trafshow-5.2.3-r1.ebuild b/net-analyzer/trafshow/trafshow-5.2.3-r1.ebuild
new file mode 100644
index 00000000000..ce61398d05f
--- /dev/null
+++ b/net-analyzer/trafshow/trafshow-5.2.3-r1.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools
+
+DESCRIPTION="Full screen visualization of the network traffic"
+HOMEPAGE="http://soft.risp.ru/trafshow/index_en.shtml"
+SRC_URI="ftp://ftp.nsk.su/pub/RinetSoftware/${P}.tgz"
+
+LICENSE="BSD"
+SLOT="3"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="slang"
+
+DEPEND="
+	net-libs/libpcap
+	!slang? ( sys-libs/ncurses )
+	slang? ( >=sys-libs/slang-1.4 )
+"
+BDEPEND="
+	virtual/pkgconfig
+"
+PATCHES=(
+	"${FILESDIR}"/${P}-gcc44.patch
+	"${FILESDIR}"/${P}-gentoo.patch
+	"${FILESDIR}"/${P}-pcap_init.patch
+	"${FILESDIR}"/${P}-tinfo.patch
+)
+
+src_prepare() {
+	default
+	cat /usr/share/aclocal/pkg.m4 >> aclocal.m4 || die
+	eautoreconf
+}
+
+src_configure() {
+	if ! use slang; then
+		# No command-line option so pre-cache instead
+		export ac_cv_have_curses=ncurses
+		export LIBS=-lncurses
+	fi
+
+	default
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-01  6:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-01  6:36 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/trafshow/files/, net-analyzer/trafshow/ Jeroen Roovers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox