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, 12 Sep 2019 05:40:30
Message-Id: 1568266807.8f6c4cdbba94ddb6903ea0938a5a9acb2acde651.jer@gentoo
1 commit: 8f6c4cdbba94ddb6903ea0938a5a9acb2acde651
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 12 05:39:45 2019 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 12 05:40:07 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f6c4cdb
7
8 net-analyzer/wireshark: Version 3.0.4
9
10 Package-Manager: Portage-2.3.75, Repoman-2.3.17
11 Bug: https://bugs.gentoo.org/694134
12 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
13
14 net-analyzer/wireshark/Manifest | 1 +
15 net-analyzer/wireshark/wireshark-3.0.4.ebuild | 245 ++++++++++++++++++++++++++
16 2 files changed, 246 insertions(+)
17
18 diff --git a/net-analyzer/wireshark/Manifest b/net-analyzer/wireshark/Manifest
19 index fd1c3a07844..604f21503cb 100644
20 --- a/net-analyzer/wireshark/Manifest
21 +++ b/net-analyzer/wireshark/Manifest
22 @@ -1,3 +1,4 @@
23 DIST wireshark-3.0.1.tar.xz 30903792 BLAKE2B 583052691cc20e97511f2407a64fbdffae91c09275429c9c9a60dbafcfc91ce79270f09710e8fba7db053565f1afc9786caf22ef21e700dd0f97c2f38b139e31 SHA512 59c3f36e4e7a1a7ea8f926dbf8ca495f83346396e1df5edf6a1bb34823c84308f52a1b6d46be9675d3af9ce8718da4a574f63a4fb210d8fc52131f4534d8670d
24 DIST wireshark-3.0.3.tar.xz 30923980 BLAKE2B 05f29f55061d0bed9be284e145d260fca5e0051893c044b1389e1389f2c9865c7ec4c548ea040c6bd853d4fe1c482c5c86fdb23aa79d588ad34b91ed1901bcf0 SHA512 78d4aa68e47a72b641cb2a694028de743c195a41c42fb58f510402581a213c1239f63cad1f9163b13d64608fcedf64c7367a4888021b80613cb7e9a6ddbf8750
25 +DIST wireshark-3.0.4.tar.xz 30938336 BLAKE2B ab97cbfd9999a4e326787639debb67f0d0b8509572fb85297385a461dbaf081691d59fc2cb16b4a69baee8ca0ef873503f85f0238bf0fbedfcb3e0755749d3df SHA512 eb9ddc8ba3d78bc6c1f2e1d277e81c00939638793ed21b98999310231d13a0fc8a6149dc5e78f58026778b8137e954ad7f67069f8cb80465078ca2d9795b25d1
26 DIST wireshark-3.1.0.tar.xz 31052040 BLAKE2B 96ede4dcbb3f5c4ecf1d935737bb26dcaecabe24e0767b34914febd31a1402d2428580e8b26c145bc98a71ef01fddcfca6e4f5709d9a8d90634ea6ed4789bb20 SHA512 df7ca131d0e0f00ec00ef0934cf070c7f6d06e55830777e5ab62f4b1c5588b57bfb45e69009f8ab0c3f405f9dd730bf35671d09f46a9a846a09154ec47caffc9
27
28 diff --git a/net-analyzer/wireshark/wireshark-3.0.4.ebuild b/net-analyzer/wireshark/wireshark-3.0.4.ebuild
29 new file mode 100644
30 index 00000000000..924c16aa948
31 --- /dev/null
32 +++ b/net-analyzer/wireshark/wireshark-3.0.4.ebuild
33 @@ -0,0 +1,245 @@
34 +# Copyright 1999-2019 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +PYTHON_COMPAT=( python3_{5,6,7} )
39 +inherit fcaps flag-o-matic multilib python-r1 qmake-utils user xdg-utils cmake-utils
40 +
41 +DESCRIPTION="A network protocol analyzer formerly known as ethereal"
42 +HOMEPAGE="https://www.wireshark.org/"
43 +SRC_URI="${HOMEPAGE}download/src/all-versions/${P/_/}.tar.xz"
44 +
45 +LICENSE="GPL-2"
46 +SLOT="0/${PV}"
47 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~x86"
48 +IUSE="
49 + adns androiddump bcg729 +capinfos +captype ciscodump +dftest doc dpauxmon
50 + +dumpcap +editcap kerberos libxml2 lua lz4 maxminddb +mergecap +netlink
51 + nghttp2 +pcap +qt5 +randpkt +randpktdump +reordercap sbc selinux +sharkd
52 + smi snappy spandsp sshdump ssl sdjournal +text2pcap tfshark +tshark
53 + +udpdump zlib
54 +"
55 +
56 +S=${WORKDIR}/${P/_/}
57 +
58 +CDEPEND="
59 + >=dev-libs/glib-2.32:2
60 + dev-libs/libgcrypt:0
61 + adns? ( >=net-dns/c-ares-1.5 )
62 + bcg729? ( media-libs/bcg729 )
63 + ciscodump? ( >=net-libs/libssh-0.6 )
64 + filecaps? ( sys-libs/libcap )
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 + netlink? ( dev-libs/libnl:3 )
71 + nghttp2? ( net-libs/nghttp2 )
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 +"
90 +# We need perl for `pod2html`. The rest of the perl stuff is to block older
91 +# and broken installs. #455122
92 +DEPEND="
93 + ${CDEPEND}
94 + ${PYTHON_DEPS}
95 +"
96 +BDEPEND="
97 + !<perl-core/Pod-Simple-3.170
98 + !<virtual/perl-Pod-Simple-3.170
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 +"
111 +RDEPEND="
112 + ${CDEPEND}
113 + qt5? ( virtual/freedesktop-icon-theme )
114 + selinux? ( sec-policy/selinux-wireshark )
115 +"
116 +REQUIRED_USE="
117 + ${PYTHON_REQUIRED_USE}
118 +"
119 +PATCHES=(
120 + "${FILESDIR}"/${PN}-2.4-androiddump.patch
121 + "${FILESDIR}"/${PN}-2.6.0-redhat.patch
122 + "${FILESDIR}"/${PN}-2.9.0-tfshark-libm.patch
123 + "${FILESDIR}"/${PN}-99999999-androiddump-wsutil.patch
124 + "${FILESDIR}"/${PN}-99999999-qtsvg.patch
125 + "${FILESDIR}"/${PN}-99999999-ui-needs-wiretap.patch
126 +)
127 +
128 +pkg_setup() {
129 + enewgroup wireshark
130 +}
131 +
132 +src_configure() {
133 + local mycmakeargs
134 +
135 + # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass
136 + # --with-ssl to ./configure. (Mimics code from acinclude.m4).
137 + if use kerberos; then
138 + case $(krb5-config --libs) in
139 + *-lcrypto*)
140 + ewarn "Kerberos was built with ssl support: linkage with openssl is enabled."
141 + ewarn "Note there are annoying license incompatibilities between the OpenSSL"
142 + ewarn "license and the GPL, so do your check before distributing such package."
143 + mycmakeargs+=( -DENABLE_GNUTLS=$(usex ssl) )
144 + ;;
145 + esac
146 + fi
147 +
148 + if use qt5; then
149 + export QT_MIN_VERSION=5.3.0
150 + append-cxxflags -fPIC -DPIC
151 + fi
152 +
153 + python_setup 'python3*'
154 +
155 + mycmakeargs+=(
156 + $(use androiddump && use pcap && echo -DEXTCAP_ANDROIDDUMP_LIBPCAP=yes)
157 + $(usex qt5 LRELEASE=$(qt5_get_bindir)/lrelease '')
158 + $(usex qt5 MOC=$(qt5_get_bindir)/moc '')
159 + $(usex qt5 RCC=$(qt5_get_bindir)/rcc '')
160 + $(usex qt5 UIC=$(qt5_get_bindir)/uic '')
161 + -DBUILD_androiddump=$(usex androiddump)
162 + -DBUILD_capinfos=$(usex capinfos)
163 + -DBUILD_captype=$(usex captype)
164 + -DBUILD_ciscodump=$(usex ciscodump)
165 + -DBUILD_dftest=$(usex dftest)
166 + -DBUILD_dpauxmon=$(usex dpauxmon)
167 + -DBUILD_dumpcap=$(usex dumpcap)
168 + -DBUILD_editcap=$(usex editcap)
169 + -DBUILD_mergecap=$(usex mergecap)
170 + -DBUILD_mmdbresolve=$(usex maxminddb)
171 + -DBUILD_randpkt=$(usex randpkt)
172 + -DBUILD_randpktdump=$(usex randpktdump)
173 + -DBUILD_reordercap=$(usex reordercap)
174 + -DBUILD_sdjournal=$(usex sdjournal)
175 + -DBUILD_sharkd=$(usex sharkd)
176 + -DBUILD_sshdump=$(usex sshdump)
177 + -DBUILD_text2pcap=$(usex text2pcap)
178 + -DBUILD_tfshark=$(usex tfshark)
179 + -DBUILD_tshark=$(usex tshark)
180 + -DBUILD_udpdump=$(usex udpdump)
181 + -DBUILD_wireshark=$(usex qt5)
182 + -DCMAKE_INSTALL_DOCDIR="${EROOT%/}/usr/share/doc/${PF}"
183 + -DDISABLE_WERROR=yes
184 + -DENABLE_BCG729=$(usex bcg729)
185 + -DENABLE_CAP=$(usex filecaps caps)
186 + -DENABLE_CARES=$(usex adns)
187 + -DENABLE_GNUTLS=$(usex ssl)
188 + -DENABLE_KERBEROS=$(usex kerberos)
189 + -DENABLE_LIBXML2=$(usex libxml2)
190 + -DENABLE_LUA=$(usex lua)
191 + -DENABLE_LZ4=$(usex lz4)
192 + -DENABLE_NETLINK=$(usex netlink)
193 + -DENABLE_NGHTTP2=$(usex nghttp2)
194 + -DENABLE_PCAP=$(usex pcap)
195 + -DENABLE_SBC=$(usex sbc)
196 + -DENABLE_SMI=$(usex smi)
197 + -DENABLE_SNAPPY=$(usex snappy)
198 + -DENABLE_SPANDSP=$(usex spandsp)
199 + -DENABLE_ZLIB=$(usex zlib)
200 + )
201 +
202 + cmake-utils_src_configure
203 +}
204 +
205 +src_test() {
206 + cmake-utils_src_test
207 +}
208 +
209 +src_install() {
210 + cmake-utils_src_install
211 +
212 + # FAQ is not required as is installed from help/faq.txt
213 + dodoc AUTHORS ChangeLog NEWS README* doc/randpkt.txt doc/README*
214 +
215 + # install headers
216 + insinto /usr/include/wireshark
217 + doins ws_diag_control.h ws_symbol_export.h \
218 + "${BUILD_DIR}"/config.h "${BUILD_DIR}"/version.h
219 +
220 + local dir dirs=(
221 + epan
222 + epan/crypt
223 + epan/dfilter
224 + epan/dissectors
225 + epan/ftypes
226 + epan/wmem
227 + wiretap
228 + wsutil
229 + )
230 + for dir in "${dirs[@]}"
231 + do
232 + insinto /usr/include/wireshark/${dir}
233 + doins ${dir}/*.h
234 + done
235 +
236 + #with the above this really shouldn't be needed, but things may be looking
237 + # in wiretap/ instead of wireshark/wiretap/
238 + insinto /usr/include/wiretap
239 + doins wiretap/wtap.h
240 +
241 + if use qt5; then
242 + local s
243 + for s in 16 32 48 64 128 256 512 1024; do
244 + insinto /usr/share/icons/hicolor/${s}x${s}/apps
245 + newins image/wsicon${s}.png wireshark.png
246 + done
247 + for s in 16 24 32 48 64 128 256 ; do
248 + insinto /usr/share/icons/hicolor/${s}x${s}/mimetypes
249 + newins image/WiresharkDoc-${s}.png application-vnd.tcpdump.pcap.png
250 + done
251 + fi
252 +}
253 +
254 +pkg_postinst() {
255 + xdg_desktop_database_update
256 + xdg_icon_cache_update
257 + xdg_mimeinfo_database_update
258 +
259 + # Add group for users allowed to sniff.
260 + enewgroup wireshark
261 + chgrp wireshark "${EROOT}"/usr/bin/dumpcap
262 +
263 + if use dumpcap && use pcap; then
264 + fcaps -o 0 -g wireshark -m 4710 -M 0710 \
265 + cap_dac_read_search,cap_net_raw,cap_net_admin \
266 + "${EROOT}"/usr/bin/dumpcap
267 + fi
268 +
269 + ewarn "NOTE: To capture traffic with wireshark as normal user you have to"
270 + ewarn "add yourself to the wireshark group. This security measure ensures"
271 + ewarn "that only trusted users are allowed to sniff your traffic."
272 +}
273 +
274 +pkg_postrm() {
275 + xdg_desktop_database_update
276 + xdg_icon_cache_update
277 + xdg_mimeinfo_database_update
278 +}