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, 28 Feb 2019 21:13:00
Message-Id: 1551388370.de767d05f9bc4c85be170272b9e62e700b348a17.jer@gentoo
1 commit: de767d05f9bc4c85be170272b9e62e700b348a17
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 28 21:11:21 2019 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 28 21:12:50 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de767d05
7
8 net-analyzer/wireshark: Version 3.0.0
9
10 Package-Manager: Portage-2.3.62, Repoman-2.3.12
11 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
12
13 net-analyzer/wireshark/Manifest | 1 +
14 net-analyzer/wireshark/wireshark-3.0.0.ebuild | 248 ++++++++++++++++++++++++++
15 2 files changed, 249 insertions(+)
16
17 diff --git a/net-analyzer/wireshark/Manifest b/net-analyzer/wireshark/Manifest
18 index 6eeba91487c..4a1f85112ed 100644
19 --- a/net-analyzer/wireshark/Manifest
20 +++ b/net-analyzer/wireshark/Manifest
21 @@ -2,5 +2,6 @@ DIST wireshark-2.4.5.tar.xz 28836740 BLAKE2B 797540daca259a2d5d7dc6e637f2b504b6d
22 DIST wireshark-2.6.3.tar.xz 28384004 BLAKE2B f275c73173fbaf3f819c58f28859362e9c53ae50cf2649ac42c8d172362241eb00d7f43d0aead184ec67cb8da34d405124be10c5bf31226c2cb4800b8a01955b SHA512 87e5335840baa401a1064ee83e3f0ee859c059dd37a09f63f19eb5d91ad273e84f1c0e7a8fdd63fe8a7076abff5e79593827544c5796d921cf7dc7682c7c3f80
23 DIST wireshark-2.6.6.tar.xz 28407404 BLAKE2B 5135789d345b675814a6394d5ba1469585b9eab917885730125b8a007aecd9cb48a510fc9e7479148cadf625807bac9017b854797e4bb2e562d7dc7f76140826 SHA512 b781c3b34dc76a3d8e60dc2b9b4e46a11994440b8df7b56134521ea9a77b27b0719a600db60d7f3d65f15972a5db2a7e85a8bf60d7217fce498fb5668de8fe56
24 DIST wireshark-2.6.7.tar.xz 28420060 BLAKE2B fda1fb2b9a8968916dd24c59c193854ab56dc13d5a69d2f589ae89b257f92794d092a3da75c2e20b1c83c902966db15527346dc4072a38d16a21ed095cde364e SHA512 bd0f87debd8bd8947f386aaec9fc843148e3cdfbffc28ba499526c4053732becea606061deae6799da0cf52458fba840ba0ff8e4a034a671fa876b8a0ff25677
25 +DIST wireshark-3.0.0.tar.xz 30953760 BLAKE2B ee866966000cf902da6f330eb8a4b281d34a3ca88e9d92a7de1069172c8aeb86f9222e1467c5d3722ee055baf88d8ba0eb6fe27084d0b35f9639bdb9741d25e1 SHA512 917708b5edc25609536c7bd7cf4ae32a901fd99118302138dc0bf6f1ad092a8e5069a917cc8cf6cb77190f54e50623a4eba1ee10ffc225ee3051b50cf02a0963
26 DIST wireshark-3.0.0rc1.tar.xz 30933416 BLAKE2B b9b421ecbcff8766d45f370a8ba6e0c03b02caaca09f5af90a5df0cd9a1a9093fab0b931c0cc001df31e0da86b53e022e70353a617a6b66d9defe79a44e0c8a3 SHA512 8cc34ee107f73cd19ca4bcfb05e0bfd237a53c7e0dcd07780200e423096566215cb55996e12cedbfdeaf31fc458c2a32b6d8038264060cdf677756148c404308
27 DIST wireshark-3.0.0rc2.tar.xz 30942776 BLAKE2B 723c70291d586b2bc9a8bc1cc0eae03ed06fec3c8a60d34b4d8ed801eef0d3cd60c0a49f4b1b9dbd17dfd91fb07b91103a579d169250cadde523c0910f1b5406 SHA512 3d3203d5e690ec067bae112490fe4a1d5e43415c6845fa22085ed020666c6e99f7a4793a0c353b4dae694697953f50aa8a9638d66f8e705b6bd0559019cb6af2
28
29 diff --git a/net-analyzer/wireshark/wireshark-3.0.0.ebuild b/net-analyzer/wireshark/wireshark-3.0.0.ebuild
30 new file mode 100644
31 index 00000000000..7824e565a93
32 --- /dev/null
33 +++ b/net-analyzer/wireshark/wireshark-3.0.0.ebuild
34 @@ -0,0 +1,248 @@
35 +# Copyright 1999-2019 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=6
39 +PYTHON_COMPAT=( python3_{4,5,6,7} )
40 +inherit cmake-utils eutils fcaps flag-o-matic gnome2-utils ltprune multilib python-r1 qmake-utils user xdg-utils
41 +
42 +DESCRIPTION="A network protocol analyzer formerly known as ethereal"
43 +HOMEPAGE="https://www.wireshark.org/"
44 +SRC_URI="${HOMEPAGE}download/src/all-versions/${P/_/}.tar.xz"
45 +
46 +LICENSE="GPL-2"
47 +SLOT="0/${PV}"
48 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc64 ~x86"
49 +IUSE="
50 + adns androiddump bcg729 +capinfos +captype ciscodump +dftest doc dpauxmon
51 + +dumpcap +editcap kerberos libxml2 lua lz4 maxminddb +mergecap +netlink
52 + nghttp2 +pcap +qt5 +randpkt +randpktdump +reordercap sbc selinux +sharkd
53 + smi snappy spandsp sshdump ssl sdjournal +text2pcap tfshark +tshark
54 + +udpdump zlib
55 +"
56 +
57 +S=${WORKDIR}/${P/_/}
58 +
59 +CDEPEND="
60 + >=dev-libs/glib-2.32:2
61 + dev-libs/libgcrypt:0
62 + adns? ( >=net-dns/c-ares-1.5 )
63 + bcg729? ( media-libs/bcg729 )
64 + ciscodump? ( >=net-libs/libssh-0.6 )
65 + filecaps? ( sys-libs/libcap )
66 + kerberos? ( virtual/krb5 )
67 + libxml2? ( dev-libs/libxml2 )
68 + lua? ( >=dev-lang/lua-5.1:* )
69 + lz4? ( app-arch/lz4 )
70 + maxminddb? ( dev-libs/libmaxminddb )
71 + netlink? ( dev-libs/libnl:3 )
72 + nghttp2? ( net-libs/nghttp2 )
73 + pcap? ( net-libs/libpcap )
74 + qt5? (
75 + dev-qt/qtcore:5
76 + dev-qt/qtgui:5
77 + dev-qt/qtmultimedia:5
78 + dev-qt/qtprintsupport:5
79 + dev-qt/qtwidgets:5
80 + x11-misc/xdg-utils
81 + )
82 + sbc? ( media-libs/sbc )
83 + sdjournal? ( sys-apps/systemd )
84 + smi? ( net-libs/libsmi )
85 + snappy? ( app-arch/snappy )
86 + spandsp? ( media-libs/spandsp )
87 + sshdump? ( >=net-libs/libssh-0.6 )
88 + ssl? ( net-libs/gnutls:= )
89 + zlib? ( sys-libs/zlib )
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 + !<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 + -DDISABLE_WERROR=yes
182 + -DENABLE_BCG729=$(usex bcg729)
183 + -DENABLE_CAP=$(usex filecaps caps)
184 + -DENABLE_CARES=$(usex adns)
185 + -DENABLE_GNUTLS=$(usex ssl)
186 + -DENABLE_KERBEROS=$(usex kerberos)
187 + -DENABLE_LIBXML2=$(usex libxml2)
188 + -DENABLE_LUA=$(usex lua)
189 + -DENABLE_LZ4=$(usex lz4)
190 + -DENABLE_NETLINK=$(usex netlink)
191 + -DENABLE_NGHTTP2=$(usex nghttp2)
192 + -DENABLE_PCAP=$(usex pcap)
193 + -DENABLE_SBC=$(usex sbc)
194 + -DENABLE_SMI=$(usex smi)
195 + -DENABLE_SNAPPY=$(usex snappy)
196 + -DENABLE_SPANDSP=$(usex spandsp)
197 + -DENABLE_ZLIB=$(usex zlib)
198 + )
199 +
200 + cmake-utils_src_configure
201 +}
202 +
203 +src_test() {
204 + emake -C "${BUILD_DIR}" test-programs
205 + emake -C "${BUILD_DIR}" 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 + prune_libtool_files
253 +
254 + mv "${D}"/usr/share/doc/${PN}/* "${D}"/usr/share/doc/${PF}/ || die
255 + rmdir "${D}"/usr/share/doc/${PN} || die
256 +}
257 +
258 +pkg_postinst() {
259 + gnome2_icon_cache_update
260 + xdg_desktop_database_update
261 + xdg_mimeinfo_database_update
262 +
263 + # Add group for users allowed to sniff.
264 + enewgroup wireshark
265 + chgrp wireshark "${EROOT}"/usr/bin/dumpcap
266 +
267 + if use dumpcap && use pcap; then
268 + fcaps -o 0 -g wireshark -m 4710 -M 0710 \
269 + cap_dac_read_search,cap_net_raw,cap_net_admin \
270 + "${EROOT}"/usr/bin/dumpcap
271 + fi
272 +
273 + ewarn "NOTE: To capture traffic with wireshark as normal user you have to"
274 + ewarn "add yourself to the wireshark group. This security measure ensures"
275 + ewarn "that only trusted users are allowed to sniff your traffic."
276 +}
277 +
278 +pkg_postrm() {
279 + gnome2_icon_cache_update
280 + xdg_desktop_database_update
281 + xdg_mimeinfo_database_update
282 +}