commit:     3a0ab90bbc07e9fa96cbc48db857a48e2d3130ec
Author:     NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com>
AuthorDate: Thu Jan 16 17:48:50 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb 10 09:25:36 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a0ab90b

net-analyzer/firewalk: update EAPI 7 -> 8, C23 porting

Fixes wrong signature for signal-related functions, implicit decls
in configure by autoreconfing, and unwanted calls to strip by patching
makefile

Bug: https://bugs.gentoo.org/731202
Bug: https://bugs.gentoo.org/899922
Bug: https://bugs.gentoo.org/945297
Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/40165
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../firewalk/files/firewalk-5.0-signal.patch       | 36 +++++++++++++++++++
 net-analyzer/firewalk/firewalk-5.0-r3.ebuild       | 42 ++++++++++++++++++++++
 2 files changed, 78 insertions(+)

diff --git a/net-analyzer/firewalk/files/firewalk-5.0-signal.patch 
b/net-analyzer/firewalk/files/firewalk-5.0-signal.patch
new file mode 100644
index 000000000000..1d0c3423e8ac
--- /dev/null
+++ b/net-analyzer/firewalk/files/firewalk-5.0-signal.patch
@@ -0,0 +1,36 @@
+https://bugs.gentoo.org/945297
+fix signature of signal
+--- a/include/firewalk.h
++++ b/include/firewalk.h
+@@ -248,7 +248,7 @@
+ int                                 /* 1 on success -1 or failure */
+ catch_sig(
+     int,                            /* signal to catch */
+-    void (*)()                      /* new signal handler */
++    void (*)(int)                      /* new signal handler */
+     );
+ 
+ /* handles SIGINT from user */
+--- a/src/signal.c
++++ b/src/signal.c
+@@ -40,7 +40,7 @@
+ extern int loop;
+ 
+ int
+-catch_sig(int signo, void (*handler)())
++catch_sig(int signo, void (*handler)(int))
+ {
+     struct sigaction action;
+ 
+https://bugs.gentoo.org/731202
+patch out unneedeed strip - portage does it instead, and right.
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -25,7 +25,6 @@
+ 
+ all:
+       cp firewalk $(top_srcdir)
+-      strip $(top_srcdir)/firewalk
+ 
+ clean:
+       rm -f $(top_srcdir)/firewalk

diff --git a/net-analyzer/firewalk/firewalk-5.0-r3.ebuild 
b/net-analyzer/firewalk/firewalk-5.0-r3.ebuild
new file mode 100644
index 000000000000..2bb76f120bd7
--- /dev/null
+++ b/net-analyzer/firewalk/firewalk-5.0-r3.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="A tool for determining a firewall's rule set"
+HOMEPAGE="http://packetfactory.openwall.net/projects/firewalk/";
+SRC_URI="mirror://gentoo/${P}.tgz"
+S=${WORKDIR}/${PN^}
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+DEPEND="
+       dev-libs/libdnet
+       net-libs/libnet:1.1
+       net-libs/libpcap
+"
+RDEPEND="
+       ${DEPEND}
+"
+DOCS=( README TODO BUGS )
+PATCHES=(
+       "${FILESDIR}"/${P}-gcc3.4.diff
+       "${FILESDIR}"/${P}-usage.diff
+       "${FILESDIR}"/${P}-signal.patch
+)
+
+src_prepare() {
+       default
+
+       # bug https://bugs.gentoo.org/899922
+       eautoreconf
+}
+
+src_install() {
+       default
+       doman man/firewalk.8
+}

Reply via email to