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 Oct 2020 20:19:32
Message-Id: 1601583567.6afadd93b76c3107bdeba136409277a2e5f920c0.jer@gentoo
1 commit: 6afadd93b76c3107bdeba136409277a2e5f920c0
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Thu Oct 1 20:19:09 2020 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 1 20:19:27 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6afadd93
7
8 net-analyzer/wireshark: Version 3.3.1
9
10 Package-Manager: Portage-3.0.8, Repoman-3.0.1
11 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
12
13 net-analyzer/wireshark/Manifest | 1 +
14 net-analyzer/wireshark/wireshark-3.3.1.ebuild | 260 ++++++++++++++++++++++++++
15 2 files changed, 261 insertions(+)
16
17 diff --git a/net-analyzer/wireshark/Manifest b/net-analyzer/wireshark/Manifest
18 index 2609271b4da..112896602e5 100644
19 --- a/net-analyzer/wireshark/Manifest
20 +++ b/net-analyzer/wireshark/Manifest
21 @@ -1,3 +1,4 @@
22 DIST wireshark-3.2.6.tar.xz 31635628 BLAKE2B 216623d4f357e755b9c032bef45b30c373bb0e2de773daabb78725491bd8eb0290d25a9016081dc62844c1be63e3afd273a8a6b8d16e70e589465fd837cc7442 SHA512 71905836370b916a92e7a76e4f93cb10a658374c7a95aa47b607b2b142abebdb0d1562f642782a5a946a167dfb28169572330a7603cf0d7ab6016ce7f12fac78
23 DIST wireshark-3.2.7.tar.xz 31659996 BLAKE2B 69ed148e5cc6403b3948f4851164033163d0817626feaeaa0abf09b749c9e37c036786ed91f04add1ceeb80b69b7d05316b648d339c8c86f0818e0ee0afdf4ad SHA512 c17913fe6c193ccc6b0dbf86932d625a1f3b670aef805296e5db2639118218e06d513910ad50ab3926204f94a0010425b0d498176f987516d64fdd6a52d2517b
24 DIST wireshark-3.3.0.tar.xz 32795500 BLAKE2B 1f5b7711e76464403a9ed11f2f72a858716e177334b036bf5f2b2aa9f41b197fded04ff18a3841f3d6fdab9acf331a5bc4dfee3adc8eca775c4eeedbbc163ece SHA512 1ca59d951b3b3c18f55f21023a775124639fbc99a0396e3b2ecf3569213659a039836c6bdaf82b802668b5108f455106a22e83ab26ee18ed882dfa564594df5a
25 +DIST wireshark-3.3.1.tar.xz 32876876 BLAKE2B d8973b9724bece1b9890ed468280bcef56f2ac4f1022882f520140db98dab1e81071f3621fda247a80a8e51ad18a77c606f077efbb3d0e13dea47f986a5300e5 SHA512 d6f50c14e79dff0fb902f5b06a2fb5a6975e5b17461205ab3275b05a53df606a5b1e488e8472cc644541b653df7d5f4a3c7009e38a2f75242af4ea2f59af061f
26
27 diff --git a/net-analyzer/wireshark/wireshark-3.3.1.ebuild b/net-analyzer/wireshark/wireshark-3.3.1.ebuild
28 new file mode 100644
29 index 00000000000..d2607c117e4
30 --- /dev/null
31 +++ b/net-analyzer/wireshark/wireshark-3.3.1.ebuild
32 @@ -0,0 +1,260 @@
33 +# Copyright 1999-2020 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +PYTHON_COMPAT=( python3_{6,7,8} )
38 +inherit fcaps flag-o-matic multilib python-any-r1 qmake-utils user xdg-utils cmake
39 +
40 +DESCRIPTION="A network protocol analyzer formerly known as ethereal"
41 +HOMEPAGE="https://www.wireshark.org/"
42 +SRC_URI="https://www.wireshark.org/download/src/all-versions/${P/_/}.tar.xz"
43 +LICENSE="GPL-2"
44 +
45 +SLOT="0/${PV}"
46 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~x86"
47 +IUSE="
48 + androiddump bcg729 brotli +capinfos +captype ciscodump +dftest doc dpauxmon
49 + +dumpcap +editcap http2 ilbc kerberos libxml2 lto lua lz4 maxminddb
50 + +mergecap +minizip +netlink +plugins plugin-ifdemo +pcap +qt5 +randpkt
51 + +randpktdump +reordercap sbc selinux +sharkd smi snappy spandsp sshdump ssl
52 + sdjournal test +text2pcap tfshark +tshark +udpdump zlib +zstd
53 +"
54 +S=${WORKDIR}/${P/_/}
55 +
56 +CDEPEND="
57 + >=dev-libs/glib-2.32:2
58 + >=net-dns/c-ares-1.5
59 + dev-libs/libgcrypt:0
60 + bcg729? ( media-libs/bcg729 )
61 + brotli? ( app-arch/brotli )
62 + ciscodump? ( >=net-libs/libssh-0.6 )
63 + filecaps? ( sys-libs/libcap )
64 + http2? ( net-libs/nghttp2 )
65 + ilbc? ( media-libs/libilbc )
66 + kerberos? ( virtual/krb5 )
67 + libxml2? ( dev-libs/libxml2 )
68 + lua? ( >=dev-lang/lua-5.1:* )
69 + lz4? ( app-arch/lz4 )
70 + maxminddb? ( dev-libs/libmaxminddb )
71 + minizip? ( sys-libs/zlib[minizip] )
72 + netlink? ( dev-libs/libnl:3 )
73 + pcap? ( net-libs/libpcap )
74 + qt5? (
75 + dev-qt/qtcore:5
76 + dev-qt/qtgui:5
77 + dev-qt/qtmultimedia:5
78 + dev-qt/qtprintsupport:5
79 + dev-qt/qtwidgets:5
80 + x11-misc/xdg-utils
81 + )
82 + sbc? ( media-libs/sbc )
83 + sdjournal? ( sys-apps/systemd )
84 + smi? ( net-libs/libsmi )
85 + snappy? ( app-arch/snappy )
86 + spandsp? ( media-libs/spandsp )
87 + sshdump? ( >=net-libs/libssh-0.6 )
88 + ssl? ( net-libs/gnutls:= )
89 + zlib? ( sys-libs/zlib )
90 + zstd? ( app-arch/zstd )
91 +"
92 +# We need perl for `pod2html`. The rest of the perl stuff is to block older
93 +# and broken installs. #455122
94 +DEPEND="
95 + ${CDEPEND}
96 + ${PYTHON_DEPS}
97 +"
98 +BDEPEND="
99 + dev-lang/perl
100 + sys-devel/bison
101 + sys-devel/flex
102 + virtual/pkgconfig
103 + doc? (
104 + app-doc/doxygen
105 + dev-ruby/asciidoctor
106 + )
107 + qt5? (
108 + dev-qt/linguist-tools:5
109 + )
110 + test? (
111 + dev-python/pytest
112 + dev-python/pytest-xdist
113 + )
114 +"
115 +RDEPEND="
116 + ${CDEPEND}
117 + qt5? ( virtual/freedesktop-icon-theme )
118 + selinux? ( sec-policy/selinux-wireshark )
119 +"
120 +REQUIRED_USE="
121 + plugin-ifdemo? ( plugins )
122 +"
123 +RESTRICT="test"
124 +PATCHES=(
125 + "${FILESDIR}"/${PN}-2.6.0-redhat.patch
126 + "${FILESDIR}"/${PN}-99999999-ui-needs-wiretap.patch
127 +)
128 +
129 +pkg_setup() {
130 + enewgroup wireshark
131 +}
132 +
133 +src_configure() {
134 + local mycmakeargs
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 + mycmakeargs+=( -DENABLE_GNUTLS=$(usex ssl) )
145 + ;;
146 + esac
147 + fi
148 +
149 + if use qt5; then
150 + export QT_MIN_VERSION=5.3.0
151 + append-cxxflags -fPIC -DPIC
152 + fi
153 +
154 + python_setup
155 +
156 + mycmakeargs+=(
157 + $(use androiddump && use pcap && echo -DEXTCAP_ANDROIDDUMP_LIBPCAP=yes)
158 + $(usex qt5 LRELEASE=$(qt5_get_bindir)/lrelease '')
159 + $(usex qt5 MOC=$(qt5_get_bindir)/moc '')
160 + $(usex qt5 RCC=$(qt5_get_bindir)/rcc '')
161 + $(usex qt5 UIC=$(qt5_get_bindir)/uic '')
162 + -DBUILD_androiddump=$(usex androiddump)
163 + -DBUILD_capinfos=$(usex capinfos)
164 + -DBUILD_captype=$(usex captype)
165 + -DBUILD_ciscodump=$(usex ciscodump)
166 + -DBUILD_dftest=$(usex dftest)
167 + -DBUILD_dpauxmon=$(usex dpauxmon)
168 + -DBUILD_dumpcap=$(usex dumpcap)
169 + -DBUILD_editcap=$(usex editcap)
170 + -DBUILD_mergecap=$(usex mergecap)
171 + -DBUILD_mmdbresolve=$(usex maxminddb)
172 + -DBUILD_randpkt=$(usex randpkt)
173 + -DBUILD_randpktdump=$(usex randpktdump)
174 + -DBUILD_reordercap=$(usex reordercap)
175 + -DBUILD_sdjournal=$(usex sdjournal)
176 + -DBUILD_sharkd=$(usex sharkd)
177 + -DBUILD_sshdump=$(usex sshdump)
178 + -DBUILD_text2pcap=$(usex text2pcap)
179 + -DBUILD_tfshark=$(usex tfshark)
180 + -DBUILD_tshark=$(usex tshark)
181 + -DBUILD_udpdump=$(usex udpdump)
182 + -DBUILD_wireshark=$(usex qt5)
183 + -DCMAKE_INSTALL_DOCDIR="${EROOT}/usr/share/doc/${PF}"
184 + -DDISABLE_WERROR=yes
185 + -DENABLE_BCG729=$(usex bcg729)
186 + -DENABLE_BROTLI=$(usex brotli)
187 + -DENABLE_CAP=$(usex filecaps caps)
188 + -DENABLE_GNUTLS=$(usex ssl)
189 + -DENABLE_ILBC=$(usex ilbc)
190 + -DENABLE_KERBEROS=$(usex kerberos)
191 + -DENABLE_LIBXML2=$(usex libxml2)
192 + -DENABLE_LTO=$(usex lto)
193 + -DENABLE_LUA=$(usex lua)
194 + -DENABLE_LZ4=$(usex lz4)
195 + -DENABLE_MINIZIP=$(usex minizip)
196 + -DENABLE_NETLINK=$(usex netlink)
197 + -DENABLE_NGHTTP2=$(usex http2)
198 + -DENABLE_PCAP=$(usex pcap)
199 + -DENABLE_PLUGINS=$(usex plugins)
200 + -DENABLE_PLUGIN_IFDEMO=$(usex plugin-ifdemo)
201 + -DENABLE_SBC=$(usex sbc)
202 + -DENABLE_SMI=$(usex smi)
203 + -DENABLE_SNAPPY=$(usex snappy)
204 + -DENABLE_SPANDSP=$(usex spandsp)
205 + -DENABLE_ZLIB=$(usex zlib)
206 + -DENABLE_ZSTD=$(usex zstd)
207 + )
208 +
209 + cmake_src_configure
210 +}
211 +
212 +src_test() {
213 + cmake_build test-programs
214 +
215 + myctestargs=( --disable-capture --skip-missing-programs=all --verbose )
216 + cmake_src_test
217 +}
218 +
219 +src_install() {
220 + cmake_src_install
221 +
222 + # FAQ is not required as is installed from help/faq.txt
223 + dodoc AUTHORS ChangeLog NEWS README* doc/randpkt.txt doc/README*
224 +
225 + # install headers
226 + insinto /usr/include/wireshark
227 + doins ws_diag_control.h ws_symbol_export.h \
228 + "${BUILD_DIR}"/config.h "${BUILD_DIR}"/version.h
229 +
230 + local dir dirs=(
231 + epan
232 + epan/crypt
233 + epan/dfilter
234 + epan/dissectors
235 + epan/ftypes
236 + epan/wmem
237 + wiretap
238 + wsutil
239 + )
240 + for dir in "${dirs[@]}"
241 + do
242 + insinto /usr/include/wireshark/${dir}
243 + doins ${dir}/*.h
244 + done
245 +
246 + #with the above this really shouldn't be needed, but things may be looking
247 + # in wiretap/ instead of wireshark/wiretap/
248 + insinto /usr/include/wiretap
249 + doins wiretap/wtap.h
250 +
251 + if use qt5; then
252 + local s
253 + for s in 16 32 48 64 128 256 512 1024; do
254 + insinto /usr/share/icons/hicolor/${s}x${s}/apps
255 + newins image/wsicon${s}.png wireshark.png
256 + done
257 + for s in 16 24 32 48 64 128 256 ; do
258 + insinto /usr/share/icons/hicolor/${s}x${s}/mimetypes
259 + newins image/WiresharkDoc-${s}.png application-vnd.tcpdump.pcap.png
260 + done
261 + fi
262 +
263 + if [[ -d "${D}"/usr/share/appdata ]]; then
264 + rm -r "${D}"/usr/share/appdata || die
265 + fi
266 +}
267 +
268 +pkg_postinst() {
269 + xdg_desktop_database_update
270 + xdg_icon_cache_update
271 + xdg_mimeinfo_database_update
272 +
273 + # Add group for users allowed to sniff.
274 + enewgroup wireshark
275 + chgrp wireshark "${EROOT}"/usr/bin/dumpcap
276 +
277 + if use dumpcap && use pcap; then
278 + fcaps -o 0 -g wireshark -m 4710 -M 0710 \
279 + cap_dac_read_search,cap_net_raw,cap_net_admin \
280 + "${EROOT}"/usr/bin/dumpcap
281 + fi
282 +
283 + ewarn "NOTE: To capture traffic with wireshark as normal user you have to"
284 + ewarn "add yourself to the wireshark group. This security measure ensures"
285 + ewarn "that only trusted users are allowed to sniff your traffic."
286 +}
287 +
288 +pkg_postrm() {
289 + xdg_desktop_database_update
290 + xdg_icon_cache_update
291 + xdg_mimeinfo_database_update
292 +}