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