| 1 | # Copyright 1999-2011 Gentoo Foundation |
1 | # Copyright 1999-2013 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/iputils-99999999.ebuild,v 1.6 2011/11/09 22:34:11 vapier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/iputils-99999999.ebuild,v 1.7 2013/01/25 05:28:28 vapier Exp $ |
| 4 | |
4 | |
| 5 | # For released versions, we precompile the man/html pages and store |
5 | # For released versions, we precompile the man/html pages and store |
| 6 | # them in a tarball on our mirrors. This avoids ugly issues while |
6 | # them in a tarball on our mirrors. This avoids ugly issues while |
| 7 | # building stages, and when the jade/sgml packages are broken (which |
7 | # building stages, and when the jade/sgml packages are broken (which |
| 8 | # seems to be more common than would be nice). |
8 | # seems to be more common than would be nice). |
| 9 | |
9 | |
| 10 | EAPI="2" |
10 | EAPI="4" |
| 11 | |
11 | |
| 12 | inherit flag-o-matic eutils toolchain-funcs |
12 | inherit flag-o-matic eutils toolchain-funcs |
| 13 | if [[ ${PV} == "99999999" ]] ; then |
13 | if [[ ${PV} == "99999999" ]] ; then |
| 14 | EGIT_REPO_URI="git://www.linux-ipv6.org/gitroot/iputils" |
14 | EGIT_REPO_URI="git://www.linux-ipv6.org/gitroot/iputils" |
| 15 | inherit git-2 |
15 | inherit git-2 |
| … | |
… | |
| 18 | mirror://gentoo/iputils-s${PV}-manpages.tar.bz2" |
18 | mirror://gentoo/iputils-s${PV}-manpages.tar.bz2" |
| 19 | KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux" |
19 | KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux" |
| 20 | fi |
20 | fi |
| 21 | |
21 | |
| 22 | DESCRIPTION="Network monitoring tools including ping and ping6" |
22 | DESCRIPTION="Network monitoring tools including ping and ping6" |
| 23 | HOMEPAGE="http://www.linux-foundation.org/en/Net:Iputils" |
23 | HOMEPAGE="http://www.linuxfoundation.org/collaborate/workgroups/networking/iputils" |
| 24 | |
24 | |
| 25 | LICENSE="BSD" |
25 | LICENSE="BSD" |
| 26 | SLOT="0" |
26 | SLOT="0" |
| 27 | IUSE="doc idn ipv6 SECURITY_HAZARD ssl static" |
27 | IUSE="caps doc gnutls idn ipv6 SECURITY_HAZARD ssl static" |
| 28 | |
28 | |
| 29 | RDEPEND="!net-misc/rarpd |
29 | RDEPEND="!net-misc/rarpd |
|
|
30 | caps? ( sys-libs/libcap ) |
|
|
31 | gnutls? ( net-libs/gnutls ) |
| 30 | ssl? ( dev-libs/openssl ) |
32 | ssl? ( dev-libs/openssl ) |
| 31 | idn? ( net-dns/libidn )" |
33 | idn? ( net-dns/libidn )" |
| 32 | DEPEND="${RDEPEND} |
34 | DEPEND="${RDEPEND} |
| 33 | virtual/os-headers" |
35 | virtual/os-headers" |
| 34 | if [[ ${PV} == "99999999" ]] ; then |
36 | if [[ ${PV} == "99999999" ]] ; then |
| … | |
… | |
| 42 | |
44 | |
| 43 | S=${WORKDIR}/${PN}-s${PV} |
45 | S=${WORKDIR}/${PN}-s${PV} |
| 44 | |
46 | |
| 45 | src_prepare() { |
47 | src_prepare() { |
| 46 | epatch "${FILESDIR}"/021109-uclibc-no-ether_ntohost.patch |
48 | epatch "${FILESDIR}"/021109-uclibc-no-ether_ntohost.patch |
| 47 | epatch "${FILESDIR}"/${PN}-20100418-openssl.patch #335436 |
49 | epatch "${FILESDIR}"/${PN}-20121221-openssl.patch #335436 |
| 48 | epatch "${FILESDIR}"/${PN}-20100418-so_mark.patch #335347 |
50 | epatch "${FILESDIR}"/${PN}-20100418-so_mark.patch #335347 |
| 49 | epatch "${FILESDIR}"/${PN}-20100418-makefile.patch |
51 | epatch "${FILESDIR}"/${PN}-20121221-makefile.patch |
| 50 | epatch "${FILESDIR}"/${PN}-20100418-proper-libs.patch #332703 |
|
|
| 51 | epatch "${FILESDIR}"/${PN}-20100418-printf-size.patch |
52 | epatch "${FILESDIR}"/${PN}-20121221-printf-size.patch |
| 52 | epatch "${FILESDIR}"/${PN}-20100418-aliasing.patch |
|
|
| 53 | epatch "${FILESDIR}"/${PN}-20071127-kernel-ifaddr.patch |
|
|
| 54 | epatch "${FILESDIR}"/${PN}-20070202-idn.patch #218638 |
|
|
| 55 | epatch "${FILESDIR}"/${PN}-20071127-infiniband.patch #377687 |
|
|
| 56 | epatch "${FILESDIR}"/${PN}-20101006-owl-pingsock.diff |
53 | epatch "${FILESDIR}"/${PN}-20121221-owl-pingsock.diff |
| 57 | use SECURITY_HAZARD && epatch "${FILESDIR}"/${PN}-20071127-nonroot-floodping.patch |
54 | use SECURITY_HAZARD && epatch "${FILESDIR}"/${PN}-20071127-nonroot-floodping.patch |
| 58 | use static && append-ldflags -static |
55 | use static && append-ldflags -static |
| 59 | use ssl && append-cppflags -DHAVE_OPENSSL |
|
|
| 60 | use ipv6 || sed -i -e 's:IPV6_TARGETS=:#IPV6_TARGETS=:' Makefile |
|
|
| 61 | export IDN=$(use idn && echo yes) |
|
|
| 62 | } |
56 | } |
| 63 | |
57 | |
| 64 | src_compile() { |
58 | src_compile() { |
| 65 | tc-export CC |
59 | tc-export CC |
| 66 | emake || die |
60 | emake \ |
|
|
61 | USE_CAP=$(usex caps) \ |
|
|
62 | USE_IDN=$(usex idn) \ |
|
|
63 | USE_GNUTLS=$(usex gnutls) \ |
|
|
64 | USE_CRYPTO=$(usex ssl) \ |
|
|
65 | $(use ipv6 || echo IPV6_TARGETS=) |
| 67 | |
66 | |
| 68 | if [[ ${PV} == "99999999" ]] ; then |
67 | if [[ ${PV} == "99999999" ]] ; then |
| 69 | emake -j1 html man || die |
68 | emake -j1 html man |
| 70 | fi |
69 | fi |
| 71 | } |
70 | } |
| 72 | |
71 | |
| 73 | src_install() { |
72 | src_install() { |
| 74 | into / |
73 | into / |
| 75 | dobin ping || die |
74 | dobin ping |
| 76 | use ipv6 && dobin ping6 |
75 | use ipv6 && dobin ping6 |
| 77 | dosbin arping || die |
76 | dosbin arping |
| 78 | into /usr |
77 | into /usr |
| 79 | dosbin tracepath || die |
78 | dosbin tracepath |
| 80 | use ipv6 && dosbin trace{path,route}6 |
79 | use ipv6 && dosbin trace{path,route}6 |
| 81 | dosbin clockdiff rarpd rdisc ipg tftpd || die |
80 | dosbin clockdiff rarpd rdisc ipg tftpd |
| 82 | |
81 | |
| 83 | fperms 4711 /bin/ping |
82 | fperms 4711 /bin/ping |
| 84 | use ipv6 && fperms 4711 /bin/ping6 /usr/sbin/traceroute6 |
83 | use ipv6 && fperms 4711 /bin/ping6 /usr/sbin/traceroute6 |
| 85 | |
84 | |
| 86 | dodoc INSTALL RELNOTES |
85 | dodoc INSTALL RELNOTES |