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