1 |
commit: 8b4f7a0189a7403613443bb7b514ba9334c2b616 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jul 1 21:19:20 2020 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jul 1 21:21:31 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b4f7a01 |
7 |
|
8 |
net-analyzer/wireshark: Version 3.2.5 |
9 |
|
10 |
Package-Manager: Portage-2.3.103, Repoman-2.3.23 |
11 |
Bug: https://bugs.gentoo.org/730414 |
12 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
13 |
|
14 |
net-analyzer/wireshark/Manifest | 1 + |
15 |
net-analyzer/wireshark/wireshark-3.2.5.ebuild | 261 ++++++++++++++++++++++++++ |
16 |
2 files changed, 262 insertions(+) |
17 |
|
18 |
diff --git a/net-analyzer/wireshark/Manifest b/net-analyzer/wireshark/Manifest |
19 |
index 31d6a5d49be..081b4d45514 100644 |
20 |
--- a/net-analyzer/wireshark/Manifest |
21 |
+++ b/net-analyzer/wireshark/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
DIST wireshark-3.2.4.tar.xz 31580440 BLAKE2B c40c19fde09726192119efe358892157d17e28ab87afa9a5b91203e11d3079b718d8e200522294886613d63d19283198de1256561eaf83436742db3898019e89 SHA512 67d20a248c0f4e63a58fd3a4191ede75542e9cfd09b0baa5c0016f72a435527d8f95d34f2d35ef1957c1a9c66844d530162379bfcf9e51b64d0d220b381cb097 |
24 |
+DIST wireshark-3.2.5.tar.xz 31626148 BLAKE2B 46341b0c703913abaf49c55d2d40be36e4f2d74ab0326d0b893288fb15e27246249234243f68b184b5854cdd4a6c8690c350d5fad231db1dda1620fe76b94c93 SHA512 3dc785a6e857f66a9ae3c172bf6a09c2199fe914646ade7b81f0ee18bd3addae57facad898f57675ea4d7177a4315d6a6cdac46e2da063727a83f9bee6994277 |
25 |
|
26 |
diff --git a/net-analyzer/wireshark/wireshark-3.2.5.ebuild b/net-analyzer/wireshark/wireshark-3.2.5.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..9ecfd3d5c9b |
29 |
--- /dev/null |
30 |
+++ b/net-analyzer/wireshark/wireshark-3.2.5.ebuild |
31 |
@@ -0,0 +1,261 @@ |
32 |
+# Copyright 1999-2020 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=7 |
36 |
+PYTHON_COMPAT=( python3_{6,7} ) |
37 |
+inherit fcaps flag-o-matic multilib python-any-r1 qmake-utils user xdg-utils cmake |
38 |
+ |
39 |
+DESCRIPTION="A network protocol analyzer formerly known as ethereal" |
40 |
+HOMEPAGE="https://www.wireshark.org/" |
41 |
+SRC_URI="https://www.wireshark.org/download/src/all-versions/${P/_/}.tar.xz" |
42 |
+LICENSE="GPL-2" |
43 |
+ |
44 |
+SLOT="0/${PV}" |
45 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~x86" |
46 |
+IUSE=" |
47 |
+ androiddump bcg729 brotli +capinfos +captype ciscodump +dftest doc dpauxmon |
48 |
+ +dumpcap +editcap http2 kerberos libxml2 lua lz4 maxminddb +mergecap |
49 |
+ +minizip +netlink +plugins plugin-ifdemo +pcap +qt5 +randpkt +randpktdump |
50 |
+ +reordercap sbc selinux +sharkd smi snappy spandsp sshdump ssl sdjournal |
51 |
+ test +text2pcap tfshark +tshark +udpdump zlib +zstd |
52 |
+" |
53 |
+S=${WORKDIR}/${P/_/} |
54 |
+ |
55 |
+CDEPEND=" |
56 |
+ >=dev-libs/glib-2.32:2 |
57 |
+ >=net-dns/c-ares-1.5 |
58 |
+ dev-libs/libgcrypt:0 |
59 |
+ bcg729? ( media-libs/bcg729 ) |
60 |
+ brotli? ( app-arch/brotli ) |
61 |
+ ciscodump? ( >=net-libs/libssh-0.6 ) |
62 |
+ filecaps? ( sys-libs/libcap ) |
63 |
+ http2? ( net-libs/nghttp2 ) |
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 |
+ minizip? ( sys-libs/zlib[minizip] ) |
70 |
+ netlink? ( dev-libs/libnl:3 ) |
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 |
+ zstd? ( app-arch/zstd ) |
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 |
+ dev-lang/perl |
98 |
+ sys-devel/bison |
99 |
+ sys-devel/flex |
100 |
+ virtual/pkgconfig |
101 |
+ doc? ( |
102 |
+ app-doc/doxygen |
103 |
+ dev-ruby/asciidoctor |
104 |
+ ) |
105 |
+ qt5? ( |
106 |
+ dev-qt/linguist-tools:5 |
107 |
+ ) |
108 |
+ test? ( |
109 |
+ dev-python/pytest |
110 |
+ dev-python/pytest-xdist |
111 |
+ ) |
112 |
+" |
113 |
+RDEPEND=" |
114 |
+ ${CDEPEND} |
115 |
+ qt5? ( virtual/freedesktop-icon-theme ) |
116 |
+ selinux? ( sec-policy/selinux-wireshark ) |
117 |
+" |
118 |
+REQUIRED_USE=" |
119 |
+ plugin-ifdemo? ( plugins ) |
120 |
+" |
121 |
+RESTRICT="test" |
122 |
+PATCHES=( |
123 |
+ "${FILESDIR}"/${PN}-2.4-androiddump.patch |
124 |
+ "${FILESDIR}"/${PN}-2.6.0-redhat.patch |
125 |
+ "${FILESDIR}"/${PN}-2.9.0-tfshark-libm.patch |
126 |
+ "${FILESDIR}"/${PN}-99999999-androiddump-wsutil.patch |
127 |
+ "${FILESDIR}"/${PN}-99999999-qtsvg.patch |
128 |
+ "${FILESDIR}"/${PN}-99999999-ui-needs-wiretap.patch |
129 |
+) |
130 |
+ |
131 |
+pkg_setup() { |
132 |
+ enewgroup wireshark |
133 |
+} |
134 |
+ |
135 |
+src_configure() { |
136 |
+ local mycmakeargs |
137 |
+ |
138 |
+ # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass |
139 |
+ # --with-ssl to ./configure. (Mimics code from acinclude.m4). |
140 |
+ if use kerberos; then |
141 |
+ case $(krb5-config --libs) in |
142 |
+ *-lcrypto*) |
143 |
+ ewarn "Kerberos was built with ssl support: linkage with openssl is enabled." |
144 |
+ ewarn "Note there are annoying license incompatibilities between the OpenSSL" |
145 |
+ ewarn "license and the GPL, so do your check before distributing such package." |
146 |
+ mycmakeargs+=( -DENABLE_GNUTLS=$(usex ssl) ) |
147 |
+ ;; |
148 |
+ esac |
149 |
+ fi |
150 |
+ |
151 |
+ if use qt5; then |
152 |
+ export QT_MIN_VERSION=5.3.0 |
153 |
+ append-cxxflags -fPIC -DPIC |
154 |
+ fi |
155 |
+ |
156 |
+ python_setup |
157 |
+ |
158 |
+ mycmakeargs+=( |
159 |
+ $(use androiddump && use pcap && echo -DEXTCAP_ANDROIDDUMP_LIBPCAP=yes) |
160 |
+ $(usex qt5 LRELEASE=$(qt5_get_bindir)/lrelease '') |
161 |
+ $(usex qt5 MOC=$(qt5_get_bindir)/moc '') |
162 |
+ $(usex qt5 RCC=$(qt5_get_bindir)/rcc '') |
163 |
+ $(usex qt5 UIC=$(qt5_get_bindir)/uic '') |
164 |
+ -DBUILD_androiddump=$(usex androiddump) |
165 |
+ -DBUILD_capinfos=$(usex capinfos) |
166 |
+ -DBUILD_captype=$(usex captype) |
167 |
+ -DBUILD_ciscodump=$(usex ciscodump) |
168 |
+ -DBUILD_dftest=$(usex dftest) |
169 |
+ -DBUILD_dpauxmon=$(usex dpauxmon) |
170 |
+ -DBUILD_dumpcap=$(usex dumpcap) |
171 |
+ -DBUILD_editcap=$(usex editcap) |
172 |
+ -DBUILD_mergecap=$(usex mergecap) |
173 |
+ -DBUILD_mmdbresolve=$(usex maxminddb) |
174 |
+ -DBUILD_randpkt=$(usex randpkt) |
175 |
+ -DBUILD_randpktdump=$(usex randpktdump) |
176 |
+ -DBUILD_reordercap=$(usex reordercap) |
177 |
+ -DBUILD_sdjournal=$(usex sdjournal) |
178 |
+ -DBUILD_sharkd=$(usex sharkd) |
179 |
+ -DBUILD_sshdump=$(usex sshdump) |
180 |
+ -DBUILD_text2pcap=$(usex text2pcap) |
181 |
+ -DBUILD_tfshark=$(usex tfshark) |
182 |
+ -DBUILD_tshark=$(usex tshark) |
183 |
+ -DBUILD_udpdump=$(usex udpdump) |
184 |
+ -DBUILD_wireshark=$(usex qt5) |
185 |
+ -DCMAKE_INSTALL_DOCDIR="${EROOT}/usr/share/doc/${PF}" |
186 |
+ -DDISABLE_WERROR=yes |
187 |
+ -DENABLE_BCG729=$(usex bcg729) |
188 |
+ -DENABLE_BROTLI=$(usex brotli) |
189 |
+ -DENABLE_CAP=$(usex filecaps caps) |
190 |
+ -DENABLE_GNUTLS=$(usex ssl) |
191 |
+ -DENABLE_KERBEROS=$(usex kerberos) |
192 |
+ -DENABLE_LIBXML2=$(usex libxml2) |
193 |
+ -DENABLE_LUA=$(usex lua) |
194 |
+ -DENABLE_LZ4=$(usex lz4) |
195 |
+ -DENABLE_MINIZIP=$(usex minizip) |
196 |
+ -DENABLE_NETLINK=$(usex netlink) |
197 |
+ -DENABLE_NGHTTP2=$(usex http2) |
198 |
+ -DENABLE_PCAP=$(usex pcap) |
199 |
+ -DENABLE_PLUGINS=$(usex plugins) |
200 |
+ -DENABLE_PLUGIN_IFDEMO=$(usex plugin-ifdemo) |
201 |
+ -DENABLE_SBC=$(usex sbc) |
202 |
+ -DENABLE_SMI=$(usex smi) |
203 |
+ -DENABLE_SNAPPY=$(usex snappy) |
204 |
+ -DENABLE_SPANDSP=$(usex spandsp) |
205 |
+ -DENABLE_ZLIB=$(usex zlib) |
206 |
+ -DENABLE_ZSTD=$(usex zstd) |
207 |
+ ) |
208 |
+ |
209 |
+ cmake_src_configure |
210 |
+} |
211 |
+ |
212 |
+src_test() { |
213 |
+ cmake_build test-programs |
214 |
+ |
215 |
+ myctestargs=( --disable-capture --skip-missing-programs=all --verbose ) |
216 |
+ cmake_src_test |
217 |
+} |
218 |
+ |
219 |
+src_install() { |
220 |
+ cmake_src_install |
221 |
+ |
222 |
+ # FAQ is not required as is installed from help/faq.txt |
223 |
+ dodoc AUTHORS ChangeLog NEWS README* doc/randpkt.txt doc/README* |
224 |
+ |
225 |
+ # install headers |
226 |
+ insinto /usr/include/wireshark |
227 |
+ doins ws_diag_control.h ws_symbol_export.h \ |
228 |
+ "${BUILD_DIR}"/config.h "${BUILD_DIR}"/version.h |
229 |
+ |
230 |
+ local dir dirs=( |
231 |
+ epan |
232 |
+ epan/crypt |
233 |
+ epan/dfilter |
234 |
+ epan/dissectors |
235 |
+ epan/ftypes |
236 |
+ epan/wmem |
237 |
+ wiretap |
238 |
+ wsutil |
239 |
+ ) |
240 |
+ for dir in "${dirs[@]}" |
241 |
+ do |
242 |
+ insinto /usr/include/wireshark/${dir} |
243 |
+ doins ${dir}/*.h |
244 |
+ done |
245 |
+ |
246 |
+ #with the above this really shouldn't be needed, but things may be looking |
247 |
+ # in wiretap/ instead of wireshark/wiretap/ |
248 |
+ insinto /usr/include/wiretap |
249 |
+ doins wiretap/wtap.h |
250 |
+ |
251 |
+ if use qt5; then |
252 |
+ local s |
253 |
+ for s in 16 32 48 64 128 256 512 1024; do |
254 |
+ insinto /usr/share/icons/hicolor/${s}x${s}/apps |
255 |
+ newins image/wsicon${s}.png wireshark.png |
256 |
+ done |
257 |
+ for s in 16 24 32 48 64 128 256 ; do |
258 |
+ insinto /usr/share/icons/hicolor/${s}x${s}/mimetypes |
259 |
+ newins image/WiresharkDoc-${s}.png application-vnd.tcpdump.pcap.png |
260 |
+ done |
261 |
+ fi |
262 |
+ |
263 |
+ if [[ -d "${D}"/usr/share/appdata ]]; then |
264 |
+ rm -r "${D}"/usr/share/appdata || die |
265 |
+ fi |
266 |
+} |
267 |
+ |
268 |
+pkg_postinst() { |
269 |
+ xdg_desktop_database_update |
270 |
+ xdg_icon_cache_update |
271 |
+ xdg_mimeinfo_database_update |
272 |
+ |
273 |
+ # Add group for users allowed to sniff. |
274 |
+ enewgroup wireshark |
275 |
+ chgrp wireshark "${EROOT}"/usr/bin/dumpcap |
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 |
+ xdg_desktop_database_update |
290 |
+ xdg_icon_cache_update |
291 |
+ xdg_mimeinfo_database_update |
292 |
+} |