Gentoo Archives: gentoo-commits

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