/[gentoo-x86]/sys-apps/iproute2/iproute2-2.6.29.1-r1.ebuild
Gentoo

Contents of /sys-apps/iproute2/iproute2-2.6.29.1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15 - (show annotations) (download)
Sun Jul 31 18:33:22 2011 UTC (9 years, 3 months ago) by mattst88
Branch: MAIN
Changes since 1.14: +3 -1 lines
Add missing bison and flex dependencies, bug 376343.

(Portage version: 2.1.10.3/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-2.6.29.1-r1.ebuild,v 1.14 2011/04/14 09:46:42 flameeyes Exp $
4
5 EAPI="2"
6
7 inherit eutils toolchain-funcs
8
9 if [[ ${PV} == "9999" ]] ; then
10 EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
11 inherit git
12 SRC_URI=""
13 #KEYWORDS=""
14 else
15 if [[ ${PV} == *.*.*.* ]] ; then
16 MY_PV=${PV%.*}-${PV##*.}
17 else
18 MY_PV=${PV}
19 fi
20 MY_P="${PN}-${MY_PV}"
21 SRC_URI="http://developer.osdl.org/dev/iproute2/download/${MY_P}.tar.bz2"
22 KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
23 S=${WORKDIR}/${MY_P}
24 fi
25
26 DESCRIPTION="kernel routing and traffic control utilities"
27 HOMEPAGE="http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2"
28
29 LICENSE="GPL-2"
30 SLOT="0"
31 IUSE="atm berkdb minimal"
32
33 RDEPEND="!net-misc/arpd
34 !minimal? ( berkdb? ( sys-libs/db ) )
35 atm? ( net-dialup/linux-atm )"
36 DEPEND="${RDEPEND}
37 sys-devel/bison
38 sys-devel/flex
39 elibc_glibc? ( >=sys-libs/glibc-2.7 )
40 >=sys-kernel/linux-headers-2.6.27"
41
42 src_unpack() {
43 if [[ ${PV} == "9999" ]] ; then
44 git_src_unpack
45 else
46 unpack ${A}
47 fi
48 }
49
50 src_prepare() {
51 sed -i "s:-O2:${CFLAGS} ${CPPFLAGS}:" Makefile || die "sed Makefile failed"
52
53 # build against system headers
54 rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
55
56 epatch "${FILESDIR}"/${PN}-2.6.26-ldflags.patch #236861
57 epatch "${FILESDIR}"/${PN}-2.6.29.1-flush.patch #274973
58
59 epatch_user
60
61 # don't build arpd if USE=-berkdb #81660
62 use berkdb || sed -i '/^TARGETS=/s: arpd : :' misc/Makefile
63 # Multilib fixes
64 sed -i 's:/usr/local:/usr:' tc/m_ipt.c include/iptables.h
65 sed -i "s:/usr/lib:/usr/$(get_libdir):g" \
66 netem/Makefile tc/{Makefile,tc.c,q_netem.c,m_ipt.c} include/iptables.h || die
67 sed -i "s:/lib/tc:$(get_libdir)/tc:g" tc/Makefile || die
68 # Use correct iptables dir, #144265
69 sed -i "s:/usr/local/lib/iptables:/$(get_libdir)/iptables:g" \
70 include/iptables.h
71 }
72
73 src_configure() {
74 echo -n 'TC_CONFIG_ATM:=' > Config
75 use atm \
76 && echo 'y' >> Config \
77 || echo 'n' >> Config
78
79 use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc:' Makefile
80 }
81
82 src_compile() {
83 emake \
84 CC="$(tc-getCC)" \
85 AR="$(tc-getAR)" \
86 || die "make failed"
87 }
88
89 src_install() {
90 if use minimal ; then
91 into /
92 dosbin tc/tc || die "minimal"
93 return 0
94 fi
95
96 emake \
97 DESTDIR="${D}" \
98 SBINDIR=/sbin \
99 DOCDIR=/usr/share/doc/${PF} \
100 MANDIR=/usr/share/man \
101 install \
102 || die "make install failed"
103 if use berkdb ; then
104 dodir /var/lib/arpd
105 # bug 47482, arpd doesn't need to be in /sbin
106 dodir /usr/sbin
107 mv "${D}"/sbin/arpd "${D}"/usr/sbin/
108 fi
109 }

  ViewVC Help
Powered by ViewVC 1.1.20