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: Wed, 27 Feb 2019 21:28:09
Message-Id: 1551302877.741dce1d4c4d9124b1188c830aead1e22aa99573.jer@gentoo
1 commit: 741dce1d4c4d9124b1188c830aead1e22aa99573
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 27 21:27:20 2019 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 27 21:27:57 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=741dce1d
7
8 net-analyzer/wireshark: Version 2.6.7
9
10 Bug: https://bugs.gentoo.org/679004
11 Package-Manager: Portage-2.3.62, Repoman-2.3.12
12 Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
13
14 net-analyzer/wireshark/Manifest | 1 +
15 net-analyzer/wireshark/wireshark-2.6.7.ebuild | 240 ++++++++++++++++++++++++++
16 2 files changed, 241 insertions(+)
17
18 diff --git a/net-analyzer/wireshark/Manifest b/net-analyzer/wireshark/Manifest
19 index 6894336f017..6eeba91487c 100644
20 --- a/net-analyzer/wireshark/Manifest
21 +++ b/net-analyzer/wireshark/Manifest
22 @@ -1,5 +1,6 @@
23 DIST wireshark-2.4.5.tar.xz 28836740 BLAKE2B 797540daca259a2d5d7dc6e637f2b504b6d14191af4040e6b344c95db6c776b7de80c25c59c98ab84d0337cc96c7313b42c13103a3c3944768a793130deae258 SHA512 2f2c201d6b8a37dcbe03bc9affbf97d632d8e40e4fe5b3a3e79cbd5cfbeb5b9111919850546ccae355fcb042def3456438eb1c4d73f7d56d373e7898311b42f3
24 DIST wireshark-2.6.3.tar.xz 28384004 BLAKE2B f275c73173fbaf3f819c58f28859362e9c53ae50cf2649ac42c8d172362241eb00d7f43d0aead184ec67cb8da34d405124be10c5bf31226c2cb4800b8a01955b SHA512 87e5335840baa401a1064ee83e3f0ee859c059dd37a09f63f19eb5d91ad273e84f1c0e7a8fdd63fe8a7076abff5e79593827544c5796d921cf7dc7682c7c3f80
25 DIST wireshark-2.6.6.tar.xz 28407404 BLAKE2B 5135789d345b675814a6394d5ba1469585b9eab917885730125b8a007aecd9cb48a510fc9e7479148cadf625807bac9017b854797e4bb2e562d7dc7f76140826 SHA512 b781c3b34dc76a3d8e60dc2b9b4e46a11994440b8df7b56134521ea9a77b27b0719a600db60d7f3d65f15972a5db2a7e85a8bf60d7217fce498fb5668de8fe56
26 +DIST wireshark-2.6.7.tar.xz 28420060 BLAKE2B fda1fb2b9a8968916dd24c59c193854ab56dc13d5a69d2f589ae89b257f92794d092a3da75c2e20b1c83c902966db15527346dc4072a38d16a21ed095cde364e SHA512 bd0f87debd8bd8947f386aaec9fc843148e3cdfbffc28ba499526c4053732becea606061deae6799da0cf52458fba840ba0ff8e4a034a671fa876b8a0ff25677
27 DIST wireshark-3.0.0rc1.tar.xz 30933416 BLAKE2B b9b421ecbcff8766d45f370a8ba6e0c03b02caaca09f5af90a5df0cd9a1a9093fab0b931c0cc001df31e0da86b53e022e70353a617a6b66d9defe79a44e0c8a3 SHA512 8cc34ee107f73cd19ca4bcfb05e0bfd237a53c7e0dcd07780200e423096566215cb55996e12cedbfdeaf31fc458c2a32b6d8038264060cdf677756148c404308
28 DIST wireshark-3.0.0rc2.tar.xz 30942776 BLAKE2B 723c70291d586b2bc9a8bc1cc0eae03ed06fec3c8a60d34b4d8ed801eef0d3cd60c0a49f4b1b9dbd17dfd91fb07b91103a579d169250cadde523c0910f1b5406 SHA512 3d3203d5e690ec067bae112490fe4a1d5e43415c6845fa22085ed020666c6e99f7a4793a0c353b4dae694697953f50aa8a9638d66f8e705b6bd0559019cb6af2
29
30 diff --git a/net-analyzer/wireshark/wireshark-2.6.7.ebuild b/net-analyzer/wireshark/wireshark-2.6.7.ebuild
31 new file mode 100644
32 index 00000000000..852878b84a7
33 --- /dev/null
34 +++ b/net-analyzer/wireshark/wireshark-2.6.7.ebuild
35 @@ -0,0 +1,240 @@
36 +# Copyright 1999-2019 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=6
40 +inherit cmake-utils eutils fcaps flag-o-matic gnome2-utils ltprune multilib 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
51 + +dumpcap +editcap gtk kerberos libxml2 lua lz4 maxminddb +mergecap +netlink
52 + nghttp2 +pcap portaudio +qt5 +randpkt +randpktdump +reordercap sbc selinux
53 + +sharkd smi snappy spandsp sshdump ssl +text2pcap tfshark +tshark +udpdump
54 + zlib
55 +"
56 +
57 +S=${WORKDIR}/${P/_/}
58 +
59 +CDEPEND="
60 + >=dev-libs/glib-2.14:2
61 + dev-libs/libgcrypt:0
62 + netlink? ( dev-libs/libnl:3 )
63 + adns? ( >=net-dns/c-ares-1.5 )
64 + bcg729? ( media-libs/bcg729 )
65 + filecaps? ( sys-libs/libcap )
66 + gtk? (
67 + x11-libs/gdk-pixbuf
68 + x11-libs/gtk+:3
69 + x11-libs/pango
70 + x11-misc/xdg-utils
71 + )
72 + kerberos? ( virtual/krb5 )
73 + sshdump? ( >=net-libs/libssh-0.6 )
74 + ciscodump? ( >=net-libs/libssh-0.6 )
75 + libxml2? ( dev-libs/libxml2 )
76 + lua? ( >=dev-lang/lua-5.1:* )
77 + lz4? ( app-arch/lz4 )
78 + maxminddb? ( dev-libs/libmaxminddb )
79 + nghttp2? ( net-libs/nghttp2 )
80 + pcap? ( net-libs/libpcap )
81 + portaudio? ( media-libs/portaudio )
82 + qt5? (
83 + dev-qt/qtcore:5
84 + dev-qt/qtgui:5
85 + dev-qt/qtmultimedia:5
86 + dev-qt/qtprintsupport:5
87 + dev-qt/qtwidgets:5
88 + x11-misc/xdg-utils
89 + )
90 + sbc? ( media-libs/sbc )
91 + smi? ( net-libs/libsmi )
92 + snappy? ( app-arch/snappy )
93 + spandsp? ( media-libs/spandsp )
94 + ssl? ( net-libs/gnutls:= )
95 + zlib? ( sys-libs/zlib )
96 +"
97 +# We need perl for `pod2html`. The rest of the perl stuff is to block older
98 +# and broken installs. #455122
99 +DEPEND="
100 + ${CDEPEND}
101 + dev-lang/perl
102 + !<virtual/perl-Pod-Simple-3.170
103 + !<perl-core/Pod-Simple-3.170
104 + doc? (
105 + app-doc/doxygen
106 + dev-ruby/asciidoctor
107 + )
108 + qt5? (
109 + dev-qt/linguist-tools:5
110 + )
111 + sys-devel/bison
112 + sys-devel/flex
113 + virtual/pkgconfig
114 +"
115 +RDEPEND="
116 + ${CDEPEND}
117 + gtk? ( virtual/freedesktop-icon-theme )
118 + qt5? ( virtual/freedesktop-icon-theme )
119 + selinux? ( sec-policy/selinux-wireshark )
120 +"
121 +PATCHES=(
122 + "${FILESDIR}"/${PN}-1.99.8-qtchooser.patch
123 + "${FILESDIR}"/${PN}-2.4-androiddump.patch
124 + "${FILESDIR}"/${PN}-2.6.0-redhat.patch
125 + "${FILESDIR}"/${PN}-2.6.2-qtsvg.patch
126 + "${FILESDIR}"/${PN}-2.6.6-androiddump-wsutil.patch
127 + "${FILESDIR}"/${PN}-99999999-androiddump.patch
128 +)
129 +
130 +pkg_setup() {
131 + enewgroup wireshark
132 +}
133 +
134 +src_configure() {
135 + local mycmakeargs
136 +
137 + # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass
138 + # --with-ssl to ./configure. (Mimics code from acinclude.m4).
139 + if use kerberos; then
140 + case $(krb5-config --libs) in
141 + *-lcrypto*)
142 + ewarn "Kerberos was built with ssl support: linkage with openssl is enabled."
143 + ewarn "Note there are annoying license incompatibilities between the OpenSSL"
144 + ewarn "license and the GPL, so do your check before distributing such package."
145 + mycmakeargs+=( -DENABLE_GNUTLS=$(usex ssl) )
146 + ;;
147 + esac
148 + fi
149 +
150 + if use qt5; then
151 + export QT_MIN_VERSION=5.3.0
152 + append-cxxflags -fPIC -DPIC
153 + fi
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_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_sharkd=$(usex sharkd)
174 + -DBUILD_sshdump=$(usex sshdump)
175 + -DBUILD_text2pcap=$(usex text2pcap)
176 + -DBUILD_tfshark=$(usex tfshark)
177 + -DBUILD_tshark=$(usex tshark)
178 + -DBUILD_udpdump=$(usex udpdump)
179 + -DBUILD_wireshark=$(usex qt5)
180 + -DBUILD_wireshark_gtk=$(usex gtk)
181 + -DDISABLE_WERROR=yes
182 + -DENABLE_BCG729=$(usex bcg729)
183 + -DENABLE_CAP=no
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_PORTAUDIO=$(usex portaudio)
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_install() {
205 + cmake-utils_src_install
206 +
207 + # FAQ is not required as is installed from help/faq.txt
208 + dodoc AUTHORS ChangeLog NEWS README* doc/randpkt.txt doc/README*
209 +
210 + # install headers
211 + insinto /usr/include/wireshark
212 + doins ws_diag_control.h ws_symbol_export.h \
213 + "${BUILD_DIR}"/config.h "${BUILD_DIR}"/version.h
214 +
215 + local dir dirs=(
216 + epan
217 + epan/crypt
218 + epan/dfilter
219 + epan/dissectors
220 + epan/ftypes
221 + epan/wmem
222 + wiretap
223 + wsutil
224 + )
225 + for dir in "${dirs[@]}"
226 + do
227 + insinto /usr/include/wireshark/${dir}
228 + doins ${dir}/*.h
229 + done
230 +
231 + #with the above this really shouldn't be needed, but things may be looking
232 + # in wiretap/ instead of wireshark/wiretap/
233 + insinto /usr/include/wiretap
234 + doins wiretap/wtap.h
235 +
236 + if use gtk || use qt5; then
237 + local s
238 + for s in 16 32 48 64 128 256 512 1024; do
239 + insinto /usr/share/icons/hicolor/${s}x${s}/apps
240 + newins image/wsicon${s}.png wireshark.png
241 + done
242 + for s in 16 24 32 48 64 128 256 ; do
243 + insinto /usr/share/icons/hicolor/${s}x${s}/mimetypes
244 + newins image/WiresharkDoc-${s}.png application-vnd.tcpdump.pcap.png
245 + done
246 + fi
247 +
248 + prune_libtool_files
249 +}
250 +
251 +pkg_postinst() {
252 + gnome2_icon_cache_update
253 + xdg_desktop_database_update
254 + xdg_mimeinfo_database_update
255 +
256 + # Add group for users allowed to sniff.
257 + enewgroup wireshark
258 + chgrp wireshark "${EROOT}"/usr/bin/dumpcap
259 +
260 + if use dumpcap && use pcap; then
261 + fcaps -o 0 -g wireshark -m 4710 -M 0710 \
262 + cap_dac_read_search,cap_net_raw,cap_net_admin \
263 + "${EROOT}"/usr/bin/dumpcap
264 + fi
265 +
266 + ewarn "NOTE: To capture traffic with wireshark as normal user you have to"
267 + ewarn "add yourself to the wireshark group. This security measure ensures"
268 + ewarn "that only trusted users are allowed to sniff your traffic."
269 +}
270 +
271 +pkg_postrm() {
272 + gnome2_icon_cache_update
273 + xdg_desktop_database_update
274 + xdg_mimeinfo_database_update
275 +}