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

Contents of /sys-apps/iproute2/iproute2-2.6.38.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Jul 31 18:33:22 2011 UTC (9 years, 4 months ago) by mattst88
Branch: MAIN
Changes since 1.1: +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.38.ebuild,v 1.1 2011/06/11 13:18:51 scarabeus Exp $
4
5 EAPI=4
6
7 EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git"
8 [[ ${PV} == "9999" ]] && SCM_ECLASS="git-2"
9
10 if [[ ${PV} == *.*.*.* ]] ; then
11 MY_PV=${PV%.*}-${PV##*.}
12 else
13 MY_PV=${PV}
14 fi
15 MY_P="${PN}-${MY_PV}"
16
17 inherit eutils toolchain-funcs flag-o-matic base ${SCM_ECLASS}
18 unset SCM_ECLASS
19
20 DESCRIPTION="kernel routing and traffic control utilities"
21 HOMEPAGE="http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2"
22 [[ ${PV} == "9999" ]] || SRC_URI="http://developer.osdl.org/dev/iproute2/download/${MY_P}.tar.bz2"
23
24 LICENSE="GPL-2"
25 SLOT="0"
26 [[ ${PV} == "9999" ]] || KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
27 IUSE="atm berkdb minimal"
28
29 RDEPEND="!net-misc/arpd
30 !minimal? ( berkdb? ( sys-libs/db ) )
31 atm? ( net-dialup/linux-atm )"
32 DEPEND="${RDEPEND}
33 sys-devel/bison
34 sys-devel/flex
35 >=sys-kernel/linux-headers-2.6.27
36 elibc_glibc? ( >=sys-libs/glibc-2.7 )"
37
38 S=${WORKDIR}/${MY_P}
39
40 PATCHES=(
41 "${FILESDIR}/${PN}-2.6.29.1-hfsc.patch" #291907
42 )
43
44 src_prepare() {
45 base_src_prepare
46
47 sed -i \
48 -e "/^LIBDIR/s:=.*:=/$(get_libdir):" \
49 -e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
50 Makefile || die
51
52 # build against system headers
53 rm -r include/netinet #include/linux include/ip{,6}tables{,_common}.h include/libiptc
54
55 # don't build arpd if USE=-berkdb #81660
56 use berkdb || sed -i '/^TARGETS=/s: arpd : :' misc/Makefile
57
58 use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc:' Makefile
59 }
60
61 src_configure() {
62 echo "TC_CONFIG_ATM:=$(use atm && echo "y" || echo "n")" > Config
63
64 # Use correct iptables dir, #144265 #293709
65 append-cppflags -DIPT_LIB_DIR=\\\"`$(tc-getPKG_CONFIG) xtables --variable=xtlibdir`\\\"
66 }
67
68 src_compile() {
69 emake \
70 CC="$(tc-getCC)" \
71 AR="$(tc-getAR)"
72 }
73
74 src_install() {
75 if use minimal ; then
76 into /
77 dosbin tc/tc
78 return 0
79 fi
80
81 emake \
82 DESTDIR="${D}" \
83 SBINDIR=/sbin \
84 DOCDIR=/usr/share/doc/${PF} \
85 MANDIR=/usr/share/man \
86 install
87
88 dolib.a lib/libnetlink.a
89 insinto /usr/include
90 doins include/libnetlink.h
91
92 if use berkdb ; then
93 dodir /var/lib/arpd
94 # bug 47482, arpd doesn't need to be in /sbin
95 dodir /usr/sbin
96 mv "${ED}"/sbin/arpd "${ED}"/usr/sbin/
97 fi
98 }

  ViewVC Help
Powered by ViewVC 1.1.20