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: Wed, 29 Aug 2018 20:01:23
Message-Id: 1535572874.4c616262121f2f36ec99ea09687888aef36439c4.jer@gentoo
1 commit: 4c616262121f2f36ec99ea09687888aef36439c4
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Wed Aug 29 20:00:55 2018 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Wed Aug 29 20:01:14 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c616262
7
8 net-analyzer/wireshark: Version 2.6.3.
9
10 Package-Manager: Portage-2.3.48, Repoman-2.3.10
11
12 net-analyzer/wireshark/Manifest | 1 +
13 net-analyzer/wireshark/wireshark-2.6.3.ebuild | 242 ++++++++++++++++++++++++++
14 2 files changed, 243 insertions(+)
15
16 diff --git a/net-analyzer/wireshark/Manifest b/net-analyzer/wireshark/Manifest
17 index 251aec24554..fd86b37262c 100644
18 --- a/net-analyzer/wireshark/Manifest
19 +++ b/net-analyzer/wireshark/Manifest
20 @@ -1,2 +1,3 @@
21 DIST wireshark-2.4.5.tar.xz 28836740 BLAKE2B 797540daca259a2d5d7dc6e637f2b504b6d14191af4040e6b344c95db6c776b7de80c25c59c98ab84d0337cc96c7313b42c13103a3c3944768a793130deae258 SHA512 2f2c201d6b8a37dcbe03bc9affbf97d632d8e40e4fe5b3a3e79cbd5cfbeb5b9111919850546ccae355fcb042def3456438eb1c4d73f7d56d373e7898311b42f3
22 DIST wireshark-2.6.2.tar.xz 28392140 BLAKE2B 08fb59061f618494ee07ca19cd97ab2ebe7c483419c1932e185dd42a0fe2b6d0070834ae5b7aaea4981f6fbc4baeaadb7c9eee8bf32b823af77e753c468257ce SHA512 e39cd8dec44c8c64e5da25df0ffda529130541e5267fb0bdaa232fb4a4438c28ac5c9169ba17a37119d6cedf04a022b40da09f35f44a3739bdfb9486703f39e2
23 +DIST wireshark-2.6.3.tar.xz 28384004 BLAKE2B f275c73173fbaf3f819c58f28859362e9c53ae50cf2649ac42c8d172362241eb00d7f43d0aead184ec67cb8da34d405124be10c5bf31226c2cb4800b8a01955b SHA512 87e5335840baa401a1064ee83e3f0ee859c059dd37a09f63f19eb5d91ad273e84f1c0e7a8fdd63fe8a7076abff5e79593827544c5796d921cf7dc7682c7c3f80
24
25 diff --git a/net-analyzer/wireshark/wireshark-2.6.3.ebuild b/net-analyzer/wireshark/wireshark-2.6.3.ebuild
26 new file mode 100644
27 index 00000000000..2677cc78823
28 --- /dev/null
29 +++ b/net-analyzer/wireshark/wireshark-2.6.3.ebuild
30 @@ -0,0 +1,242 @@
31 +# Copyright 1999-2018 Gentoo Foundation
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=6
35 +inherit cmake-utils eutils fcaps flag-o-matic gnome2-utils ltprune multilib qmake-utils user xdg-utils
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.xz"
40 +
41 +LICENSE="GPL-2"
42 +SLOT="0/${PV}"
43 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc64 ~x86"
44 +IUSE="
45 + adns androiddump bcg729 +capinfos +captype ciscodump +dftest doc
46 + +dumpcap +editcap gtk kerberos libxml2 lua lz4 maxminddb +mergecap +netlink
47 + nghttp2 +pcap portaudio +qt5 +randpkt +randpktdump +reordercap sbc selinux
48 + +sharkd smi snappy spandsp sshdump ssl +text2pcap tfshark +tshark +udpdump
49 + zlib
50 +"
51 +
52 +S=${WORKDIR}/${P/_/}
53 +
54 +CDEPEND="
55 + >=dev-libs/glib-2.14:2
56 + dev-libs/libgcrypt:0
57 + netlink? ( dev-libs/libnl:3 )
58 + adns? ( >=net-dns/c-ares-1.5 )
59 + bcg729? ( media-libs/bcg729 )
60 + filecaps? ( sys-libs/libcap )
61 + gtk? (
62 + x11-libs/gdk-pixbuf
63 + x11-libs/gtk+:3
64 + x11-libs/pango
65 + x11-misc/xdg-utils
66 + )
67 + kerberos? ( virtual/krb5 )
68 + sshdump? ( >=net-libs/libssh-0.6 )
69 + ciscodump? ( >=net-libs/libssh-0.6 )
70 + libxml2? ( dev-libs/libxml2 )
71 + lua? ( >=dev-lang/lua-5.1:* )
72 + lz4? ( app-arch/lz4 )
73 + maxminddb? ( dev-libs/libmaxminddb )
74 + nghttp2? ( net-libs/nghttp2 )
75 + pcap? ( net-libs/libpcap )
76 + portaudio? ( media-libs/portaudio )
77 + qt5? (
78 + dev-qt/qtcore:5
79 + dev-qt/qtgui:5
80 + dev-qt/qtmultimedia:5
81 + dev-qt/qtprintsupport:5
82 + dev-qt/qtwidgets:5
83 + >=media-libs/speex-1.2.0
84 + media-libs/speexdsp
85 + x11-misc/xdg-utils
86 + )
87 + sbc? ( media-libs/sbc )
88 + smi? ( net-libs/libsmi )
89 + snappy? ( app-arch/snappy )
90 + spandsp? ( media-libs/spandsp )
91 + ssl? ( net-libs/gnutls:= )
92 + zlib? ( sys-libs/zlib )
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 + dev-ruby/asciidoctor
104 + )
105 + qt5? (
106 + dev-qt/linguist-tools:5
107 + )
108 + sys-devel/bison
109 + sys-devel/flex
110 + virtual/pkgconfig
111 +"
112 +RDEPEND="
113 + ${CDEPEND}
114 + gtk? ( virtual/freedesktop-icon-theme )
115 + qt5? ( virtual/freedesktop-icon-theme )
116 + selinux? ( sec-policy/selinux-wireshark )
117 +"
118 +PATCHES=(
119 + "${FILESDIR}"/${PN}-1.99.8-qtchooser.patch
120 + "${FILESDIR}"/${PN}-2.4-androiddump.patch
121 + "${FILESDIR}"/${PN}-2.6.0-androiddump-wsutil.patch
122 + "${FILESDIR}"/${PN}-2.6.0-redhat.patch
123 + "${FILESDIR}"/${PN}-2.6.2-qtsvg.patch
124 + "${FILESDIR}"/${PN}-99999999-androiddump.patch
125 +)
126 +
127 +pkg_setup() {
128 + enewgroup wireshark
129 +}
130 +
131 +src_configure() {
132 + local mycmakeargs
133 +
134 + # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass
135 + # --with-ssl to ./configure. (Mimics code from acinclude.m4).
136 + if use kerberos; then
137 + case $(krb5-config --libs) in
138 + *-lcrypto*)
139 + ewarn "Kerberos was built with ssl support: linkage with openssl is enabled."
140 + ewarn "Note there are annoying license incompatibilities between the OpenSSL"
141 + ewarn "license and the GPL, so do your check before distributing such package."
142 + mycmakeargs+=( -DENABLE_GNUTLS=$(usex ssl) )
143 + ;;
144 + esac
145 + fi
146 +
147 + if use qt5; then
148 + export QT_MIN_VERSION=5.3.0
149 + append-cxxflags -fPIC -DPIC
150 + fi
151 +
152 + mycmakeargs+=(
153 + $(use androiddump && use pcap && echo -DEXTCAP_ANDROIDDUMP_LIBPCAP=yes)
154 + $(usex qt5 LRELEASE=$(qt5_get_bindir)/lrelease '')
155 + $(usex qt5 MOC=$(qt5_get_bindir)/moc '')
156 + $(usex qt5 RCC=$(qt5_get_bindir)/rcc '')
157 + $(usex qt5 UIC=$(qt5_get_bindir)/uic '')
158 + -DBUILD_androiddump=$(usex androiddump)
159 + -DBUILD_capinfos=$(usex capinfos)
160 + -DBUILD_captype=$(usex captype)
161 + -DBUILD_ciscodump=$(usex ciscodump)
162 + -DBUILD_dftest=$(usex dftest)
163 + -DBUILD_dumpcap=$(usex dumpcap)
164 + -DBUILD_editcap=$(usex editcap)
165 + -DBUILD_mergecap=$(usex mergecap)
166 + -DBUILD_mmdbresolve=$(usex maxminddb)
167 + -DBUILD_randpkt=$(usex randpkt)
168 + -DBUILD_randpktdump=$(usex randpktdump)
169 + -DBUILD_reordercap=$(usex reordercap)
170 + -DBUILD_sharkd=$(usex sharkd)
171 + -DBUILD_sshdump=$(usex sshdump)
172 + -DBUILD_text2pcap=$(usex text2pcap)
173 + -DBUILD_tfshark=$(usex tfshark)
174 + -DBUILD_tshark=$(usex tshark)
175 + -DBUILD_udpdump=$(usex udpdump)
176 + -DBUILD_wireshark=$(usex qt5)
177 + -DBUILD_wireshark_gtk=$(usex gtk)
178 + -DDISABLE_WERROR=yes
179 + -DENABLE_BCG729=$(usex bcg729)
180 + -DENABLE_CAP=no
181 + -DENABLE_CARES=$(usex adns)
182 + -DENABLE_GNUTLS=$(usex ssl)
183 + -DENABLE_KERBEROS=$(usex kerberos)
184 + -DENABLE_LIBXML2=$(usex libxml2)
185 + -DENABLE_LUA=$(usex lua)
186 + -DENABLE_LZ4=$(usex lz4)
187 + -DENABLE_NETLINK=$(usex netlink)
188 + -DENABLE_NGHTTP2=$(usex nghttp2)
189 + -DENABLE_PCAP=$(usex pcap)
190 + -DENABLE_PORTAUDIO=$(usex portaudio)
191 + -DENABLE_SBC=$(usex sbc)
192 + -DENABLE_SMI=$(usex smi)
193 + -DENABLE_SNAPPY=$(usex snappy)
194 + -DENABLE_SPANDSP=$(usex spandsp)
195 + -DENABLE_ZLIB=$(usex zlib)
196 + )
197 +
198 + cmake-utils_src_configure
199 +}
200 +
201 +src_install() {
202 + cmake-utils_src_install
203 +
204 + # FAQ is not required as is installed from help/faq.txt
205 + dodoc AUTHORS ChangeLog NEWS README* doc/randpkt.txt doc/README*
206 +
207 + # install headers
208 + insinto /usr/include/wireshark
209 + doins ws_diag_control.h ws_symbol_export.h \
210 + "${BUILD_DIR}"/config.h "${BUILD_DIR}"/version.h
211 +
212 + local dir dirs=(
213 + epan
214 + epan/crypt
215 + epan/dfilter
216 + epan/dissectors
217 + epan/ftypes
218 + epan/wmem
219 + wiretap
220 + wsutil
221 + )
222 + for dir in "${dirs[@]}"
223 + do
224 + insinto /usr/include/wireshark/${dir}
225 + doins ${dir}/*.h
226 + done
227 +
228 + #with the above this really shouldn't be needed, but things may be looking
229 + # in wiretap/ instead of wireshark/wiretap/
230 + insinto /usr/include/wiretap
231 + doins wiretap/wtap.h
232 +
233 + if use gtk || use qt5; then
234 + local s
235 + for s in 16 32 48 64 128 256 512 1024; do
236 + insinto /usr/share/icons/hicolor/${s}x${s}/apps
237 + newins image/wsicon${s}.png wireshark.png
238 + done
239 + for s in 16 24 32 48 64 128 256 ; do
240 + insinto /usr/share/icons/hicolor/${s}x${s}/mimetypes
241 + newins image/WiresharkDoc-${s}.png application-vnd.tcpdump.pcap.png
242 + done
243 + fi
244 +
245 + prune_libtool_files
246 +}
247 +
248 +pkg_postinst() {
249 + gnome2_icon_cache_update
250 + xdg_desktop_database_update
251 + xdg_mimeinfo_database_update
252 +
253 + # Add group for users allowed to sniff.
254 + enewgroup wireshark
255 + chgrp wireshark "${EROOT}"/usr/bin/dumpcap
256 +
257 + if use dumpcap && use pcap; then
258 + fcaps -o 0 -g wireshark -m 4710 -M 0710 \
259 + cap_dac_read_search,cap_net_raw,cap_net_admin \
260 + "${EROOT}"/usr/bin/dumpcap
261 + fi
262 +
263 + ewarn "NOTE: To capture traffic with wireshark as normal user you have to"
264 + ewarn "add yourself to the wireshark group. This security measure ensures"
265 + ewarn "that only trusted users are allowed to sniff your traffic."
266 +}
267 +
268 +pkg_postrm() {
269 + gnome2_icon_cache_update
270 + xdg_desktop_database_update
271 + xdg_mimeinfo_database_update
272 +}