public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Arthur Zamarin" <arthurzam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/tcptrace/files/, net-analyzer/tcptrace/
Date: Thu, 14 Sep 2023 18:08:40 +0000 (UTC)	[thread overview]
Message-ID: <1694714868.9d926cc2902956262beeaddf826c0f7436bdb1ea.arthurzam@gentoo> (raw)

commit:     9d926cc2902956262beeaddf826c0f7436bdb1ea
Author:     Brahmajit Das <brahmajit.xyz <AT> gmail <DOT> com>
AuthorDate: Tue Sep 12 18:03:22 2023 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Thu Sep 14 18:07:48 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d926cc2

net-analyzer/tcptrace: Fix call to undeclared function fpurge

and update EAPI 7 -> 8

Closes: https://bugs.gentoo.org/897830
Signed-off-by: Brahmajit Das <brahmajit.xyz <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/32743
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 .../files/tcptrace-6.6.7-fix-build-clang16.patch   | 30 +++++++++++
 net-analyzer/tcptrace/tcptrace-6.6.7_p6-r1.ebuild  | 59 ++++++++++++++++++++++
 2 files changed, 89 insertions(+)

diff --git a/net-analyzer/tcptrace/files/tcptrace-6.6.7-fix-build-clang16.patch b/net-analyzer/tcptrace/files/tcptrace-6.6.7-fix-build-clang16.patch
new file mode 100644
index 000000000000..fa1fd322c83e
--- /dev/null
+++ b/net-analyzer/tcptrace/files/tcptrace-6.6.7-fix-build-clang16.patch
@@ -0,0 +1,30 @@
+Bug: https://bugs.gentoo.org/897830
+--- a/compress.c
++++ b/compress.c
+@@ -61,6 +61,8 @@ static char const GCC_UNUSED rcsid[] =
+ 
+ #include "compress.h"
+ #include <sys/wait.h>
++#include <stdio.h>
++#include <stdio_ext.h>
+ 
+ /*
+  * OK, this stuff is a little complicated.  Here's why:
+@@ -240,7 +242,7 @@ CompReopenFile(
+     /* erase the file buffer and reposition to the front */
+ #ifdef HAVE_FPURGE
+     /* needed for NetBSD and FreeBSD (at least) */
+-    fpurge(stdin);		/* discard input buffer */
++    __fpurge(stdin);		/* discard input buffer */
+ #else /* HAVE_FPURGE */
+     fflush(stdin);		/* discard input buffer */
+ #endif /* HAVE_FPURGE */
+@@ -599,7 +601,7 @@ PipeHelper(void)
+     // read end of the pipe, fdpipe[0]
+     
+ #ifdef HAVE_FPURGE     
+-     fpurge(stdin); // needed for NetBSD/FreeBSD
++     __fpurge(stdin); // needed for NetBSD/FreeBSD
+ #else
+      fflush(stdin);
+ #endif

diff --git a/net-analyzer/tcptrace/tcptrace-6.6.7_p6-r1.ebuild b/net-analyzer/tcptrace/tcptrace-6.6.7_p6-r1.ebuild
new file mode 100644
index 000000000000..5d7b33dc96b0
--- /dev/null
+++ b/net-analyzer/tcptrace/tcptrace-6.6.7_p6-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit autotools
+
+DESCRIPTION="A Tool for analyzing network packet dumps"
+HOMEPAGE="http://www.tcptrace.org/"
+SRC_URI="
+	http://www.tcptrace.org/download/${P/_p*}.tar.gz
+	http://www.tcptrace.org/download/old/$(ver_cut 1-2)/${P/_p*}.tar.gz
+	mirror://debian/pool/main/t/${PN}/${PN}_${PV/_p*}-${PV/*_p}.debian.tar.xz
+"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+
+DEPEND="
+	net-libs/libpcap
+"
+RDEPEND="
+	${DEPEND}
+"
+PATCHES=(
+	"${FILESDIR}"/${P/_p*}-cross-compile.patch
+	"${FILESDIR}"/${P/_p*}-_DEFAULT_SOURCE.patch
+	"${FILESDIR}"/${P/_p*}-fix-build-clang16.patch
+)
+S=${WORKDIR}/${P/_p*}
+
+src_prepare() {
+	default
+
+	eapply \
+		$(awk '{ print "'"${WORKDIR}"'/debian/patches/" $0; }' < "${WORKDIR}"/debian/patches/series)
+
+	eautoreconf
+}
+
+src_compile() {
+	emake CCOPT="${CFLAGS}"
+}
+
+src_install() {
+	dobin tcptrace xpl2gpl
+
+	newman tcptrace.man tcptrace.1
+	dodoc CHANGES COPYRIGHT FAQ README* THANKS WWW
+}
+
+pkg_postinst() {
+	if ! has_version ${CATEGORY}/${PN}; then
+		elog "Note: tcptrace outputs its graphs in the xpl (xplot)"
+		elog "format. Since xplot is unavailable, you will have to"
+		elog "use the included xpl2gpl utility to convert it to"
+		elog "the gnuplot format."
+	fi
+}


             reply	other threads:[~2023-09-14 18:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-14 18:08 Arthur Zamarin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-03-20  6:26 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/tcptrace/files/, net-analyzer/tcptrace/ Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1694714868.9d926cc2902956262beeaddf826c0f7436bdb1ea.arthurzam@gentoo \
    --to=arthurzam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox