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: Tue, 10 Mar 2020 08:23:03
Message-Id: 1583828546.dd462bb7b45a8bf989967919f06806a916356017.jer@gentoo
1 commit: dd462bb7b45a8bf989967919f06806a916356017
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 27 10:51:26 2020 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Tue Mar 10 08:22:26 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd462bb7
7
8 net-analyzer/wireshark: Version 3.2.2
9
10 Package-Manager: Portage-2.3.89, Repoman-2.3.20
11 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
12 Closes: https://bugs.gentoo.org/show_bug.cgi?id=710302
13 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
14
15 net-analyzer/wireshark/Manifest | 1 +
16 net-analyzer/wireshark/wireshark-3.2.2.ebuild | 249 ++++++++++++++++++++++++++
17 2 files changed, 250 insertions(+)
18
19 diff --git a/net-analyzer/wireshark/Manifest b/net-analyzer/wireshark/Manifest
20 index 246b61becd7..17a0caea6d0 100644
21 --- a/net-analyzer/wireshark/Manifest
22 +++ b/net-analyzer/wireshark/Manifest
23 @@ -1 +1,2 @@
24 DIST wireshark-3.2.1.tar.xz 31522124 BLAKE2B 49a83f6c99d54b7a0910f5ace4b46caac680ea73f81d7a3bf7818ccbc6a2fc07cd8f63e1b6ef341cc516220320bb5e035ef6fe82d3d0aba04ec01d6f67f017a1 SHA512 78300f7d597132d54cabe3e51e0f069657d164823852a9f23f1c3c9e6cfdefe5d5ac05c817d06869f4efa4e3cac25ea646cc39d880e5296cf409a8e1a03c2530
25 +DIST wireshark-3.2.2.tar.xz 31548392 BLAKE2B c49764f4654d014ba2934ef76fd37a08ede4e4c7caf11fd40811e45221065f33d1946dd6f8328cf6333c7ec2349550483bcfd3df592a0c8d150f8024ccc7768e SHA512 ab0a312369655f10926dc4245c2e11b988e0a1e49ffefe22d8fdad31e4f310b0b141bac080034511f4ffb1c6cace7e6e595c59a8f65d67909fdcb1c16e87b651
26
27 diff --git a/net-analyzer/wireshark/wireshark-3.2.2.ebuild b/net-analyzer/wireshark/wireshark-3.2.2.ebuild
28 new file mode 100644
29 index 00000000000..a09e19cba2a
30 --- /dev/null
31 +++ b/net-analyzer/wireshark/wireshark-3.2.2.ebuild
32 @@ -0,0 +1,249 @@
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} )
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 kerberos libxml2 lua lz4 maxminddb +mergecap
50 + +minizip +netlink +plugins plugin-ifdemo +pcap +qt5 +randpkt +randpktdump
51 + +reordercap sbc selinux +sharkd smi snappy spandsp sshdump ssl sdjournal
52 + +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 + kerberos? ( virtual/krb5 )
66 + libxml2? ( dev-libs/libxml2 )
67 + lua? ( >=dev-lang/lua-5.1:* )
68 + lz4? ( app-arch/lz4 )
69 + maxminddb? ( dev-libs/libmaxminddb )
70 + minizip? ( sys-libs/zlib[minizip] )
71 + netlink? ( dev-libs/libnl:3 )
72 + pcap? ( net-libs/libpcap )
73 + qt5? (
74 + dev-qt/qtcore:5
75 + dev-qt/qtgui:5
76 + dev-qt/qtmultimedia:5
77 + dev-qt/qtprintsupport:5
78 + dev-qt/qtwidgets:5
79 + x11-misc/xdg-utils
80 + )
81 + sbc? ( media-libs/sbc )
82 + sdjournal? ( sys-apps/systemd )
83 + smi? ( net-libs/libsmi )
84 + snappy? ( app-arch/snappy )
85 + spandsp? ( media-libs/spandsp )
86 + sshdump? ( >=net-libs/libssh-0.6 )
87 + ssl? ( net-libs/gnutls:= )
88 + zlib? ( sys-libs/zlib )
89 + zstd? ( app-arch/zstd )
90 +"
91 +# We need perl for `pod2html`. The rest of the perl stuff is to block older
92 +# and broken installs. #455122
93 +DEPEND="
94 + ${CDEPEND}
95 + ${PYTHON_DEPS}
96 +"
97 +BDEPEND="
98 + dev-lang/perl
99 + sys-devel/bison
100 + sys-devel/flex
101 + virtual/pkgconfig
102 + doc? (
103 + app-doc/doxygen
104 + dev-ruby/asciidoctor
105 + )
106 + qt5? (
107 + dev-qt/linguist-tools:5
108 + )
109 +"
110 +RDEPEND="
111 + ${CDEPEND}
112 + qt5? ( virtual/freedesktop-icon-theme )
113 + selinux? ( sec-policy/selinux-wireshark )
114 +"
115 +REQUIRED_USE="
116 + plugin-ifdemo? ( plugins )
117 +"
118 +PATCHES=(
119 + "${FILESDIR}"/${PN}-2.4-androiddump.patch
120 + "${FILESDIR}"/${PN}-2.6.0-redhat.patch
121 + "${FILESDIR}"/${PN}-2.9.0-tfshark-libm.patch
122 + "${FILESDIR}"/${PN}-99999999-androiddump-wsutil.patch
123 + "${FILESDIR}"/${PN}-99999999-qtsvg.patch
124 + "${FILESDIR}"/${PN}-99999999-ui-needs-wiretap.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 + python_setup
153 +
154 + mycmakeargs+=(
155 + $(use androiddump && use pcap && echo -DEXTCAP_ANDROIDDUMP_LIBPCAP=yes)
156 + $(usex qt5 LRELEASE=$(qt5_get_bindir)/lrelease '')
157 + $(usex qt5 MOC=$(qt5_get_bindir)/moc '')
158 + $(usex qt5 RCC=$(qt5_get_bindir)/rcc '')
159 + $(usex qt5 UIC=$(qt5_get_bindir)/uic '')
160 + -DBUILD_androiddump=$(usex androiddump)
161 + -DBUILD_capinfos=$(usex capinfos)
162 + -DBUILD_captype=$(usex captype)
163 + -DBUILD_ciscodump=$(usex ciscodump)
164 + -DBUILD_dftest=$(usex dftest)
165 + -DBUILD_dpauxmon=$(usex dpauxmon)
166 + -DBUILD_dumpcap=$(usex dumpcap)
167 + -DBUILD_editcap=$(usex editcap)
168 + -DBUILD_mergecap=$(usex mergecap)
169 + -DBUILD_mmdbresolve=$(usex maxminddb)
170 + -DBUILD_randpkt=$(usex randpkt)
171 + -DBUILD_randpktdump=$(usex randpktdump)
172 + -DBUILD_reordercap=$(usex reordercap)
173 + -DBUILD_sdjournal=$(usex sdjournal)
174 + -DBUILD_sharkd=$(usex sharkd)
175 + -DBUILD_sshdump=$(usex sshdump)
176 + -DBUILD_text2pcap=$(usex text2pcap)
177 + -DBUILD_tfshark=$(usex tfshark)
178 + -DBUILD_tshark=$(usex tshark)
179 + -DBUILD_udpdump=$(usex udpdump)
180 + -DBUILD_wireshark=$(usex qt5)
181 + -DCMAKE_INSTALL_DOCDIR="${EROOT}/usr/share/doc/${PF}"
182 + -DDISABLE_WERROR=yes
183 + -DENABLE_BCG729=$(usex bcg729)
184 + -DENABLE_BROTLI=$(usex brotli)
185 + -DENABLE_CAP=$(usex filecaps caps)
186 + -DENABLE_GNUTLS=$(usex ssl)
187 + -DENABLE_KERBEROS=$(usex kerberos)
188 + -DENABLE_LIBXML2=$(usex libxml2)
189 + -DENABLE_LUA=$(usex lua)
190 + -DENABLE_LZ4=$(usex lz4)
191 + -DENABLE_MINIZIP=$(usex minizip)
192 + -DENABLE_NETLINK=$(usex netlink)
193 + -DENABLE_NGHTTP2=$(usex http2)
194 + -DENABLE_PCAP=$(usex pcap)
195 + -DENABLE_PLUGINS=$(usex plugins)
196 + -DENABLE_PLUGIN_IFDEMO=$(usex plugin-ifdemo)
197 + -DENABLE_SBC=$(usex sbc)
198 + -DENABLE_SMI=$(usex smi)
199 + -DENABLE_SNAPPY=$(usex snappy)
200 + -DENABLE_SPANDSP=$(usex spandsp)
201 + -DENABLE_ZLIB=$(usex zlib)
202 + -DENABLE_ZSTD=$(usex zstd)
203 + )
204 +
205 + cmake_src_configure
206 +}
207 +
208 +src_test() {
209 + cmake_src_test
210 +}
211 +
212 +src_install() {
213 + cmake_src_install
214 +
215 + # FAQ is not required as is installed from help/faq.txt
216 + dodoc AUTHORS ChangeLog NEWS README* doc/randpkt.txt doc/README*
217 +
218 + # install headers
219 + insinto /usr/include/wireshark
220 + doins ws_diag_control.h ws_symbol_export.h \
221 + "${BUILD_DIR}"/config.h "${BUILD_DIR}"/version.h
222 +
223 + local dir dirs=(
224 + epan
225 + epan/crypt
226 + epan/dfilter
227 + epan/dissectors
228 + epan/ftypes
229 + epan/wmem
230 + wiretap
231 + wsutil
232 + )
233 + for dir in "${dirs[@]}"
234 + do
235 + insinto /usr/include/wireshark/${dir}
236 + doins ${dir}/*.h
237 + done
238 +
239 + #with the above this really shouldn't be needed, but things may be looking
240 + # in wiretap/ instead of wireshark/wiretap/
241 + insinto /usr/include/wiretap
242 + doins wiretap/wtap.h
243 +
244 + if use qt5; then
245 + local s
246 + for s in 16 32 48 64 128 256 512 1024; do
247 + insinto /usr/share/icons/hicolor/${s}x${s}/apps
248 + newins image/wsicon${s}.png wireshark.png
249 + done
250 + for s in 16 24 32 48 64 128 256 ; do
251 + insinto /usr/share/icons/hicolor/${s}x${s}/mimetypes
252 + newins image/WiresharkDoc-${s}.png application-vnd.tcpdump.pcap.png
253 + done
254 + fi
255 +}
256 +
257 +pkg_postinst() {
258 + xdg_desktop_database_update
259 + xdg_icon_cache_update
260 + xdg_mimeinfo_database_update
261 +
262 + # Add group for users allowed to sniff.
263 + enewgroup wireshark
264 + chgrp wireshark "${EROOT}"/usr/bin/dumpcap
265 +
266 + if use dumpcap && use pcap; then
267 + fcaps -o 0 -g wireshark -m 4710 -M 0710 \
268 + cap_dac_read_search,cap_net_raw,cap_net_admin \
269 + "${EROOT}"/usr/bin/dumpcap
270 + fi
271 +
272 + ewarn "NOTE: To capture traffic with wireshark as normal user you have to"
273 + ewarn "add yourself to the wireshark group. This security measure ensures"
274 + ewarn "that only trusted users are allowed to sniff your traffic."
275 +}
276 +
277 +pkg_postrm() {
278 + xdg_desktop_database_update
279 + xdg_icon_cache_update
280 + xdg_mimeinfo_database_update
281 +}