/[gentoo-x86]/sys-apps/iproute2/iproute2-2.6.35-r2.ebuild
Gentoo

Contents of /sys-apps/iproute2/iproute2-2.6.35-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Sun Jul 31 18:33:22 2011 UTC (9 years, 3 months ago) by mattst88
Branch: MAIN
Changes since 1.9: +2 -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.35-r2.ebuild,v 1.9 2011/04/14 09:46:42 flameeyes Exp $
4
5 EAPI="2"
6
7 inherit eutils toolchain-funcs flag-o-matic
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 ipv6 minimal"
32
33 RDEPEND="!net-misc/arpd
34 !minimal? ( berkdb? ( sys-libs/db ) )
35 atm? ( net-dialup/linux-atm )"
36 DEPEND="${RDEPEND}
37 elibc_glibc? ( >=sys-libs/glibc-2.7 )
38 sys-devel/bison
39 sys-devel/flex
40 >=sys-kernel/linux-headers-2.6.27"
41
42 src_prepare() {
43 sed -i \
44 -e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
45 -e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
46 Makefile || die
47
48 # build against system headers
49 rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
50
51 epatch "${FILESDIR}"/${PN}-2.6.29.1-hfsc.patch #291907
52 epatch "${FILESDIR}"/${P}-cached-routes.patch #331447
53 use ipv6 || epatch "${FILESDIR}"/${PN}-2.6.35-no-ipv6.patch #326849
54
55 epatch_user
56
57 # don't build arpd if USE=-berkdb #81660
58 use berkdb || sed -i '/^TARGETS=/s: arpd : :' misc/Makefile
59
60 use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc:' Makefile
61 }
62
63 src_configure() {
64 echo -n 'TC_CONFIG_ATM:=' > Config
65 use atm \
66 && echo 'y' >> Config \
67 || echo 'n' >> Config
68
69 # Use correct iptables dir, #144265 #293709
70 append-cppflags -DIPT_LIB_DIR=\\\"`$(tc-getPKG_CONFIG) xtables --variable=xtlibdir`\\\"
71 }
72
73 src_compile() {
74 emake \
75 CC="$(tc-getCC)" \
76 HOSTCC="$(tc-getBUILD_CC)" \
77 AR="$(tc-getAR)" \
78 || die
79 }
80
81 src_install() {
82 if use minimal ; then
83 into /
84 dosbin tc/tc || die "minimal"
85 return 0
86 fi
87
88 emake \
89 DESTDIR="${D}" \
90 SBINDIR=/sbin \
91 DOCDIR=/usr/share/doc/${PF} \
92 MANDIR=/usr/share/man \
93 install \
94 || die
95 prepalldocs
96
97 dolib.a lib/libnetlink.a || die
98 insinto /usr/include
99 doins include/libnetlink.h || die
100
101 if use berkdb ; then
102 dodir /var/lib/arpd
103 # bug 47482, arpd doesn't need to be in /sbin
104 dodir /usr/sbin
105 mv "${D}"/sbin/arpd "${D}"/usr/sbin/
106 fi
107 }

  ViewVC Help
Powered by ViewVC 1.1.20