Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/thcrut/, net-analyzer/thcrut/files/
Date: Sun, 10 May 2020 14:22:02
Message-Id: 1589120513.1d1f3295d822b7abd5573073959e912f05adf9ae.jer@gentoo
1 commit: 1d1f3295d822b7abd5573073959e912f05adf9ae
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 10 14:20:48 2020 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Sun May 10 14:21:53 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d1f3295
7
8 net-analyzer/thcrut: Fix building with CFLAGS=-fno-common
9
10 - Respect CFLAGS
11 - Remove unused declarations of ip_tcp_sync_addr
12
13 Package-Manager: Portage-2.3.99, Repoman-2.3.22
14 Closes: https://bugs.gentoo.org/show_bug.cgi?id=722138
15 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
16
17 net-analyzer/thcrut/files/thcrut-1.2.5-flags.patch | 11 +++++++
18 .../thcrut/files/thcrut-1.2.5-fno-common.patch | 20 +++++++++++++
19 net-analyzer/thcrut/thcrut-1.2.5-r2.ebuild | 35 ++++++++++++++++++++++
20 3 files changed, 66 insertions(+)
21
22 diff --git a/net-analyzer/thcrut/files/thcrut-1.2.5-flags.patch b/net-analyzer/thcrut/files/thcrut-1.2.5-flags.patch
23 new file mode 100644
24 index 00000000000..0a6bcaf4ebc
25 --- /dev/null
26 +++ b/net-analyzer/thcrut/files/thcrut-1.2.5-flags.patch
27 @@ -0,0 +1,11 @@
28 +--- a/configure.in
29 ++++ b/configure.in
30 +@@ -23,7 +23,7 @@
31 + dnl
32 + dnl Use these compiler flags if we have gcc.
33 + dnl
34 +-if test $ac_cv_prog_gcc = yes; then
35 ++if test $ac_cv_prog_gcc_not_on_gentoo = yes; then
36 + CCOPTS='-O2 -Wall'
37 + CFLAGS="$CCOPTS"
38 + fi
39
40 diff --git a/net-analyzer/thcrut/files/thcrut-1.2.5-fno-common.patch b/net-analyzer/thcrut/files/thcrut-1.2.5-fno-common.patch
41 new file mode 100644
42 index 00000000000..a934048f341
43 --- /dev/null
44 +++ b/net-analyzer/thcrut/files/thcrut-1.2.5-fno-common.patch
45 @@ -0,0 +1,20 @@
46 +--- a/src/discover_dispatch.c
47 ++++ b/src/discover_dispatch.c
48 +@@ -81,7 +81,6 @@
49 +
50 + unsigned short ip_tcp_sync_chksum;
51 + unsigned short ip_tcp_fp_chksum;
52 +-struct sockaddr_in ip_tcp_sync_addr;
53 + static dispatch_func_recv_t dispatch_funcs[] = {
54 + dis_recvdummy,
55 + dis_recv,
56 +--- a/src/discover_main.c
57 ++++ b/src/discover_main.c
58 +@@ -22,7 +22,6 @@
59 + extern struct _opt opt;
60 + extern char ip_tcp_sync[];
61 +
62 +-struct sockaddr_in ip_tcp_sync_addr;
63 + int rawsox;
64 +
65 + #define DFL_HOSTS_PARALLEL (5000)
66
67 diff --git a/net-analyzer/thcrut/thcrut-1.2.5-r2.ebuild b/net-analyzer/thcrut/thcrut-1.2.5-r2.ebuild
68 new file mode 100644
69 index 00000000000..191ed447f47
70 --- /dev/null
71 +++ b/net-analyzer/thcrut/thcrut-1.2.5-r2.ebuild
72 @@ -0,0 +1,35 @@
73 +# Copyright 1999-2020 Gentoo Authors
74 +# Distributed under the terms of the GNU General Public License v2
75 +
76 +EAPI=7
77 +inherit autotools
78 +
79 +DESCRIPTION="Network discovery and fingerprinting tool"
80 +HOMEPAGE="http://www.thc.org/thc-rut/"
81 +SRC_URI="http://www.thc.org/thc-rut/${P}.tar.gz"
82 +
83 +LICENSE="free-noncomm PCRE GPL-1+"
84 +SLOT="0"
85 +KEYWORDS="~amd64 ~ppc ~sparc ~x86"
86 +
87 +DEPEND="
88 + dev-libs/libpcre
89 + net-libs/libnet:1.0
90 + net-libs/libpcap
91 +"
92 +RDEPEND="
93 + ${DEPEND}
94 +"
95 +DOCS=( ChangeLog FAQ README TODO thcrutlogo.txt )
96 +PATCHES=(
97 + "${FILESDIR}"/${P}-configure.patch
98 + "${FILESDIR}"/${P}-flags.patch
99 + "${FILESDIR}"/${P}-fno-common.patch
100 + "${FILESDIR}"/${P}-libnet.patch
101 +)
102 +
103 +src_prepare() {
104 + rm -r Libnet-1.0.2a pcre-3.9 || die
105 + default
106 + eautoreconf
107 +}