summaryrefslogtreecommitdiff
path: root/sys-apps/iproute2
diff options
context:
space:
mode:
authorBertrand Jacquin <beber@meleeweb.net>2008-06-12 10:50:17 +0200
committerBertrand Jacquin <beber@meleeweb.net>2008-06-12 10:50:17 +0200
commit80fd322ce11abfed5251a2b2fbedd7844fc57e80 (patch)
tree9ca2a8ef048530cedc821df1c02e2d6977f4fe04 /sys-apps/iproute2
parentAdd i586-geode-linux-dietlibc cross toolchain (diff)
downloadportage-80fd322ce11abfed5251a2b2fbedd7844fc57e80.tar.xz
Add coreutils and iproute2 cross-compile aware version
Diffstat (limited to 'sys-apps/iproute2')
-rw-r--r--sys-apps/iproute2/Manifest4
-rw-r--r--sys-apps/iproute2/files/iproute2-2.6.16.20060323-build.patch41
-rw-r--r--sys-apps/iproute2/files/iproute2-2.6.22.20070710-netem-hostcc.diff10
-rw-r--r--sys-apps/iproute2/iproute2-2.6.22.20070710.ebuild100
4 files changed, 155 insertions, 0 deletions
diff --git a/sys-apps/iproute2/Manifest b/sys-apps/iproute2/Manifest
new file mode 100644
index 00000000..c8b71f89
--- /dev/null
+++ b/sys-apps/iproute2/Manifest
@@ -0,0 +1,4 @@
+AUX iproute2-2.6.16.20060323-build.patch 938 RMD160 13cfc8c208cd07b3db06353b42e77583f1b537dc SHA1 4b29a52e5c26648e1255dc3ad5779a0fd23dfd69 SHA256 d322b077a550ce851d0056738285a50290934bfe3d2a9aaaf6ab5036de99ac63
+AUX iproute2-2.6.22.20070710-netem-hostcc.diff 296 RMD160 27dfaaca8cdd4940112bf7769fcaa8929e4a15e3 SHA1 1520d8373d007cf3c2b0865696eafcdfe5d98062 SHA256 29cdc6e9fc1890d5e94e93fced346c696ae44407a9f41b131dd9b003841cadfd
+DIST iproute2-2.6.22-070710.tar.gz 410719 RMD160 b11222506531e446d1c0b2e73440fa1d98031ceb SHA1 0d0b73a36945009fa3597e929bef6e71b91cfbde SHA256 3c6b48af9e655e4f0a34c7718e288960a1dc84a3ac7eb726e855adb45fbd953a
+EBUILD iproute2-2.6.22.20070710.ebuild 2759 RMD160 cad1f49b85eadb13e681218b40cfe72134cb82e6 SHA1 82b6418b5bcd9d60e13310a6d84a5abdf061ed2d SHA256 c675b4334d509dd6f85373f7253cf333cd68fc0c1264e9f3ce5d6c36125ff6cb
diff --git a/sys-apps/iproute2/files/iproute2-2.6.16.20060323-build.patch b/sys-apps/iproute2/files/iproute2-2.6.16.20060323-build.patch
new file mode 100644
index 00000000..7512cfcc
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-2.6.16.20060323-build.patch
@@ -0,0 +1,41 @@
+let portage strip the binaries
+
+http://bugs.gentoo.org/137574
+
+--- ip/Makefile
++++ ip/Makefile
+@@ -16,7 +16,7 @@
+ rtmon: $(RTMONOBJ) $(LIBNETLINK)
+
+ install: all
+- install -m 0755 -s $(TARGETS) $(DESTDIR)$(SBINDIR)
++ install -m 0755 $(TARGETS) $(DESTDIR)$(SBINDIR)
+ install -m 0755 $(SCRIPTS) $(DESTDIR)$(SBINDIR)
+
+ clean:
+
+--- misc/Makefile
++++ misc/Makefile
+@@ -27,7 +27,7 @@
+ lnstat: $(LNSTATOBJ)
+
+ install: all
+- install -m 0755 -s $(TARGETS) $(DESTDIR)$(SBINDIR)
++ install -m 0755 $(TARGETS) $(DESTDIR)$(SBINDIR)
+ ln -sf lnstat $(DESTDIR)$(SBINDIR)/rtstat
+ ln -sf lnstat $(DESTDIR)$(SBINDIR)/ctstat
+
+--- tc/Makefile
++++ tc/Makefile
+@@ -70,9 +70,9 @@
+
+ install: all
+ mkdir -p $(DESTDIR)/usr/lib/tc
+- install -m 0755 -s tc $(DESTDIR)$(SBINDIR)
++ install -m 0755 tc $(DESTDIR)$(SBINDIR)
+ for i in $(TCSO); \
+- do install -m 755 -s $$i $(DESTDIR)/usr/lib/tc; \
++ do install -m 755 $$i $(DESTDIR)/usr/lib/tc; \
+ done
+
+ clean:
diff --git a/sys-apps/iproute2/files/iproute2-2.6.22.20070710-netem-hostcc.diff b/sys-apps/iproute2/files/iproute2-2.6.22.20070710-netem-hostcc.diff
new file mode 100644
index 00000000..a8eb55ca
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-2.6.22.20070710-netem-hostcc.diff
@@ -0,0 +1,10 @@
+--- netem/Makefile.ori 2008-06-12 10:44:19.000000000 +0200
++++ netem/Makefile 2008-06-12 10:45:07.000000000 +0200
+@@ -2,6 +2,7 @@
+ DISTDATA = normal.dist pareto.dist paretonormal.dist experimental.dist
+
+ HOSTCC ?= $(CC)
++CCOPTS = $(CBUILD_CFLAGS)
+ LDLIBS += -lm
+
+ all: $(DISTGEN) $(DISTDATA)
diff --git a/sys-apps/iproute2/iproute2-2.6.22.20070710.ebuild b/sys-apps/iproute2/iproute2-2.6.22.20070710.ebuild
new file mode 100644
index 00000000..745daa82
--- /dev/null
+++ b/sys-apps/iproute2/iproute2-2.6.22.20070710.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/iproute2/iproute2-2.6.22.20070710.ebuild,v 1.10 2008/03/11 16:51:00 ricmm Exp $
+
+inherit eutils toolchain-funcs
+
+MY_PV=${PV%.*}
+SNAP=${PV##*.}
+SNAP=${SNAP:2}
+DESCRIPTION="kernel routing and traffic control utilities"
+HOMEPAGE="http://linux-net.osdl.org/index.php/Iproute2"
+SRC_URI="http://developer.osdl.org/dev/iproute2/download/${PN}-${MY_PV}-${SNAP}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+IUSE="atm berkdb minimal"
+
+RDEPEND="!minimal? ( berkdb? ( sys-libs/db ) )
+ atm? ( net-dialup/linux-atm )"
+DEPEND="${RDEPEND}
+ >=virtual/os-headers-2.4.21"
+
+S=${WORKDIR}
+
+pkg_setup() {
+ if use kernel_linux ; then
+ ewarn
+ ewarn "${PN} requires kernel support for Netlink (CONFIG_NETLINK)."
+ ewarn "This is only applies for kernels prior to 2.4.17"
+ ewarn
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i "s:-O2:${CFLAGS}:" Makefile || die "sed Makefile failed"
+
+ epatch "${FILESDIR}"/${PN}-2.6.16.20060323-build.patch #137574
+ epatch "${FILESDIR}"/${PN}-2.6.22.20070710-netem-hostcc.diff
+
+ local check base=${PORTAGE_CONFIGROOT}/etc/portage/patches
+ for check in {${CATEGORY}/${PF},${CATEGORY}/${P},${CATEGORY}/${PN}}; do
+ EPATCH_SOURCE=${base}/${CTARGET}/${check}
+ [[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${base}/${CHOST}/${check}
+ [[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${base}/${check}
+ if [[ -d ${EPATCH_SOURCE} ]] ; then
+ EPATCH_SUFFIX="patch"
+ EPATCH_FORCE="yes" \
+ EPATCH_MULTI_MSG="Applying user patches from ${EPATCH_SOURCE} ..." \
+ epatch
+ break
+ fi
+ done
+
+ # don't build arpd if USE=-berkdb #81660
+ use berkdb || sed -i '/^TARGETS=/s: arpd : :' misc/Makefile
+ # Multilib fixes
+ sed -i 's:/usr/local:/usr:' tc/m_ipt.c include/iptables.h
+ sed -i "s:/usr/lib:/usr/$(get_libdir):g" \
+ netem/Makefile tc/{Makefile,tc.c,q_netem.c,m_ipt.c} include/iptables.h || die
+ # Use correct iptables dir, #144265.
+ sed -i "s:/usr/local/lib/iptables:/$(get_libdir)/iptables:g" \
+ include/iptables.h
+}
+
+src_compile() {
+ echo -n 'TC_CONFIG_ATM:=' > Config
+ use atm \
+ && echo 'y' >> Config \
+ || echo 'n' >> Config
+
+ use minimal && sed -i -e '/^SUBDIRS=/s:=.*:=lib tc:' Makefile
+ emake \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ || die "make"
+}
+
+src_install() {
+ if use minimal ; then
+ into /
+ dosbin tc/tc || die "minimal"
+ return 0
+ fi
+
+ emake \
+ DESTDIR="${D}" \
+ SBINDIR=/sbin \
+ DOCDIR=/usr/share/doc/${PF} \
+ install \
+ || die "make install failed"
+ if use berkdb ; then
+ dodir /var/lib/arpd
+ # bug 47482, arpd doesn't need to be in /sbin
+ dodir /usr/sbin
+ mv "${D}"/sbin/arpd "${D}"/usr/sbin/
+ fi
+}