summaryrefslogtreecommitdiff
blob: 86c0a96f05172528394297bf3c2f8fcce6421245 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/traceroute/traceroute-1.4_p12-r2.ebuild,v 1.12 2006/03/01 02:01:44 vanquirius Exp $

inherit eutils gnuconfig flag-o-matic

MY_P="${PN}-1.4a12"
S="${WORKDIR}/${MY_P}"
DESCRIPTION="Utility to trace the route of IP packets"
HOMEPAGE="http://ee.lbl.gov/"
SRC_URI="ftp://ee.lbl.gov/${MY_P}.tar.gz
	mirror://gentoo/${PN}-1.4-genpatches.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="x86 ppc sparc mips alpha arm amd64 ppc64 ia64 hppa"
IUSE=""

RDEPEND="virtual/libc"
DEPEND="${RDEPEND}
	sys-devel/autoconf
	>=sys-apps/sed-4"

src_unpack() {
	unpack ${A}
	cd "${S}"
	use sparc && epatch "${WORKDIR}"/traceroute-1.4a12.patch
	epatch "${WORKDIR}"/traceroute-1.4-target-resolv.patch
}

src_compile() {
	# fixes bug #21122
	# -taviso
	gnuconfig_update

	# use non-lazy bindings for this suid app
	append-ldflags -Wl,-z,now

	# assume linux by default #26699
	# -taviso
	sed -i 's/t="generic"/t="linux"/g' "${S}"/configure.in
	autoreconf

	econf || die
	emake LIBS="${LDFLAGS}" || die
}

src_install() {
	dodir /usr/sbin
	make DESTDIR="${D}" install || die
	fowners root:wheel /usr/sbin/traceroute
	fperms 4710 /usr/sbin/traceroute

	doman traceroute.8
	dodoc CHANGES
}