summaryrefslogtreecommitdiff
blob: e301e34cd53c427130e5fc3a8ea8a0faa5581e38 (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
# 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-r3.ebuild,v 1.5 2006/03/01 02:01:44 vanquirius Exp $

inherit eutils flag-o-matic

MY_P="${PN}-${PV/_p/a}"
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="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
IUSE="static"

DEPEND=""

S="${WORKDIR}/${MY_P}"

src_unpack() {
	unpack ${A}
	cd "${S}"

	# nasty hack until bug 93363 is fixed
	chmod 644 config.{guess,sub}

	epatch "${WORKDIR}"/traceroute-1.4-target-resolv.patch
	epatch "${WORKDIR}"/traceroute-1.4a12-LDFLAGS.patch
	epatch "${WORKDIR}"/traceroute-1.4a5-bigpacklen.patch
	epatch "${WORKDIR}"/traceroute-1.4a12.patch
	epatch "${WORKDIR}"/traceroute-1.4a5-droproot.patch
	epatch "${WORKDIR}"/traceroute-1.4a5-llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch.patch
	epatch "${WORKDIR}"/traceroute-1.4a5-secfix.patch
	epatch "${WORKDIR}"/traceroute-1.4a5-unaligned.patch
	epatch "${WORKDIR}"/traceroute-1.4-emptylabel.patch

	# assume linux by default #26699
	sed -i '/^t=/s:generic:linux:' configure

	use static && append-ldflags -static
	append-ldflags $(bindnow-flags) -Wl,-z,relro
}

src_install() {
	dosbin traceroute || die "dosbin"
	fowners root:wheel /usr/sbin/traceroute
	fperms 4711 /usr/sbin/traceroute

	doman traceroute.8
	dodoc CHANGES
}