Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/wireshark/
Date: Thu, 29 Oct 2020 22:09:46
Message-Id: 1604009353.7e870cc59a011d588b0f932c565bab52021a0b59.soap@gentoo
1 commit: 7e870cc59a011d588b0f932c565bab52021a0b59
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Thu Oct 29 22:09:13 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 29 22:09:13 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e870cc5
7
8 net-analyzer/wireshark: Version bump to 3.4.0
9
10 Bug: https://bugs.gentoo.org/750692
11 Package-Manager: Portage-3.0.8, Repoman-3.0.2
12 Signed-off-by: David Seifert <soap <AT> gentoo.org>
13
14 net-analyzer/wireshark/Manifest | 1 +
15 net-analyzer/wireshark/wireshark-3.4.0.ebuild | 259 ++++++++++++++++++++++++++
16 2 files changed, 260 insertions(+)
17
18 diff --git a/net-analyzer/wireshark/Manifest b/net-analyzer/wireshark/Manifest
19 index 2febba0549d..97a0816e921 100644
20 --- a/net-analyzer/wireshark/Manifest
21 +++ b/net-analyzer/wireshark/Manifest
22 @@ -1,2 +1,3 @@
23 DIST wireshark-3.2.7.tar.xz 31659996 BLAKE2B 69ed148e5cc6403b3948f4851164033163d0817626feaeaa0abf09b749c9e37c036786ed91f04add1ceeb80b69b7d05316b648d339c8c86f0818e0ee0afdf4ad SHA512 c17913fe6c193ccc6b0dbf86932d625a1f3b670aef805296e5db2639118218e06d513910ad50ab3926204f94a0010425b0d498176f987516d64fdd6a52d2517b
24 +DIST wireshark-3.4.0.tar.xz 32502760 BLAKE2B 5d8106f36cc3a1425fd472f7ba645b2a07bfb93c96178a98f90676f39cad38089b625d7d6725ecfaf67bfc78aba3476567b9bf390d6f0dd838537eb81bc4aaa7 SHA512 02070db23c64e1efe42b83cdcd7b52fb9b247e653da0aa12dc21a4283272fea0a135f4b0c5641197840bef88e52785d64a860c9fcfe1bcbaceb016c5258c9649
25 DIST wireshark-3.4.0rc1.tar.xz 32500352 BLAKE2B fdcd29ef8a6bb8cb03941600fa6d08b18c68ba03815054e5a71d15557b4e067a383160a08d02c8e31974db31ec0d532936710fae202f2197aa1e540cb6987714 SHA512 861bf645e43df6238869da1ed7d152bb43923ab848b3f4241b487c76895fb95e6c47c03de0547f9330b302d04fd605c555b33d20826298289068ad652a7e5f8a
26
27 diff --git a/net-analyzer/wireshark/wireshark-3.4.0.ebuild b/net-analyzer/wireshark/wireshark-3.4.0.ebuild
28 new file mode 100644
29 index 00000000000..341e4cf131a
30 --- /dev/null
31 +++ b/net-analyzer/wireshark/wireshark-3.4.0.ebuild
32 @@ -0,0 +1,259 @@
33 +# Copyright 1999-2020 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +PYTHON_COMPAT=( python3_{6..9} )
39 +
40 +inherit fcaps flag-o-matic multilib python-any-r1 qmake-utils xdg-utils cmake
41 +
42 +DESCRIPTION="A network protocol analyzer formerly known as ethereal"
43 +HOMEPAGE="https://www.wireshark.org/"
44 +SRC_URI="https://www.wireshark.org/download/src/all-versions/${P/_/}.tar.xz"
45 +LICENSE="GPL-2"
46 +
47 +SLOT="0/${PV}"
48 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~x86"
49 +IUSE="
50 + androiddump bcg729 brotli +capinfos +captype ciscodump +dftest doc dpauxmon
51 + +dumpcap +editcap http2 ilbc kerberos libxml2 lto lua lz4 maxminddb
52 + +mergecap +minizip +netlink opus +plugins plugin-ifdemo +pcap +qt5 +randpkt
53 + +randpktdump +reordercap sbc selinux +sharkd smi snappy spandsp sshdump ssl
54 + sdjournal test +text2pcap tfshark +tshark +udpdump zlib +zstd
55 +"
56 +S=${WORKDIR}/${P/_/}
57 +
58 +CDEPEND="
59 + acct-group/pcap
60 + >=dev-libs/glib-2.32:2
61 + >=net-dns/c-ares-1.5
62 + dev-libs/libgcrypt:0
63 + bcg729? ( media-libs/bcg729 )
64 + brotli? ( app-arch/brotli )
65 + ciscodump? ( >=net-libs/libssh-0.6 )
66 + filecaps? ( sys-libs/libcap )
67 + http2? ( net-libs/nghttp2 )
68 + ilbc? ( media-libs/libilbc )
69 + kerberos? ( virtual/krb5 )
70 + libxml2? ( dev-libs/libxml2 )
71 + lua? ( >=dev-lang/lua-5.1:* )
72 + lz4? ( app-arch/lz4 )
73 + maxminddb? ( dev-libs/libmaxminddb )
74 + minizip? ( sys-libs/zlib[minizip] )
75 + netlink? ( dev-libs/libnl:3 )
76 + opus? ( media-libs/opus )
77 + pcap? ( net-libs/libpcap )
78 + qt5? (
79 + dev-qt/qtcore:5
80 + dev-qt/qtgui:5
81 + dev-qt/qtmultimedia:5
82 + dev-qt/qtprintsupport:5
83 + dev-qt/qtwidgets:5
84 + x11-misc/xdg-utils
85 + )
86 + sbc? ( media-libs/sbc )
87 + sdjournal? ( sys-apps/systemd )
88 + smi? ( net-libs/libsmi )
89 + snappy? ( app-arch/snappy )
90 + spandsp? ( media-libs/spandsp )
91 + sshdump? ( >=net-libs/libssh-0.6 )
92 + ssl? ( net-libs/gnutls:= )
93 + zlib? ( sys-libs/zlib )
94 + zstd? ( app-arch/zstd )
95 +"
96 +# We need perl for `pod2html`. The rest of the perl stuff is to block older
97 +# and broken installs. #455122
98 +DEPEND="
99 + ${CDEPEND}
100 + ${PYTHON_DEPS}
101 +"
102 +BDEPEND="
103 + dev-lang/perl
104 + sys-devel/bison
105 + sys-devel/flex
106 + virtual/pkgconfig
107 + doc? (
108 + app-doc/doxygen
109 + dev-ruby/asciidoctor
110 + )
111 + qt5? (
112 + dev-qt/linguist-tools:5
113 + )
114 + test? (
115 + dev-python/pytest
116 + dev-python/pytest-xdist
117 + )
118 +"
119 +RDEPEND="
120 + ${CDEPEND}
121 + qt5? ( virtual/freedesktop-icon-theme )
122 + selinux? ( sec-policy/selinux-wireshark )
123 +"
124 +REQUIRED_USE="
125 + plugin-ifdemo? ( plugins )
126 +"
127 +RESTRICT="test"
128 +PATCHES=(
129 + "${FILESDIR}"/${PN}-2.6.0-redhat.patch
130 + "${FILESDIR}"/${PN}-99999999-ui-needs-wiretap.patch
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 + -DDISABLE_WERROR=yes
184 + -DENABLE_BCG729=$(usex bcg729)
185 + -DENABLE_BROTLI=$(usex brotli)
186 + -DENABLE_CAP=$(usex filecaps caps)
187 + -DENABLE_GNUTLS=$(usex ssl)
188 + -DENABLE_ILBC=$(usex ilbc)
189 + -DENABLE_KERBEROS=$(usex kerberos)
190 + -DENABLE_LIBXML2=$(usex libxml2)
191 + -DENABLE_LTO=$(usex lto)
192 + -DENABLE_LUA=$(usex lua)
193 + -DENABLE_LZ4=$(usex lz4)
194 + -DENABLE_MINIZIP=$(usex minizip)
195 + -DENABLE_NETLINK=$(usex netlink)
196 + -DENABLE_NGHTTP2=$(usex http2)
197 + -DENABLE_OPUS=$(usex opus)
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 + chgrp pcap "${EROOT}"/usr/bin/dumpcap
275 +
276 + if use dumpcap && use pcap; then
277 + fcaps -o 0 -g pcap -m 4710 -M 0710 \
278 + cap_dac_read_search,cap_net_raw,cap_net_admin \
279 + "${EROOT}"/usr/bin/dumpcap
280 + fi
281 +
282 + ewarn "NOTE: To capture traffic with wireshark as normal user you have to"
283 + ewarn "add yourself to the pcap group. This security measure ensures"
284 + ewarn "that only trusted users are allowed to sniff your traffic."
285 +}
286 +
287 +pkg_postrm() {
288 + xdg_desktop_database_update
289 + xdg_icon_cache_update
290 + xdg_mimeinfo_database_update
291 +}