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