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/wireshark/
Date: Sun, 25 Feb 2018 11:30:18
Message-Id: 1519558210.ab9217cc7186d2dbd665a4b61178180787b1ad5f.jer@gentoo
1 commit: ab9217cc7186d2dbd665a4b61178180787b1ad5f
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 25 11:25:00 2018 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 25 11:30:10 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab9217cc
7
8 net-analyzer/wireshark: Version 2.4.5.
9
10 Package-Manager: Portage-2.3.24, Repoman-2.3.6
11
12 net-analyzer/wireshark/Manifest | 1 +
13 net-analyzer/wireshark/wireshark-2.4.5.ebuild | 293 ++++++++++++++++++++++++++
14 2 files changed, 294 insertions(+)
15
16 diff --git a/net-analyzer/wireshark/Manifest b/net-analyzer/wireshark/Manifest
17 index 0f73f429f21..f67d63bbc48 100644
18 --- a/net-analyzer/wireshark/Manifest
19 +++ b/net-analyzer/wireshark/Manifest
20 @@ -1,4 +1,5 @@
21 DIST wireshark-2.2.7.tar.bz2 32309420 BLAKE2B a4ec32fab15235c5bde9f03ceafc5760055a769dd40d96526a18ad16d5642e957f620fc58f42c3323745bd679d6ef7b006283e7b9ddc52ddadc2680789d957ea SHA512 417836810eb895b3f2a6ac1cfd138fb0275382ea2edc60fc5f5e5f8ce433b56b8120aa8b58b4f77296986630fdf49e4c5c3859b2c2c5e26b1ce0651393b7d716
22 DIST wireshark-2.4.3.tar.xz 28807920 BLAKE2B 831691d084fc9ed6198b23c0347efa487398df37ca0cf5972db64b0724fad04b3104a5faed104b5d4b560254b19a2e41118c8d7b71cce785f38ede077215e80f SHA512 4344b9efeda3afba4b13bb468f7a12c4565da96c6182a8203cc5815baa11e7d84f3f11003b4289c6c11391cfb590b8c0319268196cc646a8f0226c432e9bb433
23 DIST wireshark-2.4.4.tar.xz 28818372 BLAKE2B 1a28cabdc8dfbed16244c6906ef360c2d3edee3cd75a5134ea7b21b138c3be08de9327a1415cb308f7a01c382e0aa5cf14e4466b4c3762c29a7f7cbc4683890e SHA512 b6625f860a10e10babd686820680a5e169594f171e7e176fc96325255ec096481da2e8a0fdff10b42cead82011740714a4331003dda0d48bf3b419da37834bdc
24 +DIST wireshark-2.4.5.tar.xz 28836740 BLAKE2B 797540daca259a2d5d7dc6e637f2b504b6d14191af4040e6b344c95db6c776b7de80c25c59c98ab84d0337cc96c7313b42c13103a3c3944768a793130deae258 SHA512 2f2c201d6b8a37dcbe03bc9affbf97d632d8e40e4fe5b3a3e79cbd5cfbeb5b9111919850546ccae355fcb042def3456438eb1c4d73f7d56d373e7898311b42f3
25 DIST wireshark-2.5.0.tar.xz 28197388 BLAKE2B 5d50d3752078a71d1d83f48a85ee564d14950efab39d5679430a61a266f9b93749278cd19d155036326753fbab86f83c5edb764adec5d68325730dbba19a920f SHA512 963c03dd363850cd0ad8a32a3e8c85410f2b23fadc081f00e4e3a2ad3a324a5f35626fbb7e490ec01c61260500363fef93c52bf7796b917e9490fff4044ee67f
26
27 diff --git a/net-analyzer/wireshark/wireshark-2.4.5.ebuild b/net-analyzer/wireshark/wireshark-2.4.5.ebuild
28 new file mode 100644
29 index 00000000000..b56e421d4d1
30 --- /dev/null
31 +++ b/net-analyzer/wireshark/wireshark-2.4.5.ebuild
32 @@ -0,0 +1,293 @@
33 +# Copyright 1999-2018 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=6
37 +inherit autotools eutils fcaps flag-o-matic gnome2-utils multilib qmake-utils user xdg-utils
38 +
39 +DESCRIPTION="A network protocol analyzer formerly known as ethereal"
40 +HOMEPAGE="https://www.wireshark.org/"
41 +SRC_URI="${HOMEPAGE}download/src/all-versions/${P/_/}.tar.xz"
42 +
43 +LICENSE="GPL-2"
44 +SLOT="0/${PV}"
45 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
46 +IUSE="
47 + adns androiddump +capinfos +caps +captype ciscodump cpu_flags_x86_sse4_2
48 + +dftest doc doc-pdf +dumpcap +editcap geoip gtk kerberos libssh libxml2 lua
49 + lz4 +mergecap +netlink nghttp2 +pcap portaudio +qt5 +randpkt +randpktdump
50 + +reordercap sbc selinux +sharkd smi snappy spandsp sshdump ssl +text2pcap
51 + tfshark +tshark +udpdump zlib
52 +"
53 +REQUIRED_USE="
54 + ciscodump? ( libssh )
55 + sshdump? ( libssh )
56 +"
57 +
58 +S=${WORKDIR}/${P/_/}
59 +
60 +CDEPEND="
61 + >=dev-libs/glib-2.14:2
62 + dev-libs/libgcrypt:0
63 + netlink? ( dev-libs/libnl:3 )
64 + adns? ( >=net-dns/c-ares-1.5 )
65 + caps? ( sys-libs/libcap )
66 + geoip? ( dev-libs/geoip )
67 + gtk? (
68 + x11-libs/gdk-pixbuf
69 + x11-libs/gtk+:3
70 + x11-libs/pango
71 + x11-misc/xdg-utils
72 + )
73 + kerberos? ( virtual/krb5 )
74 + libssh? ( >=net-libs/libssh-0.6 )
75 + libxml2? ( dev-libs/libxml2 )
76 + lua? ( >=dev-lang/lua-5.1:* )
77 + lz4? ( app-arch/lz4 )
78 + nghttp2? ( net-libs/nghttp2 )
79 + pcap? ( net-libs/libpcap )
80 + portaudio? ( media-libs/portaudio )
81 + qt5? (
82 + dev-qt/qtcore:5
83 + dev-qt/qtgui:5
84 + dev-qt/qtmultimedia:5
85 + dev-qt/qtprintsupport:5
86 + dev-qt/qtwidgets:5
87 + || (
88 + media-libs/speexdsp
89 + <media-libs/speex-1.2.0
90 + )
91 + x11-misc/xdg-utils
92 + )
93 + sbc? ( media-libs/sbc )
94 + smi? ( net-libs/libsmi )
95 + snappy? ( app-arch/snappy )
96 + spandsp? ( media-libs/spandsp )
97 + ssl? ( net-libs/gnutls:= )
98 + zlib? ( sys-libs/zlib !=sys-libs/zlib-1.2.4 )
99 +"
100 +# We need perl for `pod2html`. The rest of the perl stuff is to block older
101 +# and broken installs. #455122
102 +DEPEND="
103 + ${CDEPEND}
104 + dev-lang/perl
105 + !<virtual/perl-Pod-Simple-3.170
106 + !<perl-core/Pod-Simple-3.170
107 + doc? (
108 + app-doc/doxygen
109 + app-text/asciidoc
110 + dev-libs/libxml2
111 + dev-libs/libxslt
112 + doc-pdf? ( dev-java/fop )
113 + www-client/lynx
114 + )
115 + qt5? (
116 + dev-qt/linguist-tools:5
117 + )
118 + sys-devel/bison
119 + sys-devel/flex
120 + virtual/pkgconfig
121 +"
122 +RDEPEND="
123 + ${CDEPEND}
124 + gtk? ( virtual/freedesktop-icon-theme )
125 + qt5? ( virtual/freedesktop-icon-theme )
126 + selinux? ( sec-policy/selinux-wireshark )
127 +"
128 +PATCHES=(
129 + "${FILESDIR}"/${PN}-1.99.8-qtchooser.patch
130 + "${FILESDIR}"/${PN}-2.1.0-sse4_2-r1.patch
131 + "${FILESDIR}"/${PN}-2.4-androiddump.patch
132 + "${FILESDIR}"/${PN}-99999999-androiddump.patch
133 + "${FILESDIR}"/${PN}-2.4.3-libsmi.patch
134 +)
135 +
136 +pkg_setup() {
137 + enewgroup wireshark
138 +}
139 +
140 +src_prepare() {
141 + default
142 +
143 + eautoreconf
144 +}
145 +
146 +src_configure() {
147 + local myconf
148 +
149 + # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass
150 + # --with-ssl to ./configure. (Mimics code from acinclude.m4).
151 + if use kerberos; then
152 + case $(krb5-config --libs) in
153 + *-lcrypto*)
154 + ewarn "Kerberos was built with ssl support: linkage with openssl is enabled."
155 + ewarn "Note there are annoying license incompatibilities between the OpenSSL"
156 + ewarn "license and the GPL, so do your check before distributing such package."
157 + myconf+=( "--with-ssl" )
158 + ;;
159 + esac
160 + fi
161 +
162 + # Enable wireshark binary with any supported GUI toolkit (bug #473188)
163 + if use gtk || use qt5; then
164 + myconf+=( "--enable-wireshark" )
165 + else
166 + myconf+=( "--disable-wireshark" )
167 + fi
168 +
169 + if ! use qt5; then
170 + myconf+=( "--with-qt=no" )
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 + econf \
183 + $(use androiddump && use pcap && echo --enable-androiddump-use-libpcap=yes) \
184 + $(use dumpcap && use_with pcap dumpcap-group wireshark) \
185 + $(use_enable androiddump) \
186 + $(use_enable capinfos) \
187 + $(use_enable captype) \
188 + $(use_enable ciscodump) \
189 + $(use_enable dftest) \
190 + $(use_enable dumpcap) \
191 + $(use_enable editcap) \
192 + $(use_enable mergecap) \
193 + $(use_enable randpkt) \
194 + $(use_enable randpktdump) \
195 + $(use_enable reordercap) \
196 + $(use_enable sharkd) \
197 + $(use_enable sshdump) \
198 + $(use_enable text2pcap) \
199 + $(use_enable tfshark) \
200 + $(use_enable tshark) \
201 + $(use_enable udpdump) \
202 + $(use_with adns c-ares) \
203 + $(use_with caps libcap) \
204 + $(use_with geoip) \
205 + $(use_with gtk gtk 3) \
206 + $(use_with kerberos krb5) \
207 + $(use_with libssh) \
208 + $(use_with libxml2) \
209 + $(use_with lua) \
210 + $(use_with lz4) \
211 + $(use_with nghttp2) \
212 + $(use_with pcap) \
213 + $(use_with portaudio) \
214 + $(use_with sbc) \
215 + $(use_with smi libsmi) \
216 + $(use_with snappy) \
217 + $(use_with spandsp) \
218 + $(use_with ssl gnutls) \
219 + $(use_with zlib) \
220 + $(usex cpu_flags_x86_sse4_2 --enable-sse4_2 '') \
221 + $(usex netlink --with-libnl=3 --without-libnl) \
222 + $(usex qt5 --with-qt=5 '') \
223 + $(usex qt5 LRELEASE=$(qt5_get_bindir)/lrelease '') \
224 + $(usex qt5 MOC=$(qt5_get_bindir)/moc '') \
225 + $(usex qt5 RCC=$(qt5_get_bindir)/rcc '') \
226 + $(usex qt5 UIC=$(qt5_get_bindir)/uic '') \
227 + --disable-profile-build \
228 + --disable-warnings-as-errors \
229 + --sysconfdir="${EPREFIX}"/etc/wireshark \
230 + ${myconf[@]}
231 +}
232 +
233 +src_compile() {
234 + default
235 +
236 + if use doc; then
237 + emake -j1 -C docbook
238 + if use doc-pdf; then
239 + addpredict "/root/.java"
240 + emake -C docbook all-pdf
241 + fi
242 + fi
243 +}
244 +
245 +src_install() {
246 + default
247 +
248 + # FAQ is not required as is installed from help/faq.txt
249 + dodoc AUTHORS ChangeLog NEWS README{,.bsd,.linux,.macos,.vmware} \
250 + doc/{randpkt.txt,README*}
251 +
252 + if use doc; then
253 + docinto /usr/share/doc/${PF}/html
254 + dodoc -r docbook/{release-notes.html,ws{d,u}g_html{,_chunked}}
255 + if use doc-pdf; then
256 + docinto /usr/share/doc/${PF}/pdf/
257 + dodoc docbook/{developer,user}-guide-{a4,us}.pdf docbook/release-notes.pdf
258 + fi
259 + fi
260 +
261 + # install headers
262 + local wsheader
263 + for wsheader in \
264 + config.h \
265 + epan/*.h \
266 + epan/crypt/*.h \
267 + epan/dfilter/*.h \
268 + epan/dissectors/*.h \
269 + epan/ftypes/*.h \
270 + epan/wmem/*.h \
271 + register.h \
272 + wiretap/*.h \
273 + ws_diag_control.h \
274 + ws_symbol_export.h \
275 + wsutil/*.h
276 + do
277 + insinto /usr/include/wireshark/$( dirname ${wsheader} )
278 + doins ${wsheader}
279 + done
280 +
281 + #with the above this really shouldn't be needed, but things may be looking in wiretap/ instead of wireshark/wiretap/
282 + insinto /usr/include/wiretap
283 + doins wiretap/wtap.h
284 +
285 + if use gtk || use qt5; then
286 + local c d
287 + for c in hi lo; do
288 + for d in 16 32 48; do
289 + insinto /usr/share/icons/${c}color/${d}x${d}/apps
290 + newins image/${c}${d}-app-wireshark.png wireshark.png
291 + done
292 + done
293 + for d in 16 24 32 48 64 128 256 ; do
294 + insinto /usr/share/icons/hicolor/${d}x${d}/mimetypes
295 + newins image/WiresharkDoc-${d}.png application-vnd.tcpdump.pcap.png
296 + done
297 + fi
298 +
299 + prune_libtool_files
300 +}
301 +
302 +pkg_postinst() {
303 + gnome2_icon_cache_update
304 + xdg_desktop_database_update
305 + xdg_mimeinfo_database_update
306 +
307 + # Add group for users allowed to sniff.
308 + enewgroup wireshark
309 +
310 + if use pcap; then
311 + fcaps -o 0 -g wireshark -m 4710 -M 0710 \
312 + cap_dac_read_search,cap_net_raw,cap_net_admin \
313 + "${EROOT}"/usr/bin/dumpcap
314 + fi
315 +
316 + ewarn "NOTE: To capture traffic with wireshark as normal user you have to"
317 + ewarn "add yourself to the wireshark group. This security measure ensures"
318 + ewarn "that only trusted users are allowed to sniff your traffic."
319 +}
320 +
321 +pkg_postrm() {
322 + gnome2_icon_cache_update
323 + xdg_desktop_database_update
324 + xdg_mimeinfo_database_update
325 +}