1 |
commit: 9c63d18d78a9329fd221409c91a0da5b60465238 |
2 |
Author: Dan Robertson <danlrobertson89 <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Feb 5 20:20:41 2018 +0000 |
4 |
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com> |
5 |
CommitDate: Mon Feb 5 20:20:41 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=9c63d18d |
7 |
|
8 |
net-analyzer/wireshark: build with udpdump enabled |
9 |
|
10 |
net-analyzer/wireshark/Manifest | 1 + |
11 |
.../files/wireshark-1.99.8-qtchooser.patch | 10 + |
12 |
.../files/wireshark-2.1.0-sse4_2-r1.patch | 21 ++ |
13 |
.../files/wireshark-2.4-androiddump.patch | 27 ++ |
14 |
.../wireshark/files/wireshark-2.4.3-libsmi.patch | 233 ++++++++++++++++ |
15 |
.../files/wireshark-99999999-androiddump.patch | 10 + |
16 |
.../files/wireshark-includes-fix-musl.patch | 15 ++ |
17 |
net-analyzer/wireshark/wireshark-2.4.4.ebuild | 294 +++++++++++++++++++++ |
18 |
8 files changed, 611 insertions(+) |
19 |
|
20 |
diff --git a/net-analyzer/wireshark/Manifest b/net-analyzer/wireshark/Manifest |
21 |
new file mode 100644 |
22 |
index 0000000..4987062 |
23 |
--- /dev/null |
24 |
+++ b/net-analyzer/wireshark/Manifest |
25 |
@@ -0,0 +1 @@ |
26 |
+DIST wireshark-2.4.4.tar.xz 28818372 BLAKE2B 1a28cabdc8dfbed16244c6906ef360c2d3edee3cd75a5134ea7b21b138c3be08de9327a1415cb308f7a01c382e0aa5cf14e4466b4c3762c29a7f7cbc4683890e SHA512 b6625f860a10e10babd686820680a5e169594f171e7e176fc96325255ec096481da2e8a0fdff10b42cead82011740714a4331003dda0d48bf3b419da37834bdc |
27 |
|
28 |
diff --git a/net-analyzer/wireshark/files/wireshark-1.99.8-qtchooser.patch b/net-analyzer/wireshark/files/wireshark-1.99.8-qtchooser.patch |
29 |
new file mode 100644 |
30 |
index 0000000..4745951 |
31 |
--- /dev/null |
32 |
+++ b/net-analyzer/wireshark/files/wireshark-1.99.8-qtchooser.patch |
33 |
@@ -0,0 +1,10 @@ |
34 |
+--- a/acinclude.m4 |
35 |
++++ b/acinclude.m4 |
36 |
+@@ -2149,7 +2149,6 @@ |
37 |
+ # -qt={version} argument, otherwise we look for particular |
38 |
+ # tool versions using tool name suffixes. |
39 |
+ # |
40 |
+- AC_PATH_PROG(QTCHOOSER, qtchooser) |
41 |
+ if test ! -z "$QTCHOOSER"; then |
42 |
+ # |
43 |
+ # We found qtchooser; we assume that means that |
44 |
|
45 |
diff --git a/net-analyzer/wireshark/files/wireshark-2.1.0-sse4_2-r1.patch b/net-analyzer/wireshark/files/wireshark-2.1.0-sse4_2-r1.patch |
46 |
new file mode 100644 |
47 |
index 0000000..8efe5af |
48 |
--- /dev/null |
49 |
+++ b/net-analyzer/wireshark/files/wireshark-2.1.0-sse4_2-r1.patch |
50 |
@@ -0,0 +1,21 @@ |
51 |
+--- a/configure.ac |
52 |
++++ b/configure.ac |
53 |
+@@ -818,6 +818,7 @@ |
54 |
+ AC_SUBST(PIE_CFLAGS) |
55 |
+ AC_SUBST(PIE_LDFLAGS) |
56 |
+ |
57 |
++AC_ARG_ENABLE(sse4_2,[ --enable-sse4_2 Support SSE4.2 (Streaming SIMD Extensions 4.2) instructions],[ |
58 |
+ WS_CFLAGS_saved="$WS_CFLAGS" |
59 |
+ AC_WIRESHARK_COMPILER_FLAGS_CHECK(-msse4.2, C) |
60 |
+ if test "x$can_add_to_cflags" = "xyes" |
61 |
+@@ -844,6 +845,10 @@ |
62 |
+ ac_sse4_2_flag=-xarch=sse4_2 |
63 |
+ fi |
64 |
+ fi |
65 |
++],[ |
66 |
++AC_MSG_RESULT(no) |
67 |
++]) |
68 |
++ |
69 |
+ WS_CFLAGS="$WS_CFLAGS_saved" |
70 |
+ |
71 |
+ if test "x$ac_sse4_2_flag" != x; then |
72 |
|
73 |
diff --git a/net-analyzer/wireshark/files/wireshark-2.4-androiddump.patch b/net-analyzer/wireshark/files/wireshark-2.4-androiddump.patch |
74 |
new file mode 100644 |
75 |
index 0000000..e67ab21 |
76 |
--- /dev/null |
77 |
+++ b/net-analyzer/wireshark/files/wireshark-2.4-androiddump.patch |
78 |
@@ -0,0 +1,27 @@ |
79 |
+--- a/extcap/androiddump.c |
80 |
++++ b/extcap/androiddump.c |
81 |
+@@ -363,13 +363,13 @@ |
82 |
+ pcap = pcap_open_dead_with_tstamp_precision(encap_ext, PACKET_LENGTH, PCAP_TSTAMP_PRECISION_NANO); |
83 |
+ extcap_dumper.dumper.pcap = pcap_dump_open(pcap, fifo); |
84 |
+ if (!extcap_dumper.dumper.pcap) { |
85 |
+- g_warning("Can't open %s for saving packets: %s", pcap_geterr(pcap)); |
86 |
++ g_warning("Can't open %s for saving packets: %s", fifo, pcap_geterr(pcap)); |
87 |
+ pcap_close(pcap); |
88 |
+ exit(EXIT_CODE_CANNOT_SAVE_LIBPCAP_DUMP); |
89 |
+ } |
90 |
+ extcap_dumper.encap = encap; |
91 |
+ if (pcap_dump_flush(extcap_dumper.dumper.pcap) == -1) { |
92 |
+- g_warning("Write to %s failed: %s", g_strerror(errno)); |
93 |
++ g_warning("Write to %s failed: %s", fifo, g_strerror(errno)); |
94 |
+ } |
95 |
+ #else |
96 |
+ int err = 0; |
97 |
+@@ -416,7 +416,7 @@ |
98 |
+ |
99 |
+ pcap_dump((u_char *) extcap_dumper.dumper.pcap, &pcap_header, buffer); |
100 |
+ if (pcap_dump_flush(extcap_dumper.dumper.pcap) == -1) { |
101 |
+- g_warning("Write to %s failed: %s", g_strerror(errno)); |
102 |
++ g_warning("Write to %s failed: %s", fifo, g_strerror(errno)); |
103 |
+ } |
104 |
+ #else |
105 |
+ int err = 0; |
106 |
|
107 |
diff --git a/net-analyzer/wireshark/files/wireshark-2.4.3-libsmi.patch b/net-analyzer/wireshark/files/wireshark-2.4.3-libsmi.patch |
108 |
new file mode 100644 |
109 |
index 0000000..288efb7 |
110 |
--- /dev/null |
111 |
+++ b/net-analyzer/wireshark/files/wireshark-2.4.3-libsmi.patch |
112 |
@@ -0,0 +1,233 @@ |
113 |
+From 72c2e53981a204d746737d8c01c4ad3738cd4880 Mon Sep 17 00:00:00 2001 |
114 |
+From: =?utf8?q?Jo=C3=A3o=20Valverde?= <joao.valverde@×××××××××××××××.pt> |
115 |
+Date: Sun, 5 Nov 2017 12:05:43 +0000 |
116 |
+Subject: [PATCH 1/1] autotools: Use pkg-config to configure Libsmi |
117 |
+MIME-Version: 1.0 |
118 |
+Content-Type: text/plain; charset=utf8 |
119 |
+Content-Transfer-Encoding: 8bit |
120 |
+ |
121 |
+Change-Id: Icecea743739aa7e1a65753f623f311514260d373 |
122 |
+Reviewed-on: https://code.wireshark.org/review/24252 |
123 |
+Petri-Dish: João Valverde <j@×××.pt> |
124 |
+Tested-by: Petri Dish Buildbot |
125 |
+Reviewed-by: João Valverde <j@×××.pt> |
126 |
+--- |
127 |
+ Makefile.am | 2 +- |
128 |
+ configure.ac | 27 +++++++++--- |
129 |
+ epan/Makefile.am | 2 +- |
130 |
+ m4/libsmi.m4 | 125 ------------------------------------------------------- |
131 |
+ 4 files changed, 24 insertions(+), 132 deletions(-) |
132 |
+ delete mode 100644 m4/libsmi.m4 |
133 |
+ |
134 |
+diff --git a/Makefile.am b/Makefile.am |
135 |
+index a2851e0..e6ed5eb 100644 |
136 |
+--- a/Makefile.am |
137 |
++++ b/Makefile.am |
138 |
+@@ -422,7 +422,7 @@ EPAN_EXTRA_LIBS = \ |
139 |
+ @KRB5_LIBS@ \ |
140 |
+ @LIBGCRYPT_LIBS@ \ |
141 |
+ @LIBGNUTLS_LIBS@ \ |
142 |
+- @LIBSMI_LDFLAGS@ |
143 |
++ @LIBSMI_LIBS@ |
144 |
+ |
145 |
+ # Libraries and plugin flags with which to link wireshark. |
146 |
+ # |
147 |
+diff --git a/configure.ac b/configure.ac |
148 |
+index 3b3475b..326561c 100644 |
149 |
+--- a/configure.ac |
150 |
++++ b/configure.ac |
151 |
+@@ -432,10 +432,6 @@ linux*) |
152 |
+ fi |
153 |
+ esac |
154 |
+ |
155 |
+-# libsmi |
156 |
+-# FIXME: currently the path argument to with-libsmi is being ignored |
157 |
+-AX_LIBSMI |
158 |
+- |
159 |
+ # |
160 |
+ # Check if we should build the Wireshark User's Guide |
161 |
+ # |
162 |
+@@ -2427,6 +2423,27 @@ else |
163 |
+ fi |
164 |
+ AM_CONDITIONAL(HAVE_LIBXML2, test "x$have_libxml2" = "xyes") |
165 |
+ |
166 |
++# |
167 |
++# Libsmi check |
168 |
++# |
169 |
++AC_ARG_WITH(libsmi, |
170 |
++ AC_HELP_STRING([--with-libsmi=@<:@yes/no@:>@], |
171 |
++ [use libsmi MIB/PIB library @<:@default=yes, if available@:>@]), |
172 |
++ [], [with_libsmi="if_available"]) |
173 |
++ |
174 |
++have_libsmi=no |
175 |
++if test "x$with_libsmi" != "xno"; then |
176 |
++ PKG_CHECK_MODULES(LIBSMI, libsmi, |
177 |
++ [have_libsmi=yes |
178 |
++ AC_DEFINE(HAVE_LIBSMI, 1, [Define if you have libsmi]) |
179 |
++ ], |
180 |
++ [if test "x$with_libsmi" = "xyes"; then |
181 |
++ # Error out if the user explicitly requested libsmi |
182 |
++ AC_MSG_ERROR([Libsmi was requested, but is not installed for development]) |
183 |
++ fi |
184 |
++ ] |
185 |
++ ) |
186 |
++fi |
187 |
+ |
188 |
+ dnl |
189 |
+ dnl check whether plugins should be enabled |
190 |
+@@ -3012,7 +3029,7 @@ echo " Use pcap library : $want_pcap" |
191 |
+ echo " Use zlib library : $zlib_message" |
192 |
+ echo " Use kerberos library : $krb5_message" |
193 |
+ echo " Use c-ares library : $c_ares_message" |
194 |
+-echo " Use SMI MIB library : $libsmi_message" |
195 |
++echo " Use SMI MIB library : $have_libsmi" |
196 |
+ echo " Use GNU gcrypt library : yes" |
197 |
+ echo " Use GnuTLS library : $tls_message" |
198 |
+ echo " Use POSIX capabilities library : $libcap_message" |
199 |
+diff --git a/epan/Makefile.am b/epan/Makefile.am |
200 |
+index 9f7de62..e85f97b 100644 |
201 |
+--- a/epan/Makefile.am |
202 |
++++ b/epan/Makefile.am |
203 |
+@@ -330,7 +330,7 @@ libwireshark_la_LIBADD = \ |
204 |
+ @KRB5_LIBS@ \ |
205 |
+ @LIBGCRYPT_LIBS@ \ |
206 |
+ @LIBGNUTLS_LIBS@ \ |
207 |
+- @LIBSMI_LDFLAGS@ \ |
208 |
++ @LIBSMI_LIBS@ \ |
209 |
+ @LZ4_LIBS@ \ |
210 |
+ @NGHTTP2_LIBS@ \ |
211 |
+ @SNAPPY_LIBS@ \ |
212 |
+diff --git a/m4/libsmi.m4 b/m4/libsmi.m4 |
213 |
+deleted file mode 100644 |
214 |
+index d719438..0000000 |
215 |
+--- a/m4/libsmi.m4 |
216 |
++++ /dev/null |
217 |
+@@ -1,125 +0,0 @@ |
218 |
+-# Configure paths for libsmi |
219 |
+-# Shamelessly stolen from http://autoconf-archive.cryp.to/ax_lib_sqlite3.html |
220 |
+- |
221 |
+-# Synopsis: AX_LIBSMI([minimum library version]) |
222 |
+-# The default minimum library version is 2 |
223 |
+- |
224 |
+-# This macro sets/substitutes the following: |
225 |
+-# AC_DEFINE(HAVE_LIBSMI) |
226 |
+-# AC_SUBST(LIBSMI_CFLAGS) |
227 |
+-# AC_SUBST(LIBSMI_LDFLAGS) |
228 |
+-# AC_SUBST(LIBSMI_VERSION) |
229 |
+-# $libsmi_message is set to "yes" or "no" |
230 |
+- |
231 |
+-AC_DEFUN([AX_LIBSMI], |
232 |
+-[ |
233 |
+- AC_ARG_WITH([libsmi], |
234 |
+- AC_HELP_STRING( |
235 |
+- [--with-libsmi=@<:@DIR@:>@], |
236 |
+- [use libsmi MIB/PIB library @<:@default=yes@:>@, optionally specify the prefix for libsmi] |
237 |
+- ), |
238 |
+- [ |
239 |
+- if test "$withval" = "no"; then |
240 |
+- WANT_LIBSMI="no" |
241 |
+- elif test "$withval" = "yes"; then |
242 |
+- WANT_LIBSMI="yes" |
243 |
+- ac_libsmi_path="" |
244 |
+- else |
245 |
+- WANT_LIBSMI="yes" |
246 |
+- ac_libsmi_path="$withval" |
247 |
+- fi |
248 |
+- ], |
249 |
+- [WANT_LIBSMI="yes"] |
250 |
+- ) |
251 |
+- |
252 |
+- libsmi_message="no" |
253 |
+- LIBSMI_CFLAGS="" |
254 |
+- LIBSMI_LDFLAGS="" |
255 |
+- LIBSMI_VERSION="" |
256 |
+- |
257 |
+- if test "x$WANT_LIBSMI" = "xyes"; then |
258 |
+- |
259 |
+- ac_libsmi_header="smi.h" |
260 |
+- |
261 |
+- libsmi_version_req=ifelse([$1], [], [2], [$1]) |
262 |
+- |
263 |
+- AC_MSG_CHECKING([for libsmi >= $libsmi_version_req]) |
264 |
+- |
265 |
+- if test "$ac_libsmi_path" != ""; then |
266 |
+- ac_libsmi_ldflags="-L$ac_libsmi_path/lib" |
267 |
+- ac_libsmi_cflags="-I$ac_libsmi_path/include" |
268 |
+- else |
269 |
+- for ac_libsmi_path_tmp in /usr /usr/local /opt $prefix; do |
270 |
+- if test -f "$ac_libsmi_path_tmp/include/$ac_libsmi_header" \ |
271 |
+- && test -r "$ac_libsmi_path_tmp/include/$ac_libsmi_header"; then |
272 |
+- ac_libsmi_path=$ac_libsmi_path_tmp |
273 |
+- ac_libsmi_ldflags="-L$ac_libsmi_path_tmp/lib" |
274 |
+- ac_libsmi_cflags="-I$ac_libsmi_path_tmp/include" |
275 |
+- break; |
276 |
+- fi |
277 |
+- done |
278 |
+- fi |
279 |
+- |
280 |
+- ac_libsmi_ldflags="$ac_libsmi_ldflags -lsmi" |
281 |
+- |
282 |
+- saved_CFLAGS="$CFLAGS" |
283 |
+- CFLAGS="$CFLAGS $ac_libsmi_cflags" |
284 |
+- |
285 |
+- AC_LANG_PUSH(C) |
286 |
+- AC_COMPILE_IFELSE( |
287 |
+- [ |
288 |
+- AC_LANG_PROGRAM([[@%:@include <smi.h>]], |
289 |
+- [[ |
290 |
+- int current, revision, age, n; |
291 |
+- const int required = $libsmi_version_req; |
292 |
+- if (smiInit("")) |
293 |
+- exit(1); |
294 |
+- if (strcmp(SMI_LIBRARY_VERSION, smi_library_version)) |
295 |
+- exit(2); |
296 |
+- n = sscanf(smi_library_version, "%d:%d:%d", ¤t, &revision, &age); |
297 |
+- if (n != 3) |
298 |
+- exit(3); |
299 |
+- if (required < current - age || required > current) |
300 |
+- exit(4); |
301 |
+- ]] |
302 |
+- ) |
303 |
+- ], |
304 |
+- [ |
305 |
+- AC_MSG_RESULT([yes]) |
306 |
+- libsmi_message="yes" |
307 |
+- ], |
308 |
+- [ |
309 |
+- AC_MSG_RESULT([not found]) |
310 |
+- libsmi_message="no" |
311 |
+- ] |
312 |
+- ) |
313 |
+- AC_LANG_POP([C]) |
314 |
+- |
315 |
+- CFLAGS="$saved_CFLAGS" |
316 |
+- |
317 |
+- if test "$libsmi_message" = "yes"; then |
318 |
+- |
319 |
+- LIBSMI_CFLAGS="$ac_libsmi_cflags" |
320 |
+- LIBSMI_LDFLAGS="$ac_libsmi_ldflags" |
321 |
+- |
322 |
+- ac_libsmi_header_path="$ac_libsmi_path/include/$ac_libsmi_header" |
323 |
+- |
324 |
+- dnl Retrieve libsmi release version |
325 |
+- if test "x$ac_libsmi_header_path" != "x"; then |
326 |
+- ac_libsmi_version=`cat $ac_libsmi_header_path \ |
327 |
+- | grep '#define.*SMI_LIBRARY_VERSION.*\"' | sed -e 's/.* "//' \ |
328 |
+- | sed -e 's/"//'` |
329 |
+- if test $ac_libsmi_version != ""; then |
330 |
+- LIBSMI_VERSION=$ac_libsmi_version |
331 |
+- else |
332 |
+- AC_MSG_WARN([Can not find SMI_LIBRARY_VERSION macro in smi.h header to retrieve libsmi version!]) |
333 |
+- fi |
334 |
+- fi |
335 |
+- |
336 |
+- AC_SUBST(LIBSMI_CFLAGS) |
337 |
+- AC_SUBST(LIBSMI_LDFLAGS) |
338 |
+- AC_SUBST(LIBSMI_VERSION) |
339 |
+- AC_DEFINE(HAVE_LIBSMI, 1, [Define to 1 if you have the `smi' library (-lsmi).]) |
340 |
+- fi |
341 |
+- fi |
342 |
+-]) |
343 |
+-- |
344 |
+2.7.4 |
345 |
+ |
346 |
|
347 |
diff --git a/net-analyzer/wireshark/files/wireshark-99999999-androiddump.patch b/net-analyzer/wireshark/files/wireshark-99999999-androiddump.patch |
348 |
new file mode 100644 |
349 |
index 0000000..db1c560 |
350 |
--- /dev/null |
351 |
+++ b/net-analyzer/wireshark/files/wireshark-99999999-androiddump.patch |
352 |
@@ -0,0 +1,10 @@ |
353 |
+--- a/extcap/Makefile.am |
354 |
++++ b/extcap/Makefile.am |
355 |
+@@ -32,6 +32,7 @@ |
356 |
+ ../ui/libui.a \ |
357 |
+ ../wiretap/libwiretap.la \ |
358 |
+ ../wsutil/libwsutil.la \ |
359 |
++ @PCAP_LIBS@ \ |
360 |
+ @GLIB_LIBS@ |
361 |
+ |
362 |
+ randpktdump_SOURCES = \ |
363 |
|
364 |
diff --git a/net-analyzer/wireshark/files/wireshark-includes-fix-musl.patch b/net-analyzer/wireshark/files/wireshark-includes-fix-musl.patch |
365 |
new file mode 100644 |
366 |
index 0000000..097e989 |
367 |
--- /dev/null |
368 |
+++ b/net-analyzer/wireshark/files/wireshark-includes-fix-musl.patch |
369 |
@@ -0,0 +1,15 @@ |
370 |
+diff --git a/extcap/udpdump.c b/extcap/udpdump.c |
371 |
+index 44cc24e1db..1310e37e61 100644 |
372 |
+--- a/extcap/udpdump.c |
373 |
++++ b/extcap/udpdump.c |
374 |
+@@ -38,6 +38,10 @@ |
375 |
+ #include <unistd.h> |
376 |
+ #endif |
377 |
+ |
378 |
++#ifdef HAVE_SYS_TYPES_H |
379 |
++ #include <sys/types.h> |
380 |
++#endif |
381 |
++ |
382 |
+ #ifdef HAVE_ARPA_INET_H |
383 |
+ #include <arpa/inet.h> |
384 |
+ #endif |
385 |
|
386 |
diff --git a/net-analyzer/wireshark/wireshark-2.4.4.ebuild b/net-analyzer/wireshark/wireshark-2.4.4.ebuild |
387 |
new file mode 100644 |
388 |
index 0000000..70e9450 |
389 |
--- /dev/null |
390 |
+++ b/net-analyzer/wireshark/wireshark-2.4.4.ebuild |
391 |
@@ -0,0 +1,294 @@ |
392 |
+# Copyright 1999-2018 Gentoo Foundation |
393 |
+# Distributed under the terms of the GNU General Public License v2 |
394 |
+ |
395 |
+EAPI=6 |
396 |
+inherit autotools eutils fcaps flag-o-matic gnome2-utils multilib qmake-utils user xdg-utils |
397 |
+ |
398 |
+DESCRIPTION="A network protocol analyzer formerly known as ethereal" |
399 |
+HOMEPAGE="https://www.wireshark.org/" |
400 |
+SRC_URI="${HOMEPAGE}download/src/all-versions/${P/_/}.tar.xz" |
401 |
+ |
402 |
+LICENSE="GPL-2" |
403 |
+SLOT="0/${PV}" |
404 |
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~x86-fbsd" |
405 |
+IUSE=" |
406 |
+ adns androiddump +capinfos +caps +captype ciscodump cpu_flags_x86_sse4_2 |
407 |
+ +dftest doc doc-pdf +dumpcap +editcap geoip gtk kerberos libssh libxml2 lua |
408 |
+ lz4 +mergecap +netlink nghttp2 +pcap portaudio +qt5 +randpkt +randpktdump |
409 |
+ +reordercap sbc selinux +sharkd smi snappy spandsp sshdump ssl +text2pcap |
410 |
+ tfshark +tshark +udpdump zlib |
411 |
+" |
412 |
+REQUIRED_USE=" |
413 |
+ ciscodump? ( libssh ) |
414 |
+ sshdump? ( libssh ) |
415 |
+" |
416 |
+ |
417 |
+S=${WORKDIR}/${P/_/} |
418 |
+ |
419 |
+CDEPEND=" |
420 |
+ >=dev-libs/glib-2.14:2 |
421 |
+ dev-libs/libgcrypt:0 |
422 |
+ netlink? ( dev-libs/libnl:3 ) |
423 |
+ adns? ( >=net-dns/c-ares-1.5 ) |
424 |
+ caps? ( sys-libs/libcap ) |
425 |
+ geoip? ( dev-libs/geoip ) |
426 |
+ gtk? ( |
427 |
+ x11-libs/gdk-pixbuf |
428 |
+ x11-libs/gtk+:3 |
429 |
+ x11-libs/pango |
430 |
+ x11-misc/xdg-utils |
431 |
+ ) |
432 |
+ kerberos? ( virtual/krb5 ) |
433 |
+ libssh? ( >=net-libs/libssh-0.6 ) |
434 |
+ libxml2? ( dev-libs/libxml2 ) |
435 |
+ lua? ( >=dev-lang/lua-5.1:* ) |
436 |
+ lz4? ( app-arch/lz4 ) |
437 |
+ nghttp2? ( net-libs/nghttp2 ) |
438 |
+ pcap? ( net-libs/libpcap ) |
439 |
+ portaudio? ( media-libs/portaudio ) |
440 |
+ qt5? ( |
441 |
+ dev-qt/qtcore:5 |
442 |
+ dev-qt/qtgui:5 |
443 |
+ dev-qt/qtmultimedia:5 |
444 |
+ dev-qt/qtprintsupport:5 |
445 |
+ dev-qt/qtwidgets:5 |
446 |
+ || ( |
447 |
+ media-libs/speexdsp |
448 |
+ <media-libs/speex-1.2.0 |
449 |
+ ) |
450 |
+ x11-misc/xdg-utils |
451 |
+ ) |
452 |
+ sbc? ( media-libs/sbc ) |
453 |
+ smi? ( net-libs/libsmi ) |
454 |
+ snappy? ( app-arch/snappy ) |
455 |
+ spandsp? ( media-libs/spandsp ) |
456 |
+ ssl? ( net-libs/gnutls:= ) |
457 |
+ zlib? ( sys-libs/zlib !=sys-libs/zlib-1.2.4 ) |
458 |
+" |
459 |
+# We need perl for `pod2html`. The rest of the perl stuff is to block older |
460 |
+# and broken installs. #455122 |
461 |
+DEPEND=" |
462 |
+ ${CDEPEND} |
463 |
+ dev-lang/perl |
464 |
+ !<virtual/perl-Pod-Simple-3.170 |
465 |
+ !<perl-core/Pod-Simple-3.170 |
466 |
+ doc? ( |
467 |
+ app-doc/doxygen |
468 |
+ app-text/asciidoc |
469 |
+ dev-libs/libxml2 |
470 |
+ dev-libs/libxslt |
471 |
+ doc-pdf? ( dev-java/fop ) |
472 |
+ www-client/lynx |
473 |
+ ) |
474 |
+ qt5? ( |
475 |
+ dev-qt/linguist-tools:5 |
476 |
+ ) |
477 |
+ sys-devel/bison |
478 |
+ sys-devel/flex |
479 |
+ virtual/pkgconfig |
480 |
+" |
481 |
+RDEPEND=" |
482 |
+ ${CDEPEND} |
483 |
+ gtk? ( virtual/freedesktop-icon-theme ) |
484 |
+ qt5? ( virtual/freedesktop-icon-theme ) |
485 |
+ selinux? ( sec-policy/selinux-wireshark ) |
486 |
+" |
487 |
+PATCHES=( |
488 |
+ "${FILESDIR}"/${PN}-1.99.8-qtchooser.patch |
489 |
+ "${FILESDIR}"/${PN}-2.1.0-sse4_2-r1.patch |
490 |
+ "${FILESDIR}"/${PN}-2.4-androiddump.patch |
491 |
+ "${FILESDIR}"/${PN}-99999999-androiddump.patch |
492 |
+ "${FILESDIR}"/${PN}-2.4.3-libsmi.patch |
493 |
+ "${FILESDIR}"/${PN}-includes-fix-musl.patch |
494 |
+) |
495 |
+ |
496 |
+pkg_setup() { |
497 |
+ enewgroup wireshark |
498 |
+} |
499 |
+ |
500 |
+src_prepare() { |
501 |
+ default |
502 |
+ |
503 |
+ eautoreconf |
504 |
+} |
505 |
+ |
506 |
+src_configure() { |
507 |
+ local myconf |
508 |
+ |
509 |
+ # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass |
510 |
+ # --with-ssl to ./configure. (Mimics code from acinclude.m4). |
511 |
+ if use kerberos; then |
512 |
+ case $(krb5-config --libs) in |
513 |
+ *-lcrypto*) |
514 |
+ ewarn "Kerberos was built with ssl support: linkage with openssl is enabled." |
515 |
+ ewarn "Note there are annoying license incompatibilities between the OpenSSL" |
516 |
+ ewarn "license and the GPL, so do your check before distributing such package." |
517 |
+ myconf+=( "--with-ssl" ) |
518 |
+ ;; |
519 |
+ esac |
520 |
+ fi |
521 |
+ |
522 |
+ # Enable wireshark binary with any supported GUI toolkit (bug #473188) |
523 |
+ if use gtk || use qt5; then |
524 |
+ myconf+=( "--enable-wireshark" ) |
525 |
+ else |
526 |
+ myconf+=( "--disable-wireshark" ) |
527 |
+ fi |
528 |
+ |
529 |
+ if ! use qt5; then |
530 |
+ myconf+=( "--with-qt=no" ) |
531 |
+ fi |
532 |
+ |
533 |
+ if use qt5; then |
534 |
+ export QT_MIN_VERSION=5.3.0 |
535 |
+ append-cxxflags -fPIC -DPIC |
536 |
+ fi |
537 |
+ |
538 |
+ # Hack around inability to disable doxygen/fop doc generation |
539 |
+ use doc || export ac_cv_prog_HAVE_DOXYGEN=false |
540 |
+ use doc-pdf || export ac_cv_prog_HAVE_FOP=false |
541 |
+ |
542 |
+ econf \ |
543 |
+ $(use androiddump && use pcap && echo --enable-androiddump-use-libpcap=yes) \ |
544 |
+ $(use dumpcap && use_with pcap dumpcap-group wireshark) \ |
545 |
+ $(use_enable androiddump) \ |
546 |
+ $(use_enable capinfos) \ |
547 |
+ $(use_enable captype) \ |
548 |
+ $(use_enable ciscodump) \ |
549 |
+ $(use_enable dftest) \ |
550 |
+ $(use_enable dumpcap) \ |
551 |
+ $(use_enable editcap) \ |
552 |
+ $(use_enable mergecap) \ |
553 |
+ $(use_enable randpkt) \ |
554 |
+ $(use_enable randpktdump) \ |
555 |
+ $(use_enable reordercap) \ |
556 |
+ $(use_enable sharkd) \ |
557 |
+ $(use_enable sshdump) \ |
558 |
+ $(use_enable text2pcap) \ |
559 |
+ $(use_enable tfshark) \ |
560 |
+ $(use_enable tshark) \ |
561 |
+ $(use_enable udpdump) \ |
562 |
+ $(use_with adns c-ares) \ |
563 |
+ $(use_with caps libcap) \ |
564 |
+ $(use_with geoip) \ |
565 |
+ $(use_with gtk gtk 3) \ |
566 |
+ $(use_with kerberos krb5) \ |
567 |
+ $(use_with libssh) \ |
568 |
+ $(use_with libxml2) \ |
569 |
+ $(use_with lua) \ |
570 |
+ $(use_with lz4) \ |
571 |
+ $(use_with nghttp2) \ |
572 |
+ $(use_with pcap) \ |
573 |
+ $(use_with portaudio) \ |
574 |
+ $(use_with sbc) \ |
575 |
+ $(use_with smi libsmi) \ |
576 |
+ $(use_with snappy) \ |
577 |
+ $(use_with spandsp) \ |
578 |
+ $(use_with ssl gnutls) \ |
579 |
+ $(use_with zlib) \ |
580 |
+ $(usex cpu_flags_x86_sse4_2 --enable-sse4_2 '') \ |
581 |
+ $(usex netlink --with-libnl=3 --without-libnl) \ |
582 |
+ $(usex qt5 --with-qt=5 '') \ |
583 |
+ $(usex qt5 LRELEASE=$(qt5_get_bindir)/lrelease '') \ |
584 |
+ $(usex qt5 MOC=$(qt5_get_bindir)/moc '') \ |
585 |
+ $(usex qt5 RCC=$(qt5_get_bindir)/rcc '') \ |
586 |
+ $(usex qt5 UIC=$(qt5_get_bindir)/uic '') \ |
587 |
+ --disable-profile-build \ |
588 |
+ --disable-warnings-as-errors \ |
589 |
+ --sysconfdir="${EPREFIX}"/etc/wireshark \ |
590 |
+ ${myconf[@]} |
591 |
+} |
592 |
+ |
593 |
+src_compile() { |
594 |
+ default |
595 |
+ |
596 |
+ if use doc; then |
597 |
+ emake -j1 -C docbook |
598 |
+ if use doc-pdf; then |
599 |
+ addpredict "/root/.java" |
600 |
+ emake -C docbook all-pdf |
601 |
+ fi |
602 |
+ fi |
603 |
+} |
604 |
+ |
605 |
+src_install() { |
606 |
+ default |
607 |
+ |
608 |
+ # FAQ is not required as is installed from help/faq.txt |
609 |
+ dodoc AUTHORS ChangeLog NEWS README{,.bsd,.linux,.macos,.vmware} \ |
610 |
+ doc/{randpkt.txt,README*} |
611 |
+ |
612 |
+ if use doc; then |
613 |
+ docinto /usr/share/doc/${PF}/html |
614 |
+ dodoc -r docbook/{release-notes.html,ws{d,u}g_html{,_chunked}} |
615 |
+ if use doc-pdf; then |
616 |
+ docinto /usr/share/doc/${PF}/pdf/ |
617 |
+ dodoc docbook/{developer,user}-guide-{a4,us}.pdf docbook/release-notes.pdf |
618 |
+ fi |
619 |
+ fi |
620 |
+ |
621 |
+ # install headers |
622 |
+ local wsheader |
623 |
+ for wsheader in \ |
624 |
+ config.h \ |
625 |
+ epan/*.h \ |
626 |
+ epan/crypt/*.h \ |
627 |
+ epan/dfilter/*.h \ |
628 |
+ epan/dissectors/*.h \ |
629 |
+ epan/ftypes/*.h \ |
630 |
+ epan/wmem/*.h \ |
631 |
+ register.h \ |
632 |
+ wiretap/*.h \ |
633 |
+ ws_diag_control.h \ |
634 |
+ ws_symbol_export.h \ |
635 |
+ wsutil/*.h |
636 |
+ do |
637 |
+ insinto /usr/include/wireshark/$( dirname ${wsheader} ) |
638 |
+ doins ${wsheader} |
639 |
+ done |
640 |
+ |
641 |
+ #with the above this really shouldn't be needed, but things may be looking in wiretap/ instead of wireshark/wiretap/ |
642 |
+ insinto /usr/include/wiretap |
643 |
+ doins wiretap/wtap.h |
644 |
+ |
645 |
+ if use gtk || use qt5; then |
646 |
+ local c d |
647 |
+ for c in hi lo; do |
648 |
+ for d in 16 32 48; do |
649 |
+ insinto /usr/share/icons/${c}color/${d}x${d}/apps |
650 |
+ newins image/${c}${d}-app-wireshark.png wireshark.png |
651 |
+ done |
652 |
+ done |
653 |
+ for d in 16 24 32 48 64 128 256 ; do |
654 |
+ insinto /usr/share/icons/hicolor/${d}x${d}/mimetypes |
655 |
+ newins image/WiresharkDoc-${d}.png application-vnd.tcpdump.pcap.png |
656 |
+ done |
657 |
+ fi |
658 |
+ |
659 |
+ prune_libtool_files |
660 |
+} |
661 |
+ |
662 |
+pkg_postinst() { |
663 |
+ gnome2_icon_cache_update |
664 |
+ xdg_desktop_database_update |
665 |
+ xdg_mimeinfo_database_update |
666 |
+ |
667 |
+ # Add group for users allowed to sniff. |
668 |
+ enewgroup wireshark |
669 |
+ |
670 |
+ if use pcap; then |
671 |
+ fcaps -o 0 -g wireshark -m 4710 -M 0710 \ |
672 |
+ cap_dac_read_search,cap_net_raw,cap_net_admin \ |
673 |
+ "${EROOT}"/usr/bin/dumpcap |
674 |
+ fi |
675 |
+ |
676 |
+ ewarn "NOTE: To capture traffic with wireshark as normal user you have to" |
677 |
+ ewarn "add yourself to the wireshark group. This security measure ensures" |
678 |
+ ewarn "that only trusted users are allowed to sniff your traffic." |
679 |
+} |
680 |
+ |
681 |
+pkg_postrm() { |
682 |
+ gnome2_icon_cache_update |
683 |
+ xdg_desktop_database_update |
684 |
+ xdg_mimeinfo_database_update |
685 |
+} |