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, 24 Sep 2019 06:37:58
Message-Id: 1569307071.982a8a160c320717c41f7be65bae38529980591a.jer@gentoo
1 commit: 982a8a160c320717c41f7be65bae38529980591a
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 24 06:08:13 2019 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 24 06:37:51 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=982a8a16
7
8 net-analyzer/wireshark: Version 3.0.5
9
10 Package-Manager: Portage-2.3.76, Repoman-2.3.17
11 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
12
13 net-analyzer/wireshark/Manifest | 1 +
14 net-analyzer/wireshark/wireshark-3.0.5.ebuild | 245 ++++++++++++++++++++++++++
15 2 files changed, 246 insertions(+)
16
17 diff --git a/net-analyzer/wireshark/Manifest b/net-analyzer/wireshark/Manifest
18 index e1e08d420c3..05354b0e8f7 100644
19 --- a/net-analyzer/wireshark/Manifest
20 +++ b/net-analyzer/wireshark/Manifest
21 @@ -1,3 +1,4 @@
22 DIST wireshark-3.0.3.tar.xz 30923980 BLAKE2B 05f29f55061d0bed9be284e145d260fca5e0051893c044b1389e1389f2c9865c7ec4c548ea040c6bd853d4fe1c482c5c86fdb23aa79d588ad34b91ed1901bcf0 SHA512 78d4aa68e47a72b641cb2a694028de743c195a41c42fb58f510402581a213c1239f63cad1f9163b13d64608fcedf64c7367a4888021b80613cb7e9a6ddbf8750
23 DIST wireshark-3.0.4.tar.xz 30938336 BLAKE2B ab97cbfd9999a4e326787639debb67f0d0b8509572fb85297385a461dbaf081691d59fc2cb16b4a69baee8ca0ef873503f85f0238bf0fbedfcb3e0755749d3df SHA512 eb9ddc8ba3d78bc6c1f2e1d277e81c00939638793ed21b98999310231d13a0fc8a6149dc5e78f58026778b8137e954ad7f67069f8cb80465078ca2d9795b25d1
24 +DIST wireshark-3.0.5.tar.xz 30929864 BLAKE2B 0e3d8eb37e6d1d1976e8084176fc9c75dab43a74f65f8247c9b18b85cdd82d207791b839743a59c4ad299d63f5f41a94f931901e9245dbfb3d4a239046c874c4 SHA512 237ee66cfe0a7073f0e3623f327f7eb7204d1cd274e006dcc6890972d4135c2baa6c9d2426ea03ee64b7fc6dc45cb4cfe823e5cfc6f90e252d35b3ad7750884e
25 DIST wireshark-3.1.0.tar.xz 31052040 BLAKE2B 96ede4dcbb3f5c4ecf1d935737bb26dcaecabe24e0767b34914febd31a1402d2428580e8b26c145bc98a71ef01fddcfca6e4f5709d9a8d90634ea6ed4789bb20 SHA512 df7ca131d0e0f00ec00ef0934cf070c7f6d06e55830777e5ab62f4b1c5588b57bfb45e69009f8ab0c3f405f9dd730bf35671d09f46a9a846a09154ec47caffc9
26
27 diff --git a/net-analyzer/wireshark/wireshark-3.0.5.ebuild b/net-analyzer/wireshark/wireshark-3.0.5.ebuild
28 new file mode 100644
29 index 00000000000..e33cf0877e6
30 --- /dev/null
31 +++ b/net-analyzer/wireshark/wireshark-3.0.5.ebuild
32 @@ -0,0 +1,245 @@
33 +# Copyright 1999-2019 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +PYTHON_COMPAT=( python3_{5,6,7} )
38 +inherit fcaps flag-o-matic multilib python-r1 qmake-utils user xdg-utils cmake-utils
39 +
40 +DESCRIPTION="A network protocol analyzer formerly known as ethereal"
41 +HOMEPAGE="https://www.wireshark.org/"
42 +SRC_URI="${HOMEPAGE}download/src/all-versions/${P/_/}.tar.xz"
43 +
44 +LICENSE="GPL-2"
45 +SLOT="0/${PV}"
46 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~x86"
47 +IUSE="
48 + adns androiddump bcg729 +capinfos +captype ciscodump +dftest doc dpauxmon
49 + +dumpcap +editcap kerberos libxml2 lua lz4 maxminddb +mergecap +netlink
50 + nghttp2 +pcap +qt5 +randpkt +randpktdump +reordercap sbc selinux +sharkd
51 + smi snappy spandsp sshdump ssl sdjournal +text2pcap tfshark +tshark
52 + +udpdump zlib
53 +"
54 +
55 +S=${WORKDIR}/${P/_/}
56 +
57 +CDEPEND="
58 + >=dev-libs/glib-2.32:2
59 + dev-libs/libgcrypt:0
60 + adns? ( >=net-dns/c-ares-1.5 )
61 + bcg729? ( media-libs/bcg729 )
62 + ciscodump? ( >=net-libs/libssh-0.6 )
63 + filecaps? ( sys-libs/libcap )
64 + kerberos? ( virtual/krb5 )
65 + libxml2? ( dev-libs/libxml2 )
66 + lua? ( >=dev-lang/lua-5.1:* )
67 + lz4? ( app-arch/lz4 )
68 + maxminddb? ( dev-libs/libmaxminddb )
69 + netlink? ( dev-libs/libnl:3 )
70 + nghttp2? ( net-libs/nghttp2 )
71 + pcap? ( net-libs/libpcap )
72 + qt5? (
73 + dev-qt/qtcore:5
74 + dev-qt/qtgui:5
75 + dev-qt/qtmultimedia:5
76 + dev-qt/qtprintsupport:5
77 + dev-qt/qtwidgets:5
78 + x11-misc/xdg-utils
79 + )
80 + sbc? ( media-libs/sbc )
81 + sdjournal? ( sys-apps/systemd )
82 + smi? ( net-libs/libsmi )
83 + snappy? ( app-arch/snappy )
84 + spandsp? ( media-libs/spandsp )
85 + sshdump? ( >=net-libs/libssh-0.6 )
86 + ssl? ( net-libs/gnutls:= )
87 + zlib? ( sys-libs/zlib )
88 + ${PYTHON_DEPS}
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 +"
95 +BDEPEND="
96 + !<perl-core/Pod-Simple-3.170
97 + !<virtual/perl-Pod-Simple-3.170
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 + ${PYTHON_REQUIRED_USE}
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 'python3*'
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_CAP=$(usex filecaps caps)
185 + -DENABLE_CARES=$(usex adns)
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_NETLINK=$(usex netlink)
192 + -DENABLE_NGHTTP2=$(usex nghttp2)
193 + -DENABLE_PCAP=$(usex pcap)
194 + -DENABLE_SBC=$(usex sbc)
195 + -DENABLE_SMI=$(usex smi)
196 + -DENABLE_SNAPPY=$(usex snappy)
197 + -DENABLE_SPANDSP=$(usex spandsp)
198 + -DENABLE_ZLIB=$(usex zlib)
199 + )
200 +
201 + cmake-utils_src_configure
202 +}
203 +
204 +src_test() {
205 + cmake-utils_src_test
206 +}
207 +
208 +src_install() {
209 + cmake-utils_src_install
210 +
211 + # FAQ is not required as is installed from help/faq.txt
212 + dodoc AUTHORS ChangeLog NEWS README* doc/randpkt.txt doc/README*
213 +
214 + # install headers
215 + insinto /usr/include/wireshark
216 + doins ws_diag_control.h ws_symbol_export.h \
217 + "${BUILD_DIR}"/config.h "${BUILD_DIR}"/version.h
218 +
219 + local dir dirs=(
220 + epan
221 + epan/crypt
222 + epan/dfilter
223 + epan/dissectors
224 + epan/ftypes
225 + epan/wmem
226 + wiretap
227 + wsutil
228 + )
229 + for dir in "${dirs[@]}"
230 + do
231 + insinto /usr/include/wireshark/${dir}
232 + doins ${dir}/*.h
233 + done
234 +
235 + #with the above this really shouldn't be needed, but things may be looking
236 + # in wiretap/ instead of wireshark/wiretap/
237 + insinto /usr/include/wiretap
238 + doins wiretap/wtap.h
239 +
240 + if use qt5; then
241 + local s
242 + for s in 16 32 48 64 128 256 512 1024; do
243 + insinto /usr/share/icons/hicolor/${s}x${s}/apps
244 + newins image/wsicon${s}.png wireshark.png
245 + done
246 + for s in 16 24 32 48 64 128 256 ; do
247 + insinto /usr/share/icons/hicolor/${s}x${s}/mimetypes
248 + newins image/WiresharkDoc-${s}.png application-vnd.tcpdump.pcap.png
249 + done
250 + fi
251 +}
252 +
253 +pkg_postinst() {
254 + xdg_desktop_database_update
255 + xdg_icon_cache_update
256 + xdg_mimeinfo_database_update
257 +
258 + # Add group for users allowed to sniff.
259 + enewgroup wireshark
260 + chgrp wireshark "${EROOT}"/usr/bin/dumpcap
261 +
262 + if use dumpcap && use pcap; then
263 + fcaps -o 0 -g wireshark -m 4710 -M 0710 \
264 + cap_dac_read_search,cap_net_raw,cap_net_admin \
265 + "${EROOT}"/usr/bin/dumpcap
266 + fi
267 +
268 + ewarn "NOTE: To capture traffic with wireshark as normal user you have to"
269 + ewarn "add yourself to the wireshark group. This security measure ensures"
270 + ewarn "that only trusted users are allowed to sniff your traffic."
271 +}
272 +
273 +pkg_postrm() {
274 + xdg_desktop_database_update
275 + xdg_icon_cache_update
276 + xdg_mimeinfo_database_update
277 +}