Gentoo Archives: gentoo-commits

From: "Jeroen Roovers (jer)" <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-analyzer/wireshark: wireshark-1.6.13.ebuild ChangeLog wireshark-1.6.13-r1.ebuild wireshark-1.8.5-r1.ebuild
Date: Thu, 31 Jan 2013 15:59:28
Message-Id: 20130131155924.92A852171C@flycatcher.gentoo.org
1 jer 13/01/31 15:59:24
2
3 Modified: wireshark-1.6.13.ebuild ChangeLog
4 Added: wireshark-1.6.13-r1.ebuild
5 wireshark-1.8.5-r1.ebuild
6 Log:
7 Use fcaps.eclass.
8
9 (Portage version: 2.2.0_alpha161/cvs/Linux x86_64, signed Manifest commit with key A792A613)
10
11 Revision Changes Path
12 1.10 net-analyzer/wireshark/wireshark-1.6.13.ebuild
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/wireshark-1.6.13.ebuild?rev=1.10&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/wireshark-1.6.13.ebuild?rev=1.10&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/wireshark-1.6.13.ebuild?r1=1.9&r2=1.10
17
18 Index: wireshark-1.6.13.ebuild
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/wireshark-1.6.13.ebuild,v
21 retrieving revision 1.9
22 retrieving revision 1.10
23 diff -u -r1.9 -r1.10
24 --- wireshark-1.6.13.ebuild 31 Jan 2013 15:21:50 -0000 1.9
25 +++ wireshark-1.6.13.ebuild 31 Jan 2013 15:59:24 -0000 1.10
26 @@ -1,6 +1,6 @@
27 # Copyright 1999-2013 Gentoo Foundation
28 # Distributed under the terms of the GNU General Public License v2
29 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/wireshark-1.6.13.ebuild,v 1.9 2013/01/31 15:21:50 jer Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/wireshark-1.6.13.ebuild,v 1.10 2013/01/31 15:59:24 jer Exp $
31
32 EAPI=5
33 PYTHON_DEPEND="python? 2"
34 @@ -165,7 +165,7 @@
35 $(use_enable profile profile-build) \
36 $(use_enable threads) \
37 $(use_with caps libcap) \
38 - $(use_with crypt) \
39 + $(use_with crypt gcrypt) \
40 $(use_with geoip) \
41 $(use_with kerberos krb5) \
42 $(use_with lua) \
43
44
45
46 1.439 net-analyzer/wireshark/ChangeLog
47
48 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/ChangeLog?rev=1.439&view=markup
49 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/ChangeLog?rev=1.439&content-type=text/plain
50 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/ChangeLog?r1=1.438&r2=1.439
51
52 Index: ChangeLog
53 ===================================================================
54 RCS file: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/ChangeLog,v
55 retrieving revision 1.438
56 retrieving revision 1.439
57 diff -u -r1.438 -r1.439
58 --- ChangeLog 31 Jan 2013 15:21:50 -0000 1.438
59 +++ ChangeLog 31 Jan 2013 15:59:24 -0000 1.439
60 @@ -1,6 +1,13 @@
61 # ChangeLog for net-analyzer/wireshark
62 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
63 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/ChangeLog,v 1.438 2013/01/31 15:21:50 jer Exp $
64 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/ChangeLog,v 1.439 2013/01/31 15:59:24 jer Exp $
65 +
66 +*wireshark-1.8.5-r1 (31 Jan 2013)
67 +*wireshark-1.6.13-r1 (31 Jan 2013)
68 +
69 + 31 Jan 2013; Jeroen Roovers <jer@g.o> wireshark-1.6.13.ebuild,
70 + +wireshark-1.6.13-r1.ebuild, +wireshark-1.8.5-r1.ebuild:
71 + Use fcaps.eclass.
72
73 31 Jan 2013; Jeroen Roovers <jer@g.o> wireshark-1.6.13.ebuild,
74 wireshark-1.8.5.ebuild:
75
76
77
78 1.1 net-analyzer/wireshark/wireshark-1.6.13-r1.ebuild
79
80 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/wireshark-1.6.13-r1.ebuild?rev=1.1&view=markup
81 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/wireshark-1.6.13-r1.ebuild?rev=1.1&content-type=text/plain
82
83 Index: wireshark-1.6.13-r1.ebuild
84 ===================================================================
85 # Copyright 1999-2013 Gentoo Foundation
86 # Distributed under the terms of the GNU General Public License v2
87 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/wireshark-1.6.13-r1.ebuild,v 1.1 2013/01/31 15:59:24 jer Exp $
88
89 EAPI=5
90 PYTHON_DEPEND="python? 2"
91 inherit autotools eutils fcaps flag-o-matic python toolchain-funcs user
92
93 [[ -n ${PV#*_rc} && ${PV#*_rc} != ${PV} ]] && MY_P=${PN}-${PV/_} || MY_P=${P}
94 DESCRIPTION="A network protocol analyzer formerly known as ethereal"
95 HOMEPAGE="http://www.wireshark.org/"
96 SRC_URI="http://www.wireshark.org/download/src/all-versions/${MY_P}.tar.bz2"
97
98 LICENSE="GPL-2"
99 SLOT="0/${PV}"
100 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
101 IUSE="
102 adns doc doc-pdf gtk ipv6 libadns lua crypt geoip kerberos profile
103 +pcap portaudio python selinux smi ssl threads zlib
104 "
105 RDEPEND=">=dev-libs/glib-2.14:2
106 zlib? ( sys-libs/zlib
107 !=sys-libs/zlib-1.2.4 )
108 smi? ( net-libs/libsmi )
109 gtk? ( >=x11-libs/gtk+-2.4.0:2
110 x11-libs/pango
111 dev-libs/atk
112 x11-misc/xdg-utils )
113 ssl? ( <net-libs/gnutls-3 )
114 crypt? ( dev-libs/libgcrypt )
115 pcap? ( net-libs/libpcap )
116 kerberos? ( virtual/krb5 )
117 portaudio? ( media-libs/portaudio )
118 adns? (
119 !libadns? ( >=net-dns/c-ares-1.5 )
120 )
121 libadns? ( net-libs/adns )
122 geoip? ( dev-libs/geoip )
123 lua? ( >=dev-lang/lua-5.1 )
124 selinux? ( sec-policy/selinux-wireshark )"
125
126 DEPEND="${RDEPEND}
127 doc? ( dev-libs/libxslt
128 dev-libs/libxml2
129 app-doc/doxygen
130 doc-pdf? ( dev-java/fop ) )
131 virtual/pkgconfig
132 dev-lang/perl
133 sys-devel/bison
134 sys-apps/sed
135 sys-devel/flex
136 "
137
138 S=${WORKDIR}/${MY_P}
139
140 pkg_setup() {
141 if ! use gtk; then
142 ewarn "USE=-gtk disables gtk-based gui called wireshark."
143 ewarn "Only command line utils will be built available"
144 fi
145 if use python; then
146 python_set_active_version 2
147 python_pkg_setup
148 fi
149 }
150
151 src_prepare() {
152 epatch \
153 "${FILESDIR}"/${PN}-1.6.6-gtk-pcap.patch \
154 "${FILESDIR}"/${PN}-1.6.13-ldflags.patch
155 sed -i -e 's|.png||g' ${PN}.desktop || die
156 eautoreconf
157 }
158
159 src_configure() {
160 local myconf
161
162 if [[ $(gcc-major-version) -lt 3 ||
163 ( $(gcc-major-version) -eq 3 &&
164 $(gcc-minor-version) -le 4 ) ]] ; then
165 die "Unsupported compiler version, please upgrade."
166 fi
167
168 # profile and pie are incompatible #215806, #292991
169 if use profile; then
170 ewarn "You've enabled the 'profile' USE flag, building PIE binaries is disabled."
171 ewarn "Also ignore \"unrecognized option '-nopie'\" gcc warning #358101."
172 append-flags $(test-flags-CC -nopie)
173 fi
174
175 if use adns; then
176 if use libadns; then
177 myconf+=" --with-adns --without-c-ares"
178 else
179 myconf+=" --without-adns --with-c-ares"
180 fi
181 else
182 if use libadns; then
183 myconf+=" --with-adns --without-c-ares"
184 fi
185 fi
186
187 # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass
188 # --with-ssl to ./configure. (Mimics code from acinclude.m4).
189 if use kerberos; then
190 case `krb5-config --libs` in
191 *-lcrypto*)
192 ewarn "Kerberos was built with ssl support: linkage with openssl is enabled."
193 ewarn "Note there are annoying license incompatibilities between the OpenSSL"
194 ewarn "license and the GPL, so do your check before distributing such package."
195 myconf+=" --with-ssl"
196 ;;
197 esac
198 fi
199
200 # Hack around inability to disable doxygen/fop doc generation
201 use doc || export ac_cv_prog_HAVE_DOXYGEN=false
202 use doc-pdf || export ac_cv_prog_HAVE_FOP=false
203
204 # dumpcap requires libcap, setuid-install requires dumpcap
205 econf \
206 $(use pcap && use_enable !filecaps setuid-install) \
207 $(use pcap && use_enable filecaps setcap-install) \
208 $(use_enable gtk wireshark) \
209 $(use_enable ipv6) \
210 $(use_enable profile profile-build) \
211 $(use_enable threads) \
212 $(use_with filecaps libcap) \
213 $(use_with crypt gcrypt) \
214 $(use_with geoip) \
215 $(use_with kerberos krb5) \
216 $(use_with lua) \
217 $(use_with pcap dumpcap-group wireshark) \
218 $(use_with pcap) \
219 $(use_with portaudio) \
220 $(use_with python) \
221 $(use_with smi libsmi) \
222 $(use_with ssl gnutls) \
223 $(use_with zlib) \
224 --sysconfdir="${EPREFIX}"/etc/wireshark \
225 --disable-extra-gcc-checks \
226 ${myconf}
227 }
228
229 src_compile() {
230 default
231 use doc && cd docbook && { emake; }
232 }
233
234 src_install() {
235 default
236 if use doc; then
237 dohtml -r docbook/{release-notes.html,ws{d,u}g_html{,_chunked}}
238 if use doc-pdf; then
239 insinto /usr/share/doc/${PF}/pdf/
240 doins docbook/{{developer,user}-guide,release-notes}-{a4,us}.pdf
241 fi
242 fi
243
244 # FAQ is not required as is installed from help/faq.txt
245 dodoc AUTHORS ChangeLog NEWS README{,.bsd,.linux,.macos,.vmware} \
246 doc/{randpkt.txt,README*}
247
248 insinto /usr/include/wiretap
249 doins wiretap/wtap.h
250
251 if use gtk; then
252 for c in hi lo; do
253 for d in 16 32 48; do
254 insinto /usr/share/icons/${c}color/${d}x${d}/apps
255 newins image/${c}${d}-app-wireshark.png wireshark.png
256 done
257 done
258 domenu wireshark.desktop
259 fi
260 use pcap && chmod o-x "${ED}"/usr/bin/dumpcap #357237
261 }
262
263 pkg_postinst() {
264 # Add group for users allowed to sniff.
265 enewgroup wireshark
266
267 if use filecaps && use pcap; then
268 fcaps -o 0 -g wireshark -m 550 \
269 cap_dac_read_search,cap_net_raw,cap_net_admin \
270 "${EROOT}"/usr/bin/dumpcap
271 fi
272
273 ewarn "NOTE: To run wireshark as normal user you have to add yourself to"
274 ewarn "the wireshark group. This security measure ensures that only trusted"
275 ewarn "users are allowed to sniff your traffic."
276 }
277
278
279
280 1.1 net-analyzer/wireshark/wireshark-1.8.5-r1.ebuild
281
282 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/wireshark-1.8.5-r1.ebuild?rev=1.1&view=markup
283 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/wireshark/wireshark-1.8.5-r1.ebuild?rev=1.1&content-type=text/plain
284
285 Index: wireshark-1.8.5-r1.ebuild
286 ===================================================================
287 # Copyright 1999-2013 Gentoo Foundation
288 # Distributed under the terms of the GNU General Public License v2
289 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/wireshark/wireshark-1.8.5-r1.ebuild,v 1.1 2013/01/31 15:59:24 jer Exp $
290
291 EAPI="5"
292 PYTHON_DEPEND="python? 2"
293 inherit autotools eutils fcaps flag-o-matic python toolchain-funcs user
294
295 [[ -n ${PV#*_rc} && ${PV#*_rc} != ${PV} ]] && MY_P=${PN}-${PV/_} || MY_P=${P}
296 DESCRIPTION="A network protocol analyzer formerly known as ethereal"
297 HOMEPAGE="http://www.wireshark.org/"
298 SRC_URI="http://www.wireshark.org/download/src/all-versions/${MY_P}.tar.bz2"
299
300 LICENSE="GPL-2"
301 SLOT="0/${PV}"
302 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
303 IUSE="
304 adns doc doc-pdf geoip gtk crypt ipv6 kerberos libadns lua +pcap
305 portaudio profile python selinux smi ssl zlib
306 "
307 RDEPEND="
308 >=dev-libs/glib-2.14:2
309 zlib? ( sys-libs/zlib
310 !=sys-libs/zlib-1.2.4 )
311 smi? ( net-libs/libsmi )
312 gtk? ( >=x11-libs/gtk+-2.4.0:2
313 x11-libs/pango
314 dev-libs/atk
315 x11-misc/xdg-utils )
316 ssl? ( net-libs/gnutls dev-libs/libgcrypt )
317 crypt? ( dev-libs/libgcrypt )
318 pcap? ( net-libs/libpcap )
319 kerberos? ( virtual/krb5 )
320 portaudio? ( media-libs/portaudio )
321 adns? (
322 !libadns? ( >=net-dns/c-ares-1.5 )
323 )
324 libadns? ( net-libs/adns )
325 geoip? ( dev-libs/geoip )
326 lua? ( >=dev-lang/lua-5.1 )
327 selinux? ( sec-policy/selinux-wireshark )
328 "
329
330 DEPEND="
331 ${RDEPEND}
332 doc? ( dev-libs/libxslt
333 dev-libs/libxml2
334 app-doc/doxygen
335 doc-pdf? ( dev-java/fop ) )
336 virtual/pkgconfig
337 dev-lang/perl
338 sys-devel/bison
339 sys-apps/sed
340 sys-devel/flex
341 "
342
343 S=${WORKDIR}/${MY_P}
344
345 pkg_setup() {
346 if ! use gtk; then
347 ewarn "USE=-gtk disables gtk-based gui called wireshark."
348 ewarn "Only command line utils will be built available"
349 fi
350 if use python; then
351 python_set_active_version 2
352 python_pkg_setup
353 fi
354 }
355
356 src_prepare() {
357 epatch \
358 "${FILESDIR}"/${PN}-1.6.13-ldflags.patch \
359 "${FILESDIR}"/${PN}-1.8.3-gnutls3.patch
360 sed -i -e 's|.png||g' ${PN}.desktop || die
361 eautoreconf
362 }
363
364 src_configure() {
365 local myconf
366
367 if [[ $(gcc-major-version) -lt 3 ||
368 ( $(gcc-major-version) -eq 3 &&
369 $(gcc-minor-version) -le 4 ) ]] ; then
370 die "Unsupported compiler version, please upgrade."
371 fi
372
373 # profile and pie are incompatible #215806, #292991
374 if use profile; then
375 ewarn "You've enabled the 'profile' USE flag, building PIE binaries is disabled."
376 ewarn "Also ignore \"unrecognized option '-nopie'\" gcc warning #358101."
377 append-flags $(test-flags-CC -nopie)
378 fi
379
380 if use adns; then
381 if use libadns; then
382 myconf+=( "--with-adns --without-c-ares" )
383 else
384 myconf+=( "--without-adns --with-c-ares" )
385 fi
386 else
387 if use libadns; then
388 myconf+=( "--with-adns --without-c-ares" )
389 else
390 myconf+=( "--without-adns --without-c-ares" )
391 fi
392 fi
393 # Workaround bug #213705. If krb5-config --libs has -lcrypto then pass
394 # --with-ssl to ./configure. (Mimics code from acinclude.m4).
395 if use kerberos; then
396 case `krb5-config --libs` in
397 *-lcrypto*)
398 ewarn "Kerberos was built with ssl support: linkage with openssl is enabled."
399 ewarn "Note there are annoying license incompatibilities between the OpenSSL"
400 ewarn "license and the GPL, so do your check before distributing such package."
401 myconf+=( "--with-ssl" )
402 ;;
403 esac
404 fi
405
406 # Hack around inability to disable doxygen/fop doc generation
407 use doc || export ac_cv_prog_HAVE_DOXYGEN=false
408 use doc-pdf || export ac_cv_prog_HAVE_FOP=false
409
410 # dumpcap requires libcap, setuid-install requires dumpcap
411 econf \
412 $(use pcap && use_enable !filecaps setuid-install) \
413 $(use pcap && use_enable filecaps setcap-install) \
414 $(use_enable gtk wireshark) \
415 $(use_enable ipv6) \
416 $(use_enable profile profile-build) \
417 $(use_with filecaps libcap) \
418 $(use_with crypt gcrypt) \
419 $(use_with geoip) \
420 $(use_with kerberos krb5) \
421 $(use_with lua) \
422 $(use_with pcap dumpcap-group wireshark) \
423 $(use_with pcap) \
424 $(use_with portaudio) \
425 $(use_with python) \
426 $(use_with smi libsmi) \
427 $(use_with ssl gnutls) \
428 $(use_with zlib) \
429 --disable-extra-gcc-checks \
430 --disable-usr-local \
431 --sysconfdir="${EPREFIX}"/etc/wireshark \
432 ${myconf[@]}
433 }
434
435 src_compile() {
436 default
437 use doc && emake -C docbook
438 }
439
440 src_install() {
441 default
442 if use doc; then
443 dohtml -r docbook/{release-notes.html,ws{d,u}g_html{,_chunked}}
444 if use doc-pdf; then
445 insinto /usr/share/doc/${PF}/pdf/
446 doins docbook/{{developer,user}-guide,release-notes}-{a4,us}.pdf
447 fi
448 fi
449
450 # FAQ is not required as is installed from help/faq.txt
451 dodoc AUTHORS ChangeLog NEWS README{,.bsd,.linux,.macos,.vmware} \
452 doc/{randpkt.txt,README*}
453
454 # install headers
455 local wsheader
456 for wsheader in $( echo $(< debian/wireshark-dev.header-files ) ); do
457 insinto /usr/include/wireshark/$( dirname ${wsheader} )
458 doins ${wsheader}
459 done
460
461 #with the above this really shouldn't be needed, but things may be looking in wiretap/ instead of wireshark/wiretap/
462 insinto /usr/include/wiretap
463 doins wiretap/wtap.h
464
465 if use gtk; then
466 for c in hi lo; do
467 for d in 16 32 48; do
468 insinto /usr/share/icons/${c}color/${d}x${d}/apps
469 newins image/${c}${d}-app-wireshark.png wireshark.png
470 done
471 done
472 domenu wireshark.desktop
473 fi
474 use pcap && chmod o-x "${ED}"/usr/bin/dumpcap #357237
475 }
476
477 pkg_postinst() {
478 # Add group for users allowed to sniff.
479 enewgroup wireshark
480
481 if use filecaps && use pcap; then
482 fcaps -o 0 -g wireshark -m 550 \
483 cap_dac_read_search,cap_net_raw,cap_net_admin \
484 "${EROOT}"/usr/bin/dumpcap
485 fi
486
487 ewarn "NOTE: To run wireshark as normal user you have to add yourself to"
488 ewarn "the wireshark group. This security measure ensures that only trusted"
489 ewarn "users are allowed to sniff your traffic."
490 }