1 |
commit: a05a36c816705f878dde3c30f15553d6aa424f9a |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Oct 5 06:29:17 2016 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 5 06:30:19 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a05a36c8 |
7 |
|
8 |
net-analyzer/wireshark: Version bump (bug #596190). |
9 |
|
10 |
Package-Manager: portage-2.3.1 |
11 |
|
12 |
net-analyzer/wireshark/Manifest | 2 + |
13 |
net-analyzer/wireshark/wireshark-2.0.7.ebuild | 266 +++++++++++++++++++++++++ |
14 |
net-analyzer/wireshark/wireshark-2.2.1.ebuild | 273 ++++++++++++++++++++++++++ |
15 |
3 files changed, 541 insertions(+) |
16 |
|
17 |
diff --git a/net-analyzer/wireshark/Manifest b/net-analyzer/wireshark/Manifest |
18 |
index ac522cb..b414aa5 100644 |
19 |
--- a/net-analyzer/wireshark/Manifest |
20 |
+++ b/net-analyzer/wireshark/Manifest |
21 |
@@ -1,2 +1,4 @@ |
22 |
DIST wireshark-2.0.6.tar.bz2 31213641 SHA256 70f3ac4fbe6d3b51abe602f34f21b527a6819ca5017f4d1b27f963fc52c298db SHA512 2e4c9b76e365c6a2952b6a949173982286783884a60faaffb78a0364f606cb43811313ee31ada4c437cf831440253038d47976e5a1d73c3b1a85645691b1e5d9 WHIRLPOOL aa6570e5250c27ee3ac1ac9ea834102e0136f1482f702845b03aa4ab83fbcec64f8454fc9e9f6f92298e06208293c49a030f37d9dd6b569c3ed7c211e22eb5f5 |
23 |
+DIST wireshark-2.0.7.tar.bz2 31194949 SHA256 e7d161e147679fb0a2bf81efe7297988fd908155b9835cb0825083afae89e6d4 SHA512 2227cb66db77a480125399439658d345ce9387640512de9074539c056179aedf79f6a8e0be278e7c92a3d94058d1a6d461ba7409fa866e576f3e94cf3fd3baa9 WHIRLPOOL 74187e747c7bdacd8efc4b43fa2025aa77621a3f5115d5684c2638c02aa94d2294ca6b1572320396b57a6d62fdc4e68de0603f464c4e9240021c4afb9ad0fd40 |
24 |
DIST wireshark-2.2.0.tar.bz2 32141141 SHA256 a6847e741efcba6cb9d92d464d4219917bee3ad0b8f5b0f80d4388ad2f3f1104 SHA512 03dd1ce686b0e012d3498d6966382db1ff39844e2b03286eded5d77062a958d2dc939b00558708ae37b8e354d95ee6c4aa32023477d862b35bff4e2a0f8f3326 WHIRLPOOL bac335d03f919a079d3192af4e94998ee6a73e90e6f73512a3a5353b62af27967ebdf1d921689493d83315610f25cc8aeac62b8b4574aa3bb82d44e5275065c9 |
25 |
+DIST wireshark-2.2.1.tar.bz2 32154087 SHA256 900e22af04c8b35e0d02a25a360ab1fb7cfe5ac18fc48a9afd75a7103e569149 SHA512 11f09853f5640cdd9003f2f0f309346cf76366edec2e4c24b5493dfc198a0f3e8918d21a38cf50ee5a1516bfdae853d364cda53338baef58f50cde0a929deae6 WHIRLPOOL e72460efee91d0013df40ae797f01f7331f27f15c0d159e3b1b1ee4aaaad30c07232e731ec2773c208e334879223337267f6c09684acfc44fa9d676cbf451994 |
26 |
|
27 |
diff --git a/net-analyzer/wireshark/wireshark-2.0.7.ebuild b/net-analyzer/wireshark/wireshark-2.0.7.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000..eed093c |
30 |
--- /dev/null |
31 |
+++ b/net-analyzer/wireshark/wireshark-2.0.7.ebuild |
32 |
@@ -0,0 +1,266 @@ |
33 |
+# Copyright 1999-2016 Gentoo Foundation |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+# $Id$ |
36 |
+ |
37 |
+EAPI=5 |
38 |
+inherit autotools eutils fcaps flag-o-matic multilib qmake-utils qt4-r2 user |
39 |
+ |
40 |
+DESCRIPTION="A network protocol analyzer formerly known as ethereal" |
41 |
+HOMEPAGE="http://www.wireshark.org/" |
42 |
+SRC_URI="${HOMEPAGE}download/src/all-versions/${P/_/}.tar.bz2" |
43 |
+ |
44 |
+LICENSE="GPL-2" |
45 |
+SLOT="0/${PV}" |
46 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" |
47 |
+IUSE=" |
48 |
+ adns androiddump +caps crypt doc doc-pdf geoip +gtk3 ipv6 kerberos lua |
49 |
+ +netlink +pcap portaudio +qt4 qt5 selinux sbc smi tfshark |
50 |
+ cpu_flags_x86_sse4_2 ssl zlib |
51 |
+" |
52 |
+REQUIRED_USE=" |
53 |
+ ssl? ( crypt ) |
54 |
+ ?? ( qt4 qt5 ) |
55 |
+" |
56 |
+ |
57 |
+S=${WORKDIR}/${P/_/} |
58 |
+ |
59 |
+GTK_COMMON_DEPEND=" |
60 |
+ x11-libs/gdk-pixbuf |
61 |
+ x11-libs/pango |
62 |
+ x11-misc/xdg-utils |
63 |
+" |
64 |
+CDEPEND=" |
65 |
+ >=dev-libs/glib-2.14:2 |
66 |
+ netlink? ( dev-libs/libnl:3 ) |
67 |
+ adns? ( >=net-dns/c-ares-1.5 ) |
68 |
+ crypt? ( dev-libs/libgcrypt:0 ) |
69 |
+ caps? ( sys-libs/libcap ) |
70 |
+ geoip? ( dev-libs/geoip ) |
71 |
+ gtk3? ( |
72 |
+ ${GTK_COMMON_DEPEND} |
73 |
+ x11-libs/gtk+:3 |
74 |
+ ) |
75 |
+ kerberos? ( virtual/krb5 ) |
76 |
+ lua? ( >=dev-lang/lua-5.1:* ) |
77 |
+ pcap? ( net-libs/libpcap ) |
78 |
+ portaudio? ( media-libs/portaudio ) |
79 |
+ qt4? ( |
80 |
+ dev-qt/qtcore:4 |
81 |
+ dev-qt/qtgui:4[accessibility] |
82 |
+ x11-misc/xdg-utils |
83 |
+ ) |
84 |
+ qt5? ( |
85 |
+ dev-qt/qtcore:5 |
86 |
+ dev-qt/qtgui:5 |
87 |
+ dev-qt/qtmultimedia:5 |
88 |
+ dev-qt/qtprintsupport:5 |
89 |
+ dev-qt/qtwidgets:5 |
90 |
+ x11-misc/xdg-utils |
91 |
+ ) |
92 |
+ sbc? ( media-libs/sbc ) |
93 |
+ smi? ( net-libs/libsmi ) |
94 |
+ ssl? ( net-libs/gnutls:= ) |
95 |
+ zlib? ( sys-libs/zlib !=sys-libs/zlib-1.2.4 ) |
96 |
+" |
97 |
+# We need perl for `pod2html`. The rest of the perl stuff is to block older |
98 |
+# and broken installs. #455122 |
99 |
+DEPEND=" |
100 |
+ ${CDEPEND} |
101 |
+ dev-lang/perl |
102 |
+ !<virtual/perl-Pod-Simple-3.170 |
103 |
+ !<perl-core/Pod-Simple-3.170 |
104 |
+ doc? ( |
105 |
+ app-doc/doxygen |
106 |
+ app-text/asciidoc |
107 |
+ dev-libs/libxml2 |
108 |
+ dev-libs/libxslt |
109 |
+ doc-pdf? ( dev-java/fop ) |
110 |
+ www-client/lynx |
111 |
+ ) |
112 |
+ sys-devel/bison |
113 |
+ sys-devel/flex |
114 |
+ virtual/pkgconfig |
115 |
+" |
116 |
+RDEPEND=" |
117 |
+ ${CDEPEND} |
118 |
+ gtk3? ( virtual/freedesktop-icon-theme ) |
119 |
+ qt4? ( virtual/freedesktop-icon-theme ) |
120 |
+ qt5? ( virtual/freedesktop-icon-theme ) |
121 |
+ selinux? ( sec-policy/selinux-wireshark ) |
122 |
+" |
123 |
+ |
124 |
+pkg_setup() { |
125 |
+ enewgroup wireshark |
126 |
+} |
127 |
+ |
128 |
+src_prepare() { |
129 |
+ epatch \ |
130 |
+ "${FILESDIR}"/${PN}-1.6.13-ldflags.patch \ |
131 |
+ "${FILESDIR}"/${PN}-1.11.0-oldlibs.patch \ |
132 |
+ "${FILESDIR}"/${PN}-99999999-pkgconfig.patch \ |
133 |
+ "${FILESDIR}"/${PN}-1.99.8-qtchooser.patch \ |
134 |
+ "${FILESDIR}"/${PN}-2.0.0-androiddump-pcap.patch \ |
135 |
+ "${FILESDIR}"/${PN}-2.1.0-sse4_2.patch |
136 |
+ |
137 |
+ epatch_user |
138 |
+ |
139 |
+ eautoreconf |
140 |
+} |
141 |
+ |
142 |
+src_configure() { |
143 |
+ local myconf |
144 |
+ |
145 |
+ # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass |
146 |
+ # --with-ssl to ./configure. (Mimics code from acinclude.m4). |
147 |
+ if use kerberos; then |
148 |
+ case $(krb5-config --libs) in |
149 |
+ *-lcrypto*) |
150 |
+ ewarn "Kerberos was built with ssl support: linkage with openssl is enabled." |
151 |
+ ewarn "Note there are annoying license incompatibilities between the OpenSSL" |
152 |
+ ewarn "license and the GPL, so do your check before distributing such package." |
153 |
+ myconf+=( "--with-ssl" ) |
154 |
+ ;; |
155 |
+ esac |
156 |
+ fi |
157 |
+ |
158 |
+ # Enable wireshark binary with any supported GUI toolkit (bug #473188) |
159 |
+ if use gtk3 || use qt4 || use qt5; then |
160 |
+ myconf+=( "--enable-wireshark" ) |
161 |
+ else |
162 |
+ myconf+=( "--disable-wireshark" ) |
163 |
+ fi |
164 |
+ |
165 |
+ if ! use qt4 && ! use qt5; then |
166 |
+ myconf+=( "--with-qt=no" ) |
167 |
+ fi |
168 |
+ |
169 |
+ if use qt4; then |
170 |
+ export QT_MIN_VERSION=4.6.0 |
171 |
+ fi |
172 |
+ |
173 |
+ if use qt5; then |
174 |
+ export QT_MIN_VERSION=5.3.0 |
175 |
+ append-cxxflags -fPIC -DPIC |
176 |
+ fi |
177 |
+ |
178 |
+ # Hack around inability to disable doxygen/fop doc generation |
179 |
+ use doc || export ac_cv_prog_HAVE_DOXYGEN=false |
180 |
+ use doc-pdf || export ac_cv_prog_HAVE_FOP=false |
181 |
+ |
182 |
+ # dumpcap requires libcap |
183 |
+ # --disable-profile-build bugs #215806, #292991, #479602 |
184 |
+ econf \ |
185 |
+ $(use androiddump && use pcap && echo --enable-androiddump-use-libpcap=yes) \ |
186 |
+ $(use_enable androiddump) \ |
187 |
+ $(use_enable ipv6) \ |
188 |
+ $(use_enable tfshark) \ |
189 |
+ $(use_with adns c-ares) \ |
190 |
+ $(use_with caps libcap) \ |
191 |
+ $(use_with crypt gcrypt) \ |
192 |
+ $(use_with geoip) \ |
193 |
+ $(use_with gtk3) \ |
194 |
+ $(use_with kerberos krb5) \ |
195 |
+ $(use_with lua) \ |
196 |
+ $(use_with pcap dumpcap-group wireshark) \ |
197 |
+ $(use_with pcap) \ |
198 |
+ $(use_with portaudio) \ |
199 |
+ $(usex qt4 --with-qt=4 '') \ |
200 |
+ $(usex qt5 --with-qt=5 '') \ |
201 |
+ $(usex qt4 MOC=$(qt4_get_bindir)/moc '') \ |
202 |
+ $(usex qt4 RCC=$(qt4_get_bindir)/rcc '') \ |
203 |
+ $(usex qt4 UIC=$(qt4_get_bindir)/uic '') \ |
204 |
+ $(usex qt5 MOC=$(qt5_get_bindir)/moc '') \ |
205 |
+ $(usex qt5 RCC=$(qt5_get_bindir)/rcc '') \ |
206 |
+ $(usex qt5 UIC=$(qt5_get_bindir)/uic '') \ |
207 |
+ $(use_with sbc) \ |
208 |
+ $(use_with smi libsmi) \ |
209 |
+ $(use_with ssl gnutls) \ |
210 |
+ $(use_with zlib) \ |
211 |
+ $(usex netlink --with-libnl=3 --without-libnl) \ |
212 |
+ $(usex cpu_flags_x86_sse4_2 --enable-sse4_2 '') \ |
213 |
+ --disable-profile-build \ |
214 |
+ --disable-usr-local \ |
215 |
+ --disable-warnings-as-errors \ |
216 |
+ --sysconfdir="${EPREFIX}"/etc/wireshark \ |
217 |
+ --without-adns \ |
218 |
+ ${myconf[@]} |
219 |
+} |
220 |
+ |
221 |
+src_compile() { |
222 |
+ default |
223 |
+ if use doc; then |
224 |
+ use doc-pdf && addpredict "/root/.java" |
225 |
+ emake -j1 -C docbook |
226 |
+ fi |
227 |
+} |
228 |
+ |
229 |
+src_install() { |
230 |
+ default |
231 |
+ |
232 |
+ if use doc; then |
233 |
+ dohtml -r docbook/{release-notes.html,ws{d,u}g_html{,_chunked}} |
234 |
+ if use doc-pdf; then |
235 |
+ insinto /usr/share/doc/${PF}/pdf/ |
236 |
+ doins docbook/{developer,user}-guide-{a4,us}.pdf docbook/release-notes.pdf |
237 |
+ fi |
238 |
+ fi |
239 |
+ |
240 |
+ # FAQ is not required as is installed from help/faq.txt |
241 |
+ dodoc AUTHORS ChangeLog NEWS README{,.bsd,.linux,.macos,.vmware} \ |
242 |
+ doc/{randpkt.txt,README*} |
243 |
+ |
244 |
+ # install headers |
245 |
+ local wsheader |
246 |
+ for wsheader in \ |
247 |
+ color.h \ |
248 |
+ config.h \ |
249 |
+ epan/*.h \ |
250 |
+ epan/crypt/*.h \ |
251 |
+ epan/dfilter/*.h \ |
252 |
+ epan/dissectors/*.h \ |
253 |
+ epan/ftypes/*.h \ |
254 |
+ epan/wmem/*.h \ |
255 |
+ register.h \ |
256 |
+ wiretap/*.h \ |
257 |
+ ws_symbol_export.h \ |
258 |
+ wsutil/*.h |
259 |
+ do |
260 |
+ insinto /usr/include/wireshark/$( dirname ${wsheader} ) |
261 |
+ doins ${wsheader} |
262 |
+ done |
263 |
+ |
264 |
+ #with the above this really shouldn't be needed, but things may be looking in wiretap/ instead of wireshark/wiretap/ |
265 |
+ insinto /usr/include/wiretap |
266 |
+ doins wiretap/wtap.h |
267 |
+ |
268 |
+ if use gtk3 || use qt4 || use qt5; then |
269 |
+ local c d |
270 |
+ for c in hi lo; do |
271 |
+ for d in 16 32 48; do |
272 |
+ insinto /usr/share/icons/${c}color/${d}x${d}/apps |
273 |
+ newins image/${c}${d}-app-wireshark.png wireshark.png |
274 |
+ done |
275 |
+ done |
276 |
+ for d in 16 24 32 48 64 128 256 ; do |
277 |
+ insinto /usr/share/icons/hicolor/${d}x${d}/mimetypes |
278 |
+ newins image/WiresharkDoc-${d}.png application-vnd.tcpdump.pcap.png |
279 |
+ done |
280 |
+ fi |
281 |
+ |
282 |
+ prune_libtool_files |
283 |
+} |
284 |
+ |
285 |
+pkg_postinst() { |
286 |
+ # Add group for users allowed to sniff. |
287 |
+ enewgroup wireshark |
288 |
+ |
289 |
+ if use pcap; then |
290 |
+ fcaps -o 0 -g wireshark -m 4710 -M 0710 \ |
291 |
+ cap_dac_read_search,cap_net_raw,cap_net_admin \ |
292 |
+ "${EROOT}"/usr/bin/dumpcap |
293 |
+ fi |
294 |
+ |
295 |
+ ewarn "NOTE: To capture traffic with wireshark as normal user you have to" |
296 |
+ ewarn "add yourself to the wireshark group. This security measure ensures" |
297 |
+ ewarn "that only trusted users are allowed to sniff your traffic." |
298 |
+} |
299 |
|
300 |
diff --git a/net-analyzer/wireshark/wireshark-2.2.1.ebuild b/net-analyzer/wireshark/wireshark-2.2.1.ebuild |
301 |
new file mode 100644 |
302 |
index 00000000..a67c17a |
303 |
--- /dev/null |
304 |
+++ b/net-analyzer/wireshark/wireshark-2.2.1.ebuild |
305 |
@@ -0,0 +1,273 @@ |
306 |
+# Copyright 1999-2016 Gentoo Foundation |
307 |
+# Distributed under the terms of the GNU General Public License v2 |
308 |
+# $Id$ |
309 |
+ |
310 |
+EAPI=5 |
311 |
+inherit autotools eutils fcaps flag-o-matic multilib qmake-utils qt4-r2 user |
312 |
+ |
313 |
+DESCRIPTION="A network protocol analyzer formerly known as ethereal" |
314 |
+HOMEPAGE="http://www.wireshark.org/" |
315 |
+SRC_URI="${HOMEPAGE}download/src/all-versions/${P/_/}.tar.bz2" |
316 |
+ |
317 |
+LICENSE="GPL-2" |
318 |
+SLOT="0/${PV}" |
319 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" |
320 |
+IUSE=" |
321 |
+ adns androiddump +caps ciscodump cpu_flags_x86_sse4_2 crypt doc doc-pdf |
322 |
+ geoip +gtk kerberos lua +netlink +pcap portaudio +qt4 qt5 sbc selinux smi |
323 |
+ libssh randpkt randpktdump sshdump ssl tfshark zlib |
324 |
+" |
325 |
+REQUIRED_USE=" |
326 |
+ ?? ( qt4 qt5 ) |
327 |
+ ciscodump? ( libssh ) |
328 |
+ sshdump? ( libssh ) |
329 |
+ ssl? ( crypt ) |
330 |
+" |
331 |
+ |
332 |
+S=${WORKDIR}/${P/_/} |
333 |
+ |
334 |
+CDEPEND=" |
335 |
+ >=dev-libs/glib-2.14:2 |
336 |
+ netlink? ( dev-libs/libnl:3 ) |
337 |
+ adns? ( >=net-dns/c-ares-1.5 ) |
338 |
+ crypt? ( dev-libs/libgcrypt:0 ) |
339 |
+ caps? ( sys-libs/libcap ) |
340 |
+ geoip? ( dev-libs/geoip ) |
341 |
+ gtk? ( |
342 |
+ x11-libs/gdk-pixbuf |
343 |
+ x11-libs/gtk+:3 |
344 |
+ x11-libs/pango |
345 |
+ x11-misc/xdg-utils |
346 |
+ ) |
347 |
+ kerberos? ( virtual/krb5 ) |
348 |
+ libssh? ( >=net-libs/libssh-0.6 ) |
349 |
+ lua? ( >=dev-lang/lua-5.1:* ) |
350 |
+ pcap? ( net-libs/libpcap ) |
351 |
+ portaudio? ( media-libs/portaudio ) |
352 |
+ qt4? ( |
353 |
+ dev-qt/qtcore:4 |
354 |
+ dev-qt/qtgui:4[accessibility] |
355 |
+ x11-misc/xdg-utils |
356 |
+ ) |
357 |
+ qt5? ( |
358 |
+ dev-qt/qtcore:5 |
359 |
+ dev-qt/qtgui:5 |
360 |
+ dev-qt/qtmultimedia:5 |
361 |
+ dev-qt/qtprintsupport:5 |
362 |
+ dev-qt/qtwidgets:5 |
363 |
+ x11-misc/xdg-utils |
364 |
+ ) |
365 |
+ sbc? ( media-libs/sbc ) |
366 |
+ smi? ( net-libs/libsmi ) |
367 |
+ ssl? ( net-libs/gnutls:= ) |
368 |
+ zlib? ( sys-libs/zlib !=sys-libs/zlib-1.2.4 ) |
369 |
+" |
370 |
+# We need perl for `pod2html`. The rest of the perl stuff is to block older |
371 |
+# and broken installs. #455122 |
372 |
+DEPEND=" |
373 |
+ ${CDEPEND} |
374 |
+ dev-lang/perl |
375 |
+ !<virtual/perl-Pod-Simple-3.170 |
376 |
+ !<perl-core/Pod-Simple-3.170 |
377 |
+ doc? ( |
378 |
+ app-doc/doxygen |
379 |
+ app-text/asciidoc |
380 |
+ dev-libs/libxml2 |
381 |
+ dev-libs/libxslt |
382 |
+ doc-pdf? ( dev-java/fop ) |
383 |
+ www-client/lynx |
384 |
+ ) |
385 |
+ qt5? ( |
386 |
+ dev-qt/linguist-tools:5 |
387 |
+ ) |
388 |
+ sys-devel/bison |
389 |
+ sys-devel/flex |
390 |
+ virtual/pkgconfig |
391 |
+" |
392 |
+RDEPEND=" |
393 |
+ ${CDEPEND} |
394 |
+ gtk? ( virtual/freedesktop-icon-theme ) |
395 |
+ qt4? ( virtual/freedesktop-icon-theme ) |
396 |
+ qt5? ( virtual/freedesktop-icon-theme ) |
397 |
+ selinux? ( sec-policy/selinux-wireshark ) |
398 |
+" |
399 |
+ |
400 |
+pkg_setup() { |
401 |
+ enewgroup wireshark |
402 |
+} |
403 |
+ |
404 |
+src_prepare() { |
405 |
+ epatch \ |
406 |
+ "${FILESDIR}"/${PN}-1.99.8-qtchooser.patch \ |
407 |
+ "${FILESDIR}"/${PN}-2.1.0-sse4_2-r1.patch \ |
408 |
+ "${FILESDIR}"/${PN}-99999999-androiddump.patch |
409 |
+ |
410 |
+ epatch_user |
411 |
+ |
412 |
+ eautoreconf |
413 |
+} |
414 |
+ |
415 |
+src_configure() { |
416 |
+ local myconf |
417 |
+ |
418 |
+ # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass |
419 |
+ # --with-ssl to ./configure. (Mimics code from acinclude.m4). |
420 |
+ if use kerberos; then |
421 |
+ case $(krb5-config --libs) in |
422 |
+ *-lcrypto*) |
423 |
+ ewarn "Kerberos was built with ssl support: linkage with openssl is enabled." |
424 |
+ ewarn "Note there are annoying license incompatibilities between the OpenSSL" |
425 |
+ ewarn "license and the GPL, so do your check before distributing such package." |
426 |
+ myconf+=( "--with-ssl" ) |
427 |
+ ;; |
428 |
+ esac |
429 |
+ fi |
430 |
+ |
431 |
+ # Enable wireshark binary with any supported GUI toolkit (bug #473188) |
432 |
+ if use gtk || use qt4 || use qt5; then |
433 |
+ myconf+=( "--enable-wireshark" ) |
434 |
+ else |
435 |
+ myconf+=( "--disable-wireshark" ) |
436 |
+ fi |
437 |
+ |
438 |
+ if ! use qt4 && ! use qt5; then |
439 |
+ myconf+=( "--with-qt=no" ) |
440 |
+ fi |
441 |
+ |
442 |
+ if use qt4; then |
443 |
+ export QT_MIN_VERSION=4.6.0 |
444 |
+ fi |
445 |
+ |
446 |
+ if use qt5; then |
447 |
+ export QT_MIN_VERSION=5.3.0 |
448 |
+ append-cxxflags -fPIC -DPIC |
449 |
+ fi |
450 |
+ |
451 |
+ # Hack around inability to disable doxygen/fop doc generation |
452 |
+ use doc || export ac_cv_prog_HAVE_DOXYGEN=false |
453 |
+ use doc-pdf || export ac_cv_prog_HAVE_FOP=false |
454 |
+ |
455 |
+ # dumpcap requires libcap |
456 |
+ # --disable-profile-build bugs #215806, #292991, #479602 |
457 |
+ econf \ |
458 |
+ $(use androiddump && use pcap && echo --enable-androiddump-use-libpcap=yes) \ |
459 |
+ $(use_enable androiddump) \ |
460 |
+ $(use_enable ciscodump) \ |
461 |
+ $(use_enable randpkt) \ |
462 |
+ $(use_enable randpktdump) \ |
463 |
+ $(use_enable sshdump) \ |
464 |
+ $(use_enable tfshark) \ |
465 |
+ $(use_with adns c-ares) \ |
466 |
+ $(use_with caps libcap) \ |
467 |
+ $(use_with crypt gcrypt) \ |
468 |
+ $(use_with geoip) \ |
469 |
+ $(use_with gtk gtk 3) \ |
470 |
+ $(use_with kerberos krb5) \ |
471 |
+ $(use_with libssh ssh) \ |
472 |
+ $(use_with lua) \ |
473 |
+ $(use_with pcap dumpcap-group wireshark) \ |
474 |
+ $(use_with pcap) \ |
475 |
+ $(use_with portaudio) \ |
476 |
+ $(use_with sbc) \ |
477 |
+ $(use_with smi libsmi) \ |
478 |
+ $(use_with ssl gnutls) \ |
479 |
+ $(use_with zlib) \ |
480 |
+ $(usex cpu_flags_x86_sse4_2 --enable-sse4_2 '') \ |
481 |
+ $(usex netlink --with-libnl=3 --without-libnl) \ |
482 |
+ $(usex qt4 --with-qt=4 '') \ |
483 |
+ $(usex qt4 LRELEASE=$(qt4_get_bindir)/lrelease '') \ |
484 |
+ $(usex qt4 MOC=$(qt4_get_bindir)/moc '') \ |
485 |
+ $(usex qt4 RCC=$(qt4_get_bindir)/rcc '') \ |
486 |
+ $(usex qt4 UIC=$(qt4_get_bindir)/uic '') \ |
487 |
+ $(usex qt5 --with-qt=5 '') \ |
488 |
+ $(usex qt5 LRELEASE=$(qt5_get_bindir)/lrelease '') \ |
489 |
+ $(usex qt5 MOC=$(qt5_get_bindir)/moc '') \ |
490 |
+ $(usex qt5 RCC=$(qt5_get_bindir)/rcc '') \ |
491 |
+ $(usex qt5 UIC=$(qt5_get_bindir)/uic '') \ |
492 |
+ --disable-profile-build \ |
493 |
+ --disable-warnings-as-errors \ |
494 |
+ --sysconfdir="${EPREFIX}"/etc/wireshark \ |
495 |
+ ${myconf[@]} |
496 |
+} |
497 |
+ |
498 |
+src_compile() { |
499 |
+ default |
500 |
+ |
501 |
+ if use doc; then |
502 |
+ emake -j1 -C docbook |
503 |
+ if use doc-pdf; then |
504 |
+ addpredict "/root/.java" |
505 |
+ emake -C docbook all-pdf |
506 |
+ fi |
507 |
+ fi |
508 |
+} |
509 |
+ |
510 |
+src_install() { |
511 |
+ default |
512 |
+ |
513 |
+ if use doc; then |
514 |
+ dohtml -r docbook/{release-notes.html,ws{d,u}g_html{,_chunked}} |
515 |
+ if use doc-pdf; then |
516 |
+ insinto /usr/share/doc/${PF}/pdf/ |
517 |
+ doins docbook/{developer,user}-guide-{a4,us}.pdf docbook/release-notes.pdf |
518 |
+ fi |
519 |
+ fi |
520 |
+ |
521 |
+ # FAQ is not required as is installed from help/faq.txt |
522 |
+ dodoc AUTHORS ChangeLog NEWS README{,.bsd,.linux,.macos,.vmware} \ |
523 |
+ doc/{randpkt.txt,README*} |
524 |
+ |
525 |
+ # install headers |
526 |
+ local wsheader |
527 |
+ for wsheader in \ |
528 |
+ config.h \ |
529 |
+ epan/*.h \ |
530 |
+ epan/crypt/*.h \ |
531 |
+ epan/dfilter/*.h \ |
532 |
+ epan/dissectors/*.h \ |
533 |
+ epan/ftypes/*.h \ |
534 |
+ epan/wmem/*.h \ |
535 |
+ register.h \ |
536 |
+ wiretap/*.h \ |
537 |
+ ws_symbol_export.h \ |
538 |
+ wsutil/*.h |
539 |
+ do |
540 |
+ insinto /usr/include/wireshark/$( dirname ${wsheader} ) |
541 |
+ doins ${wsheader} |
542 |
+ done |
543 |
+ |
544 |
+ #with the above this really shouldn't be needed, but things may be looking in wiretap/ instead of wireshark/wiretap/ |
545 |
+ insinto /usr/include/wiretap |
546 |
+ doins wiretap/wtap.h |
547 |
+ |
548 |
+ if use gtk || use qt4 || use qt5; then |
549 |
+ local c d |
550 |
+ for c in hi lo; do |
551 |
+ for d in 16 32 48; do |
552 |
+ insinto /usr/share/icons/${c}color/${d}x${d}/apps |
553 |
+ newins image/${c}${d}-app-wireshark.png wireshark.png |
554 |
+ done |
555 |
+ done |
556 |
+ for d in 16 24 32 48 64 128 256 ; do |
557 |
+ insinto /usr/share/icons/hicolor/${d}x${d}/mimetypes |
558 |
+ newins image/WiresharkDoc-${d}.png application-vnd.tcpdump.pcap.png |
559 |
+ done |
560 |
+ fi |
561 |
+ |
562 |
+ prune_libtool_files |
563 |
+} |
564 |
+ |
565 |
+pkg_postinst() { |
566 |
+ # Add group for users allowed to sniff. |
567 |
+ enewgroup wireshark |
568 |
+ |
569 |
+ if use pcap; then |
570 |
+ fcaps -o 0 -g wireshark -m 4710 -M 0710 \ |
571 |
+ cap_dac_read_search,cap_net_raw,cap_net_admin \ |
572 |
+ "${EROOT}"/usr/bin/dumpcap |
573 |
+ fi |
574 |
+ |
575 |
+ ewarn "NOTE: To capture traffic with wireshark as normal user you have to" |
576 |
+ ewarn "add yourself to the wireshark group. This security measure ensures" |
577 |
+ ewarn "that only trusted users are allowed to sniff your traffic." |
578 |
+} |