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