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, 26 Apr 2018 16:18:00
Message-Id: 1524759471.412a016e2db2ae18afbe281a56c4ca2dd4d3585c.jer@gentoo
1 commit: 412a016e2db2ae18afbe281a56c4ca2dd4d3585c
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 26 16:06:21 2018 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 26 16:17:51 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=412a016e
7
8 net-analyzer/wireshark: Version 2.6.0.
9
10 Package-Manager: Portage-2.3.31, Repoman-2.3.9
11
12 net-analyzer/wireshark/Manifest | 1 +
13 net-analyzer/wireshark/wireshark-2.6.0.ebuild | 261 ++++++++++++++++++++++++++
14 2 files changed, 262 insertions(+)
15
16 diff --git a/net-analyzer/wireshark/Manifest b/net-analyzer/wireshark/Manifest
17 index 3df54a763b2..3c55088753b 100644
18 --- a/net-analyzer/wireshark/Manifest
19 +++ b/net-analyzer/wireshark/Manifest
20 @@ -2,3 +2,4 @@ DIST wireshark-2.4.5.tar.xz 28836740 BLAKE2B 797540daca259a2d5d7dc6e637f2b504b6d
21 DIST wireshark-2.4.6.tar.xz 28851192 BLAKE2B 19a69d077b794ab07fbfb22b7cf9e61ff54ded5dcd0396ba97d1cbd99addaeb9670d5a870f5e83c39384230def04c078d676580bded81746753716cb392ee05a SHA512 171047fa36a6cb29d1edb8e28086e24075f8b77581d9f3142fa39af8ae3d6dfe0c2e41a9335ca5d9851578b54ac9e6e74ff5bd92a96af262a5cc7a73857b8b81
22 DIST wireshark-2.5.0.tar.xz 28197388 BLAKE2B 5d50d3752078a71d1d83f48a85ee564d14950efab39d5679430a61a266f9b93749278cd19d155036326753fbab86f83c5edb764adec5d68325730dbba19a920f SHA512 963c03dd363850cd0ad8a32a3e8c85410f2b23fadc081f00e4e3a2ad3a324a5f35626fbb7e490ec01c61260500363fef93c52bf7796b917e9490fff4044ee67f
23 DIST wireshark-2.5.1.tar.xz 28229472 BLAKE2B ac832e3d8727a20754153949d7dfba9cfbc359955e55c06a9181ecbd3c9d9ddac269a745a430c47907b3e205d1b593241e0908b5b6c232613cbd4d23c96c4f61 SHA512 c3e1abb1c8b6a035640d655c59bfb8a9a846c88f49035b8086ae81a6e74cb296419f15bc4969489208fdce6578d279663c6fbc8d6eebff1b6097d1dbd0e71b75
24 +DIST wireshark-2.6.0.tar.xz 28314868 BLAKE2B 2121a667115474ac4b1fe05d50ffc02383bf7a8057ea072480455562c62a75d18f3c6b6886ca1e7345101d15057a67a250a3d2a2050777ff5bb1654279b1ac87 SHA512 a419ed32caeb9f25fc26e345c7baf7d847fee35730c64efad66870a786b26b9f8d5a8665b8b99be88f9cf504f6d9e640584d9849558ff09efc83400588dc6da8
25
26 diff --git a/net-analyzer/wireshark/wireshark-2.6.0.ebuild b/net-analyzer/wireshark/wireshark-2.6.0.ebuild
27 new file mode 100644
28 index 00000000000..75b779a4898
29 --- /dev/null
30 +++ b/net-analyzer/wireshark/wireshark-2.6.0.ebuild
31 @@ -0,0 +1,261 @@
32 +# Copyright 1999-2018 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=6
36 +inherit autotools eutils fcaps flag-o-matic gnome2-utils multilib qmake-utils user xdg-utils
37 +
38 +DESCRIPTION="A network protocol analyzer formerly known as ethereal"
39 +HOMEPAGE="https://www.wireshark.org/"
40 +SRC_URI="${HOMEPAGE}download/src/all-versions/${P/_/}.tar.xz"
41 +
42 +LICENSE="GPL-2"
43 +SLOT="0/${PV}"
44 +KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc64 ~x86"
45 +IUSE="
46 + adns androiddump bcg729 +capinfos +caps +captype ciscodump
47 + cpu_flags_x86_sse4_2 +dftest doc +dumpcap +editcap gtk kerberos libssh
48 + libxml2 lua lz4 maxminddb +mergecap +netlink nghttp2 +pcap portaudio +qt5
49 + +randpkt +randpktdump +reordercap sbc selinux +sharkd smi snappy spandsp
50 + sshdump ssl +text2pcap tfshark +tshark +udpdump zlib
51 +"
52 +REQUIRED_USE="
53 + ciscodump? ( libssh )
54 + sshdump? ( libssh )
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 + caps? ( 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 + libssh? ( >=net-libs/libssh-0.6 )
74 + libxml2? ( dev-libs/libxml2 )
75 + lua? ( >=dev-lang/lua-5.1:* )
76 + lz4? ( app-arch/lz4 )
77 + maxminddb? ( dev-libs/libmaxminddb )
78 + nghttp2? ( net-libs/nghttp2 )
79 + pcap? ( net-libs/libpcap )
80 + portaudio? ( media-libs/portaudio )
81 + qt5? (
82 + dev-qt/qtcore:5
83 + dev-qt/qtgui:5
84 + dev-qt/qtmultimedia:5
85 + dev-qt/qtprintsupport:5
86 + dev-qt/qtwidgets:5
87 + || (
88 + media-libs/speexdsp
89 + <media-libs/speex-1.2.0
90 + )
91 + x11-misc/xdg-utils
92 + )
93 + sbc? ( media-libs/sbc )
94 + smi? ( net-libs/libsmi )
95 + snappy? ( app-arch/snappy )
96 + spandsp? ( media-libs/spandsp )
97 + ssl? ( net-libs/gnutls:= )
98 + zlib? ( sys-libs/zlib !=sys-libs/zlib-1.2.4 )
99 +"
100 +# We need perl for `pod2html`. The rest of the perl stuff is to block older
101 +# and broken installs. #455122
102 +DEPEND="
103 + ${CDEPEND}
104 + dev-lang/perl
105 + !<virtual/perl-Pod-Simple-3.170
106 + !<perl-core/Pod-Simple-3.170
107 + doc? (
108 + app-doc/doxygen
109 + dev-ruby/asciidoctor
110 + )
111 + qt5? (
112 + dev-qt/linguist-tools:5
113 + )
114 + sys-devel/bison
115 + sys-devel/flex
116 + virtual/pkgconfig
117 +"
118 +RDEPEND="
119 + ${CDEPEND}
120 + gtk? ( virtual/freedesktop-icon-theme )
121 + qt5? ( virtual/freedesktop-icon-theme )
122 + selinux? ( sec-policy/selinux-wireshark )
123 +"
124 +PATCHES=(
125 + "${FILESDIR}"/${PN}-1.99.8-qtchooser.patch
126 + "${FILESDIR}"/${PN}-2.1.0-sse4_2-r1.patch
127 + "${FILESDIR}"/${PN}-2.4-androiddump.patch
128 + "${FILESDIR}"/${PN}-99999999-androiddump.patch
129 +)
130 +
131 +pkg_setup() {
132 + enewgroup wireshark
133 +}
134 +
135 +src_prepare() {
136 + default
137 +
138 + eautoreconf
139 +}
140 +
141 +src_configure() {
142 + local myconf
143 +
144 + # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass
145 + # --with-ssl to ./configure. (Mimics code from acinclude.m4).
146 + if use kerberos; then
147 + case $(krb5-config --libs) in
148 + *-lcrypto*)
149 + ewarn "Kerberos was built with ssl support: linkage with openssl is enabled."
150 + ewarn "Note there are annoying license incompatibilities between the OpenSSL"
151 + ewarn "license and the GPL, so do your check before distributing such package."
152 + myconf+=( "--with-ssl" )
153 + ;;
154 + esac
155 + fi
156 +
157 + # Enable wireshark binary with any supported GUI toolkit (bug #473188)
158 + if use gtk || use qt5; then
159 + myconf+=( "--enable-wireshark" )
160 + else
161 + myconf+=( "--disable-wireshark" )
162 + fi
163 +
164 + if ! use qt5; then
165 + myconf+=( "--with-qt=no" )
166 + fi
167 +
168 + if use qt5; then
169 + export QT_MIN_VERSION=5.3.0
170 + append-cxxflags -fPIC -DPIC
171 + fi
172 +
173 + econf \
174 + $(use androiddump && use pcap && echo --enable-androiddump-use-libpcap=yes) \
175 + $(use dumpcap && use_with pcap dumpcap-group wireshark) \
176 + $(use_enable androiddump) \
177 + $(use_enable capinfos) \
178 + $(use_enable captype) \
179 + $(use_enable ciscodump) \
180 + $(use_enable dftest) \
181 + $(use_enable doc guides) \
182 + $(use_enable dumpcap) \
183 + $(use_enable editcap) \
184 + $(use_enable mergecap) \
185 + $(use_enable randpkt) \
186 + $(use_enable randpktdump) \
187 + $(use_enable reordercap) \
188 + $(use_enable sharkd) \
189 + $(use_enable sshdump) \
190 + $(use_enable text2pcap) \
191 + $(use_enable tfshark) \
192 + $(use_enable tshark) \
193 + $(use_enable udpdump) \
194 + $(use_with adns c-ares) \
195 + $(use_with bcg729) \
196 + $(use_with caps libcap) \
197 + $(use_with gtk gtk 3) \
198 + $(use_with kerberos krb5) \
199 + $(use_with libssh) \
200 + $(use_with libxml2) \
201 + $(use_with lua) \
202 + $(use_with lz4) \
203 + $(use_with maxminddb) \
204 + $(use_with nghttp2) \
205 + $(use_with pcap) \
206 + $(use_with portaudio) \
207 + $(use_with sbc) \
208 + $(use_with smi libsmi) \
209 + $(use_with snappy) \
210 + $(use_with spandsp) \
211 + $(use_with ssl gnutls) \
212 + $(use_with zlib) \
213 + $(usex cpu_flags_x86_sse4_2 --enable-sse4_2 '') \
214 + $(usex netlink --with-libnl=3 --without-libnl) \
215 + $(usex qt5 --with-qt=5 '') \
216 + $(usex qt5 LRELEASE=$(qt5_get_bindir)/lrelease '') \
217 + $(usex qt5 MOC=$(qt5_get_bindir)/moc '') \
218 + $(usex qt5 RCC=$(qt5_get_bindir)/rcc '') \
219 + $(usex qt5 UIC=$(qt5_get_bindir)/uic '') \
220 + --disable-warnings-as-errors \
221 + --sysconfdir="${EPREFIX}"/etc/wireshark \
222 + ${myconf[@]}
223 +}
224 +
225 +src_install() {
226 + default
227 +
228 + # FAQ is not required as is installed from help/faq.txt
229 + dodoc AUTHORS ChangeLog NEWS README* doc/randpkt.txt doc/README*
230 +
231 + # install headers
232 + local wsheader
233 + for wsheader in \
234 + config.h \
235 + epan/*.h \
236 + epan/crypt/*.h \
237 + epan/dfilter/*.h \
238 + epan/dissectors/*.h \
239 + epan/ftypes/*.h \
240 + epan/wmem/*.h \
241 + wiretap/*.h \
242 + ws_diag_control.h \
243 + ws_symbol_export.h \
244 + wsutil/*.h
245 + do
246 + insinto /usr/include/wireshark/$( dirname ${wsheader} )
247 + doins ${wsheader}
248 + done
249 +
250 + #with the above this really shouldn't be needed, but things may be looking in wiretap/ instead of wireshark/wiretap/
251 + insinto /usr/include/wiretap
252 + doins wiretap/wtap.h
253 +
254 + if use gtk || use qt5; then
255 + local s
256 + for s in 16 32 48 64 128 256 512 1024; do
257 + insinto /usr/share/icons/hicolor/${s}x${s}/apps
258 + newins image/wsicon${s}.png wireshark.png
259 + done
260 + for s in 16 24 32 48 64 128 256 ; do
261 + insinto /usr/share/icons/hicolor/${s}x${s}/mimetypes
262 + newins image/WiresharkDoc-${s}.png application-vnd.tcpdump.pcap.png
263 + done
264 + fi
265 +
266 + prune_libtool_files
267 +}
268 +
269 +pkg_postinst() {
270 + gnome2_icon_cache_update
271 + xdg_desktop_database_update
272 + xdg_mimeinfo_database_update
273 +
274 + # Add group for users allowed to sniff.
275 + enewgroup wireshark
276 +
277 + if use dumpcap && use pcap; then
278 + fcaps -o 0 -g wireshark -m 4710 -M 0710 \
279 + cap_dac_read_search,cap_net_raw,cap_net_admin \
280 + "${EROOT}"/usr/bin/dumpcap
281 + fi
282 +
283 + ewarn "NOTE: To capture traffic with wireshark as normal user you have to"
284 + ewarn "add yourself to the wireshark group. This security measure ensures"
285 + ewarn "that only trusted users are allowed to sniff your traffic."
286 +}
287 +
288 +pkg_postrm() {
289 + gnome2_icon_cache_update
290 + xdg_desktop_database_update
291 + xdg_mimeinfo_database_update
292 +}