From d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 1 Sep 2010 19:09:11 +0100 Subject: packages: Separate out most of the remaining packages into recipes Signed-off-by: Richard Purdie --- .../iproute2/iproute2-2.6.34/configure-cross.patch | 61 ++++++++++++++++++++++ meta/recipes-connectivity/iproute2/iproute2.inc | 27 ++++++++++ .../iproute2/iproute2_2.6.34.bb | 6 +++ 3 files changed, 94 insertions(+) create mode 100644 meta/recipes-connectivity/iproute2/iproute2-2.6.34/configure-cross.patch create mode 100644 meta/recipes-connectivity/iproute2/iproute2.inc create mode 100644 meta/recipes-connectivity/iproute2/iproute2_2.6.34.bb (limited to 'meta/recipes-connectivity/iproute2') diff --git a/meta/recipes-connectivity/iproute2/iproute2-2.6.34/configure-cross.patch b/meta/recipes-connectivity/iproute2/iproute2-2.6.34/configure-cross.patch new file mode 100644 index 0000000000..67dc6f5a30 --- /dev/null +++ b/meta/recipes-connectivity/iproute2/iproute2-2.6.34/configure-cross.patch @@ -0,0 +1,61 @@ +# borrow from OE, to handle cross compile mess +# +# ktian1, 06/28/2010 +Index: iproute2-2.6.34/configure +=================================================================== +--- iproute2-2.6.34.orig/configure ++++ iproute2-2.6.34/configure +@@ -4,7 +4,7 @@ + INCLUDE=${1:-"$PWD/include"} + + TABLES= +- ++SYSROOT=$1 + check_atm() + { + cat >/tmp/atmtest.c </dev/null 2>&1 ++$CC -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm >/dev/null 2>&1 + if [ $? -eq 0 ] + then + echo "TC_CONFIG_ATM:=y" >>Config +@@ -49,7 +49,7 @@ int main(int argc, char **argv) + + EOF + +-if gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl -lxtables >/dev/null 2>&1 ++if $CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl -lxtables >/dev/null 2>&1 + then + echo "TC_CONFIG_XT:=y" >>Config + echo "using xtables" +@@ -86,7 +86,7 @@ int main(int argc, char **argv) { + } + + EOF +-gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1 ++$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1 + + if [ $? -eq 0 ] + then +@@ -126,7 +126,7 @@ int main(int argc, char **argv) { + } + + EOF +-gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1 ++$CC -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl >/dev/null 2>&1 + + if [ $? -eq 0 ] + then +@@ -150,7 +150,7 @@ check_ipt() + check_ipt_lib_dir() + { + IPT_LIB_DIR="" +- for dir in /lib /usr/lib /usr/local/lib ++ for dir in $SYSROOT/lib $SYSROOT/usr/lib $SYSROOT/usr/local/lib + do + for file in $dir/$TABLES/lib*t_*so ; do + if [ -f $file ]; then diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc b/meta/recipes-connectivity/iproute2/iproute2.inc new file mode 100644 index 0000000000..7246b87e9b --- /dev/null +++ b/meta/recipes-connectivity/iproute2/iproute2.inc @@ -0,0 +1,27 @@ +DESCRIPTION = "kernel routing and traffic control utilities" +HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2" +SECTION = "base" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ + file://ip/ip.c;md5=186731afa4b42e30b9b37efa4ec90b93" +DEPENDS = "flex-native bison-native" + +inherit update-alternatives + +EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_KERNEL_DIR}/include DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip' SBINDIR=/sbin" + +do_install () { + oe_runmake DESTDIR=${D} install + mv ${D}${base_sbindir}/ip ${D}${base_sbindir}/ip.iproute2 + install -d ${D}${datadir} + mv ${D}/share/* ${D}${datadir}/ || true + rm ${D}/share -rf || true +} + +FILES_${PN} += "/usr/lib/tc/*" +FILES_${PN}-dbg += "/usr/lib/tc/.debug" + +ALTERNATIVE_NAME = "ip" +ALTERNATIVE_PATH = "${base_sbindir}/ip.iproute2" +ALTERNATIVE_LINK = "${base_bindir}/ip" +ALTERNATIVE_PRIORITY = "100" diff --git a/meta/recipes-connectivity/iproute2/iproute2_2.6.34.bb b/meta/recipes-connectivity/iproute2/iproute2_2.6.34.bb new file mode 100644 index 0000000000..c5e0ef6e56 --- /dev/null +++ b/meta/recipes-connectivity/iproute2/iproute2_2.6.34.bb @@ -0,0 +1,6 @@ +require iproute2.inc + +PR = "r0" + +SRC_URI = "http://developer.osdl.org/dev/iproute2/download/${P}.tar.bz2 \ + file://configure-cross.patch" -- cgit 1.2.3-korg