1 |
commit: 5edb4955a5eda3a8e56786f5a4f543e14b5710a5 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jun 30 19:13:09 2016 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jun 30 19:23:58 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5edb4955 |
7 |
|
8 |
net-analyzer/wireshark: Version bump. |
9 |
|
10 |
Package-Manager: portage-2.3.0 |
11 |
|
12 |
net-analyzer/wireshark/Manifest | 1 + |
13 |
.../files/wireshark-2.1.0-sse4_2-r1.patch | 21 ++ |
14 |
net-analyzer/wireshark/wireshark-2.1.0.ebuild | 267 +++++++++++++++++++++ |
15 |
3 files changed, 289 insertions(+) |
16 |
|
17 |
diff --git a/net-analyzer/wireshark/Manifest b/net-analyzer/wireshark/Manifest |
18 |
index f8b92b2..7d5f2d5 100644 |
19 |
--- a/net-analyzer/wireshark/Manifest |
20 |
+++ b/net-analyzer/wireshark/Manifest |
21 |
@@ -1,3 +1,4 @@ |
22 |
DIST wireshark-2.0.2.tar.bz2 31073440 SHA256 e921fb072085a5654d899949bb561d0687f4819f7b63ba35777bb949a9b6b9c1 SHA512 a3645f0c2600091d3af76d12db4b73f83e6af4686a1bd7a336a420e4d7505ed281dfabb05c05cd6f58084fa3f25b6b9014b6f273b875c713ee39c77b4c5c715f WHIRLPOOL 4041698412d96ce495e2b564c897b4d770eea1851e431b43b2ef1bc6834bf57460ace5cc2e3f9ae6e05babbbec85e096ee1a87bc68211677202215c4dd0b53e5 |
23 |
DIST wireshark-2.0.3.tar.bz2 31110988 SHA256 e196376e75fe21fdef41b4eaa27ce2e1b2b561e7f7b20328a8e96657cc4465fc SHA512 37d64b5f84249f263eae3159794450f642857c91d4fffe483cd562fa8abc93cc8a3152f66ca6b6230b2990e36c28a4ffbf696ff630058990154946eed457f076 WHIRLPOOL 7bb07556b047e9bee0ef7eac7a42dd47c32d93a44dde4abc0bff946e06f8f3685c273707246f9429f32a4d8802a1912a29078aceb78a712a171691ccdccf2831 |
24 |
DIST wireshark-2.0.4.tar.bz2 31121258 SHA256 9ea9c82da9942194ebc8fc5c951a02e6d179afa7472cb6d96ca76154510de1a5 SHA512 f86c41ba9fb25ea61f3947819676417f7af64301cdd37c91666d59b179c45d76c1d0e8739ef6bcf3bb077d3216a65458b3d56755dd08f1fb05cc87cb810f8a07 WHIRLPOOL 2a495221cc1e28283ca19c181fb531fbd01194dd9a0ce9ab6df2a50ce0e19dc21ff5fe023d08a88ebcbb2bfe2a55d47e173401bc09ff8f5356e695fb4cacb12b |
25 |
+DIST wireshark-2.1.0.tar.bz2 32605482 SHA256 f73bd7660056c0910c8a89f480f61ab9fe62866eadf1af49e3374da3fe16b4cc SHA512 9882014f4cb4f78034c4471f7667f9accdc32dd4c22b8ea799da7a0f2ad1bb7aaa47308ece503cd4e1955903138c06f219f309c8c6216f64d1e9c8747f118154 WHIRLPOOL 0ba0cca898bf4f302fabbe0f8dbc0fb7ff050c4dfb988d9d9622b97ae48fc3ca342f260136b1d2fc667407633817c09f5b5d7624081c2c59bdf7559339f03164 |
26 |
|
27 |
diff --git a/net-analyzer/wireshark/files/wireshark-2.1.0-sse4_2-r1.patch b/net-analyzer/wireshark/files/wireshark-2.1.0-sse4_2-r1.patch |
28 |
new file mode 100644 |
29 |
index 0000000..8efe5af |
30 |
--- /dev/null |
31 |
+++ b/net-analyzer/wireshark/files/wireshark-2.1.0-sse4_2-r1.patch |
32 |
@@ -0,0 +1,21 @@ |
33 |
+--- a/configure.ac |
34 |
++++ b/configure.ac |
35 |
+@@ -818,6 +818,7 @@ |
36 |
+ AC_SUBST(PIE_CFLAGS) |
37 |
+ AC_SUBST(PIE_LDFLAGS) |
38 |
+ |
39 |
++AC_ARG_ENABLE(sse4_2,[ --enable-sse4_2 Support SSE4.2 (Streaming SIMD Extensions 4.2) instructions],[ |
40 |
+ WS_CFLAGS_saved="$WS_CFLAGS" |
41 |
+ AC_WIRESHARK_COMPILER_FLAGS_CHECK(-msse4.2, C) |
42 |
+ if test "x$can_add_to_cflags" = "xyes" |
43 |
+@@ -844,6 +845,10 @@ |
44 |
+ ac_sse4_2_flag=-xarch=sse4_2 |
45 |
+ fi |
46 |
+ fi |
47 |
++],[ |
48 |
++AC_MSG_RESULT(no) |
49 |
++]) |
50 |
++ |
51 |
+ WS_CFLAGS="$WS_CFLAGS_saved" |
52 |
+ |
53 |
+ if test "x$ac_sse4_2_flag" != x; then |
54 |
|
55 |
diff --git a/net-analyzer/wireshark/wireshark-2.1.0.ebuild b/net-analyzer/wireshark/wireshark-2.1.0.ebuild |
56 |
new file mode 100644 |
57 |
index 0000000..3b74b0b |
58 |
--- /dev/null |
59 |
+++ b/net-analyzer/wireshark/wireshark-2.1.0.ebuild |
60 |
@@ -0,0 +1,267 @@ |
61 |
+# Copyright 1999-2016 Gentoo Foundation |
62 |
+# Distributed under the terms of the GNU General Public License v2 |
63 |
+# $Id$ |
64 |
+ |
65 |
+EAPI=5 |
66 |
+inherit autotools eutils fcaps flag-o-matic multilib qmake-utils qt4-r2 user |
67 |
+ |
68 |
+DESCRIPTION="A network protocol analyzer formerly known as ethereal" |
69 |
+HOMEPAGE="http://www.wireshark.org/" |
70 |
+SRC_URI="${HOMEPAGE}download/src/all-versions/${P/_/}.tar.bz2" |
71 |
+ |
72 |
+LICENSE="GPL-2" |
73 |
+SLOT="0/${PV}" |
74 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" |
75 |
+IUSE=" |
76 |
+ adns androiddump +caps crypt doc doc-pdf geoip +gtk3 ipv6 kerberos lua |
77 |
+ +netlink +pcap portaudio +qt4 qt5 selinux sbc smi tfshark |
78 |
+ cpu_flags_x86_sse4_2 ssl zlib |
79 |
+" |
80 |
+REQUIRED_USE=" |
81 |
+ ssl? ( crypt ) |
82 |
+ ?? ( qt4 qt5 ) |
83 |
+" |
84 |
+ |
85 |
+S=${WORKDIR}/${P/_/} |
86 |
+ |
87 |
+GTK_COMMON_DEPEND=" |
88 |
+ x11-libs/gdk-pixbuf |
89 |
+ x11-libs/pango |
90 |
+ x11-misc/xdg-utils |
91 |
+" |
92 |
+CDEPEND=" |
93 |
+ >=dev-libs/glib-2.14:2 |
94 |
+ netlink? ( dev-libs/libnl:3 ) |
95 |
+ adns? ( >=net-dns/c-ares-1.5 ) |
96 |
+ crypt? ( dev-libs/libgcrypt:0 ) |
97 |
+ caps? ( sys-libs/libcap ) |
98 |
+ geoip? ( dev-libs/geoip ) |
99 |
+ gtk3? ( |
100 |
+ ${GTK_COMMON_DEPEND} |
101 |
+ x11-libs/gtk+:3 |
102 |
+ ) |
103 |
+ kerberos? ( virtual/krb5 ) |
104 |
+ lua? ( >=dev-lang/lua-5.1:* ) |
105 |
+ pcap? ( net-libs/libpcap ) |
106 |
+ portaudio? ( media-libs/portaudio ) |
107 |
+ qt4? ( |
108 |
+ dev-qt/qtcore:4 |
109 |
+ dev-qt/qtgui:4[accessibility] |
110 |
+ x11-misc/xdg-utils |
111 |
+ ) |
112 |
+ qt5? ( |
113 |
+ dev-qt/qtcore:5 |
114 |
+ dev-qt/qtgui:5 |
115 |
+ dev-qt/qtmultimedia:5 |
116 |
+ dev-qt/qtprintsupport:5 |
117 |
+ dev-qt/qtwidgets:5 |
118 |
+ x11-misc/xdg-utils |
119 |
+ ) |
120 |
+ sbc? ( media-libs/sbc ) |
121 |
+ smi? ( net-libs/libsmi ) |
122 |
+ ssl? ( net-libs/gnutls:= ) |
123 |
+ zlib? ( sys-libs/zlib !=sys-libs/zlib-1.2.4 ) |
124 |
+" |
125 |
+# We need perl for `pod2html`. The rest of the perl stuff is to block older |
126 |
+# and broken installs. #455122 |
127 |
+DEPEND=" |
128 |
+ ${CDEPEND} |
129 |
+ dev-lang/perl |
130 |
+ !<virtual/perl-Pod-Simple-3.170 |
131 |
+ !<perl-core/Pod-Simple-3.170 |
132 |
+ doc? ( |
133 |
+ app-doc/doxygen |
134 |
+ app-text/asciidoc |
135 |
+ dev-libs/libxml2 |
136 |
+ dev-libs/libxslt |
137 |
+ doc-pdf? ( dev-java/fop ) |
138 |
+ www-client/lynx |
139 |
+ ) |
140 |
+ sys-devel/bison |
141 |
+ sys-devel/flex |
142 |
+ virtual/pkgconfig |
143 |
+" |
144 |
+RDEPEND=" |
145 |
+ ${CDEPEND} |
146 |
+ gtk3? ( virtual/freedesktop-icon-theme ) |
147 |
+ qt4? ( virtual/freedesktop-icon-theme ) |
148 |
+ qt5? ( virtual/freedesktop-icon-theme ) |
149 |
+ selinux? ( sec-policy/selinux-wireshark ) |
150 |
+" |
151 |
+ |
152 |
+pkg_setup() { |
153 |
+ enewgroup wireshark |
154 |
+} |
155 |
+ |
156 |
+src_prepare() { |
157 |
+ epatch \ |
158 |
+ "${FILESDIR}"/${PN}-1.99.8-qtchooser.patch \ |
159 |
+ "${FILESDIR}"/${PN}-2.1.0-sse4_2-r1.patch \ |
160 |
+ "${FILESDIR}"/${PN}-99999999-androiddump.patch |
161 |
+ |
162 |
+ epatch_user |
163 |
+ |
164 |
+ eautoreconf |
165 |
+} |
166 |
+ |
167 |
+src_configure() { |
168 |
+ local myconf |
169 |
+ |
170 |
+ # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass |
171 |
+ # --with-ssl to ./configure. (Mimics code from acinclude.m4). |
172 |
+ if use kerberos; then |
173 |
+ case $(krb5-config --libs) in |
174 |
+ *-lcrypto*) |
175 |
+ ewarn "Kerberos was built with ssl support: linkage with openssl is enabled." |
176 |
+ ewarn "Note there are annoying license incompatibilities between the OpenSSL" |
177 |
+ ewarn "license and the GPL, so do your check before distributing such package." |
178 |
+ myconf+=( "--with-ssl" ) |
179 |
+ ;; |
180 |
+ esac |
181 |
+ fi |
182 |
+ |
183 |
+ # Enable wireshark binary with any supported GUI toolkit (bug #473188) |
184 |
+ if use gtk3 || use qt4 || use qt5; then |
185 |
+ myconf+=( "--enable-wireshark" ) |
186 |
+ else |
187 |
+ myconf+=( "--disable-wireshark" ) |
188 |
+ fi |
189 |
+ |
190 |
+ if ! use qt4 && ! use qt5; then |
191 |
+ myconf+=( "--with-qt=no" ) |
192 |
+ fi |
193 |
+ |
194 |
+ if use qt4; then |
195 |
+ export QT_MIN_VERSION=4.6.0 |
196 |
+ fi |
197 |
+ |
198 |
+ if use qt5; then |
199 |
+ export QT_MIN_VERSION=5.3.0 |
200 |
+ append-cxxflags -fPIC -DPIC |
201 |
+ fi |
202 |
+ |
203 |
+ # Hack around inability to disable doxygen/fop doc generation |
204 |
+ use doc || export ac_cv_prog_HAVE_DOXYGEN=false |
205 |
+ use doc-pdf || export ac_cv_prog_HAVE_FOP=false |
206 |
+ |
207 |
+ # dumpcap requires libcap |
208 |
+ # --disable-profile-build bugs #215806, #292991, #479602 |
209 |
+ econf \ |
210 |
+ $(use androiddump && use pcap && echo --enable-androiddump-use-libpcap=yes) \ |
211 |
+ $(use_enable androiddump) \ |
212 |
+ $(use_enable ipv6) \ |
213 |
+ $(use_enable tfshark) \ |
214 |
+ $(use_with adns c-ares) \ |
215 |
+ $(use_with caps libcap) \ |
216 |
+ $(use_with crypt gcrypt) \ |
217 |
+ $(use_with geoip) \ |
218 |
+ $(use_with gtk3) \ |
219 |
+ $(use_with kerberos krb5) \ |
220 |
+ $(use_with lua) \ |
221 |
+ $(use_with pcap dumpcap-group wireshark) \ |
222 |
+ $(use_with pcap) \ |
223 |
+ $(use_with portaudio) \ |
224 |
+ $(usex qt4 --with-qt=4 '') \ |
225 |
+ $(usex qt5 --with-qt=5 '') \ |
226 |
+ $(usex qt4 MOC=$(qt4_get_bindir)/moc '') \ |
227 |
+ $(usex qt4 RCC=$(qt4_get_bindir)/rcc '') \ |
228 |
+ $(usex qt4 UIC=$(qt4_get_bindir)/uic '') \ |
229 |
+ $(usex qt5 MOC=$(qt5_get_bindir)/moc '') \ |
230 |
+ $(usex qt5 RCC=$(qt5_get_bindir)/rcc '') \ |
231 |
+ $(usex qt5 UIC=$(qt5_get_bindir)/uic '') \ |
232 |
+ $(use_with sbc) \ |
233 |
+ $(use_with smi libsmi) \ |
234 |
+ $(use_with ssl gnutls) \ |
235 |
+ $(use_with zlib) \ |
236 |
+ $(usex netlink --with-libnl=3 --without-libnl) \ |
237 |
+ $(usex cpu_flags_x86_sse4_2 --enable-sse4_2 '') \ |
238 |
+ --disable-profile-build \ |
239 |
+ --disable-usr-local \ |
240 |
+ --disable-warnings-as-errors \ |
241 |
+ --sysconfdir="${EPREFIX}"/etc/wireshark \ |
242 |
+ --without-adns \ |
243 |
+ ${myconf[@]} |
244 |
+} |
245 |
+ |
246 |
+src_compile() { |
247 |
+ default |
248 |
+ if use doc; then |
249 |
+ emake -j1 -C docbook |
250 |
+ if use doc-pdf; then |
251 |
+ addpredict "/root/.java" |
252 |
+ emake -C docbook all-pdf |
253 |
+ fi |
254 |
+ fi |
255 |
+ |
256 |
+} |
257 |
+ |
258 |
+src_install() { |
259 |
+ default |
260 |
+ |
261 |
+ if use doc; then |
262 |
+ dohtml -r docbook/{release-notes.html,ws{d,u}g_html{,_chunked}} |
263 |
+ if use doc-pdf; then |
264 |
+ insinto /usr/share/doc/${PF}/pdf/ |
265 |
+ doins docbook/{developer,user}-guide-{a4,us}.pdf docbook/release-notes.pdf |
266 |
+ fi |
267 |
+ fi |
268 |
+ |
269 |
+ # FAQ is not required as is installed from help/faq.txt |
270 |
+ dodoc AUTHORS ChangeLog NEWS README{,.bsd,.linux,.macos,.vmware} \ |
271 |
+ doc/{randpkt.txt,README*} |
272 |
+ |
273 |
+ # install headers |
274 |
+ local wsheader |
275 |
+ for wsheader in \ |
276 |
+ color.h \ |
277 |
+ config.h \ |
278 |
+ epan/*.h \ |
279 |
+ epan/crypt/*.h \ |
280 |
+ epan/dfilter/*.h \ |
281 |
+ epan/dissectors/*.h \ |
282 |
+ epan/ftypes/*.h \ |
283 |
+ epan/wmem/*.h \ |
284 |
+ register.h \ |
285 |
+ wiretap/*.h \ |
286 |
+ ws_symbol_export.h \ |
287 |
+ wsutil/*.h |
288 |
+ do |
289 |
+ insinto /usr/include/wireshark/$( dirname ${wsheader} ) |
290 |
+ doins ${wsheader} |
291 |
+ done |
292 |
+ |
293 |
+ #with the above this really shouldn't be needed, but things may be looking in wiretap/ instead of wireshark/wiretap/ |
294 |
+ insinto /usr/include/wiretap |
295 |
+ doins wiretap/wtap.h |
296 |
+ |
297 |
+ if use gtk3 || use qt4 || use qt5; then |
298 |
+ local c d |
299 |
+ for c in hi lo; do |
300 |
+ for d in 16 32 48; do |
301 |
+ insinto /usr/share/icons/${c}color/${d}x${d}/apps |
302 |
+ newins image/${c}${d}-app-wireshark.png wireshark.png |
303 |
+ done |
304 |
+ done |
305 |
+ for d in 16 24 32 48 64 128 256 ; do |
306 |
+ insinto /usr/share/icons/hicolor/${d}x${d}/mimetypes |
307 |
+ newins image/WiresharkDoc-${d}.png application-vnd.tcpdump.pcap.png |
308 |
+ done |
309 |
+ fi |
310 |
+ |
311 |
+ prune_libtool_files |
312 |
+} |
313 |
+ |
314 |
+pkg_postinst() { |
315 |
+ # Add group for users allowed to sniff. |
316 |
+ enewgroup wireshark |
317 |
+ |
318 |
+ if use pcap; then |
319 |
+ fcaps -o 0 -g wireshark -m 4710 -M 0710 \ |
320 |
+ cap_dac_read_search,cap_net_raw,cap_net_admin \ |
321 |
+ "${EROOT}"/usr/bin/dumpcap |
322 |
+ fi |
323 |
+ |
324 |
+ ewarn "NOTE: To capture traffic with wireshark as normal user you have to" |
325 |
+ ewarn "add yourself to the wireshark group. This security measure ensures" |
326 |
+ ewarn "that only trusted users are allowed to sniff your traffic." |
327 |
+} |