Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/sniffit/files/, net-analyzer/sniffit/
Date: Sat, 01 Oct 2022 00:30:31
Message-Id: 1664583674.46c56624cb102d92322d978909f853e0d2e6870a.sam@gentoo
1 commit: 46c56624cb102d92322d978909f853e0d2e6870a
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Oct 1 00:21:14 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Oct 1 00:21:14 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46c56624
7
8 net-analyzer/sniffit: fix build w/ Clang 16
9
10 Closes: https://bugs.gentoo.org/870997
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 .../files/sniffit-0.5.0-implicit-func-decl.patch | 50 ++++++++++++++++++++++
14 .../{sniffit-0.5.ebuild => sniffit-0.5-r1.ebuild} | 16 ++++---
15 2 files changed, 59 insertions(+), 7 deletions(-)
16
17 diff --git a/net-analyzer/sniffit/files/sniffit-0.5.0-implicit-func-decl.patch b/net-analyzer/sniffit/files/sniffit-0.5.0-implicit-func-decl.patch
18 new file mode 100644
19 index 000000000000..e6ee580d6e33
20 --- /dev/null
21 +++ b/net-analyzer/sniffit/files/sniffit-0.5.0-implicit-func-decl.patch
22 @@ -0,0 +1,50 @@
23 +https://github.com/resurrecting-open-source-projects/sniffit/pull/3
24 +
25 +From a05340968343d9f61f57506ed00bff0a62d3f38e Mon Sep 17 00:00:00 2001
26 +From: Sam James <sam@g.o>
27 +Date: Thu, 28 Jul 2022 12:14:44 +0100
28 +Subject: [PATCH] Fix -Wimplicit-function-declaration
29 +
30 +--- a/src/sn_cfgfile.c
31 ++++ b/src/sn_cfgfile.c
32 +@@ -2,6 +2,7 @@
33 + /* - by : Brecht Claerhout */
34 + /* - improvements: Shudoh Kazuyuki */
35 +
36 ++#include <ctype.h>
37 + #include <stdlib.h>
38 + #include <stdio.h>
39 + #include <string.h>
40 +--- a/src/sn_generation.c
41 ++++ b/src/sn_generation.c
42 +@@ -13,7 +13,9 @@
43 + #include "sn_curses.h"
44 + #include "sn_defines.h"
45 + #include "sn_structs.h"
46 ++#include "sn_packets.h"
47 + #include "sn_generation.h"
48 ++#include "sn_interface.h"
49 +
50 + extern volatile int screen_busy;
51 +
52 +--- a/src/sn_interface.c
53 ++++ b/src/sn_interface.c
54 +@@ -4,6 +4,7 @@
55 + #include "sn_config.h"
56 +
57 + #ifdef INCLUDE_INTERFACE
58 ++#include <ctype.h>
59 + #include <signal.h>
60 + #include <termios.h>
61 + #include <stdlib.h>
62 +--- a/src/sniffit.c
63 ++++ b/src/sniffit.c
64 +@@ -3,6 +3,7 @@
65 +
66 + #include "sn_config.h" /* Config header file */
67 +
68 ++#include <ctype.h>
69 + #include <unistd.h>
70 + #include <signal.h>
71 + #include <stdlib.h>
72 +
73
74 diff --git a/net-analyzer/sniffit/sniffit-0.5.ebuild b/net-analyzer/sniffit/sniffit-0.5-r1.ebuild
75 similarity index 77%
76 rename from net-analyzer/sniffit/sniffit-0.5.ebuild
77 rename to net-analyzer/sniffit/sniffit-0.5-r1.ebuild
78 index 3be66ceda23e..1247440f794f 100644
79 --- a/net-analyzer/sniffit/sniffit-0.5.ebuild
80 +++ b/net-analyzer/sniffit/sniffit-0.5-r1.ebuild
81 @@ -1,27 +1,29 @@
82 -# Copyright 1999-2020 Gentoo Authors
83 +# Copyright 1999-2022 Gentoo Authors
84 # Distributed under the terms of the GNU General Public License v2
85
86 -EAPI=7
87 +EAPI=8
88 +
89 inherit autotools
90
91 DESCRIPTION="Interactive Packet Sniffer"
92 HOMEPAGE="https://github.com/resurrecting-open-source-projects/sniffit"
93 SRC_URI="https://github.com/resurrecting-open-source-projects/sniffit/archive/${P}.tar.gz"
94 -SLOT="0"
95 +S="${WORKDIR}"/${PN}-${P}
96 +
97 LICENSE="BSD"
98 +SLOT="0"
99 KEYWORDS="amd64 ppc sparc x86"
100
101 RDEPEND="
102 net-libs/libpcap
103 >=sys-libs/ncurses-5.2
104 "
105 -DEPEND="
106 - ${RDEPEND}
107 -"
108 +DEPEND="${RDEPEND}"
109 +
110 PATCHES=(
111 "${FILESDIR}"/${PN}-0.4.0-tinfo.patch
112 + "${FILESDIR}"/${PN}-0.5.0-implicit-func-decl.patch
113 )
114 -S=${WORKDIR}/${PN}-${P}
115
116 src_prepare() {
117 default