Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/mtr/
Date: Sat, 04 Feb 2017 21:16:15
Message-Id: 1486242956.e5099643edcd981586507f486a885fd797cd7be3.grobian@gentoo
1 commit: e5099643edcd981586507f486a885fd797cd7be3
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 4 21:15:03 2017 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 4 21:15:56 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5099643
7
8 net-analyzer/mtr: fix filecaps problem in Prefix, bug #599604
9
10 Package-Manager: portage-2.3.3
11
12 net-analyzer/mtr/mtr-0.87-r1.ebuild | 60 +++++++++++++++++++++++++++++++++++++
13 net-analyzer/mtr/mtr-9999.ebuild | 10 ++++++-
14 2 files changed, 69 insertions(+), 1 deletion(-)
15
16 diff --git a/net-analyzer/mtr/mtr-0.87-r1.ebuild b/net-analyzer/mtr/mtr-0.87-r1.ebuild
17 new file mode 100644
18 index 00000000..50bfe44
19 --- /dev/null
20 +++ b/net-analyzer/mtr/mtr-0.87-r1.ebuild
21 @@ -0,0 +1,60 @@
22 +# Copyright 1999-2017 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +# $Id$
25 +
26 +EAPI=6
27 +inherit autotools eutils fcaps flag-o-matic
28 +
29 +DESCRIPTION="My TraceRoute, an Excellent network diagnostic tool"
30 +HOMEPAGE="http://www.bitwizard.nl/mtr/"
31 +SRC_URI="ftp://ftp.bitwizard.nl/mtr/${P}.tar.gz"
32 +
33 +LICENSE="GPL-2"
34 +SLOT="0"
35 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
36 +IUSE="gtk ipv6"
37 +
38 +RDEPEND="
39 + sys-libs/ncurses:0=
40 + gtk? (
41 + dev-libs/glib:2
42 + x11-libs/gtk+:2
43 + )
44 +"
45 +DEPEND="
46 + ${RDEPEND}
47 + sys-devel/autoconf
48 + virtual/pkgconfig
49 +"
50 +
51 +DOCS=( AUTHORS FORMATS NEWS README SECURITY TODO )
52 +FILECAPS=( cap_net_raw usr/sbin/mtr )
53 +PATCHES=(
54 + "${FILESDIR}"/${PN}-0.80-impl-dec.patch
55 + "${FILESDIR}"/${PN}-0.87-ipv6.patch
56 + "${FILESDIR}"/${PN}-0.87-tinfo.patch
57 +)
58 +
59 +src_prepare() {
60 + default
61 + eautoreconf
62 +}
63 +
64 +src_configure() {
65 + # In the source's configure script -lresolv is commented out. Apparently it
66 + # is needed for 64bit macos still.
67 + [[ ${CHOST} == *-darwin* ]] && append-libs -lresolv
68 +
69 + econf \
70 + $(use_enable ipv6) \
71 + $(use_with gtk) \
72 + --disable-gtktest
73 +}
74 +
75 +pkg_postinst() {
76 + if use prefix && [[ ${CHOST} == *-darwin* ]] ; then
77 + ewarn "mtr needs root privileges to run. To grant them:"
78 + ewarn " % sudo chown root ${EPREFIX}/usr/sbin/mtr"
79 + ewarn " % sudo chmod u+s ${EPREFIX}/usr/sbin/mtr"
80 + fi
81 +}
82
83 diff --git a/net-analyzer/mtr/mtr-9999.ebuild b/net-analyzer/mtr/mtr-9999.ebuild
84 index 797b07c..47d97b0 100644
85 --- a/net-analyzer/mtr/mtr-9999.ebuild
86 +++ b/net-analyzer/mtr/mtr-9999.ebuild
87 @@ -29,7 +29,7 @@ DEPEND="
88 "
89
90 DOCS=( AUTHORS FORMATS NEWS README SECURITY TODO )
91 -FILECAPS=( cap_net_raw /usr/sbin/mtr )
92 +FILECAPS=( cap_net_raw usr/sbin/mtr )
93 PATCHES=(
94 "${FILESDIR}"/${PN}-9999-tinfo.patch
95 )
96 @@ -58,3 +58,11 @@ src_configure() {
97 $(use_with gtk) \
98 $(use_with ncurses)
99 }
100 +
101 +pkg_postinst() {
102 + if use prefix && [[ ${CHOST} == *-darwin* ]] ; then
103 + ewarn "mtr needs root privileges to run. To grant them:"
104 + ewarn " % sudo chown root ${EPREFIX}/usr/sbin/mtr"
105 + ewarn " % sudo chmod u+s ${EPREFIX}/usr/sbin/mtr"
106 + fi
107 +}