summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorKevin Tian <kevin.tian@intel.com>2010-06-25 17:48:52 +0800
committerRichard Purdie <rpurdie@linux.intel.com>2010-06-29 17:13:38 +0100
commitb180d7f488f44d3dfb3f9a19604e9592c29b426e (patch)
treedc198fec816ec648c27298f9c7869b592727a221 /meta
parent7510eb1061d0795b515bd20eba1cbd39a9b644a2 (diff)
downloadopenembedded-core-b180d7f488f44d3dfb3f9a19604e9592c29b426e.tar.gz
openembedded-core-b180d7f488f44d3dfb3f9a19604e9592c29b426e.tar.bz2
openembedded-core-b180d7f488f44d3dfb3f9a19604e9592c29b426e.tar.xz
openembedded-core-b180d7f488f44d3dfb3f9a19604e9592c29b426e.zip
iproute: upgrade to 2.6.34
(borrow from OE 2.6.34 recipe) [Patches-poky] REMOVE _iproute2-2.6.15_no_strip.diff_: not required now REMOVE _new-flex-fix.patch_: not required now [Patches-OE] TAKE _configure-cross.patch_: don't invoke gcc directly [Recipes] - Add metadata - fix SRC_URI for new version - no {S} now - use alternative to enable 'ip' instead of using busybox - move shared documents to right destination - not take from OE: * no need for specific do_configure Signed-off-by Kevin Tian <kevin.tian@intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/packages/iproute2/iproute2-2.6.18/iproute2-2.6.15_no_strip.diff25
-rw-r--r--meta/packages/iproute2/iproute2-2.6.18/new-flex-fix.patch83
-rw-r--r--meta/packages/iproute2/iproute2-2.6.34/configure-cross.patch61
-rw-r--r--meta/packages/iproute2/iproute2.inc21
-rw-r--r--meta/packages/iproute2/iproute2_2.6.18.bb8
-rw-r--r--meta/packages/iproute2/iproute2_2.6.34.bb6
6 files changed, 82 insertions, 122 deletions
diff --git a/meta/packages/iproute2/iproute2-2.6.18/iproute2-2.6.15_no_strip.diff b/meta/packages/iproute2/iproute2-2.6.18/iproute2-2.6.15_no_strip.diff
deleted file mode 100644
index 496506960..000000000
--- a/meta/packages/iproute2/iproute2-2.6.18/iproute2-2.6.15_no_strip.diff
+++ /dev/null
@@ -1,25 +0,0 @@
---- ip/Makefile 2006/02/23 21:22:18 1.1
-+++ ip/Makefile 2006/02/23 21:22:27
-@@ -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:
---- tc/Makefile 2006/02/23 21:23:52 1.1
-+++ tc/Makefile 2006/02/23 21:23:57
-@@ -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/meta/packages/iproute2/iproute2-2.6.18/new-flex-fix.patch b/meta/packages/iproute2/iproute2-2.6.18/new-flex-fix.patch
deleted file mode 100644
index 2c0408783..000000000
--- a/meta/packages/iproute2/iproute2-2.6.18/new-flex-fix.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-The tc command was failing to build due to flex errors. These errors are
-caused by an incompatible change to flex in recent versions, including the
-version shipped with OE.
-
-This fix is as per the one used by opensure:
-
- http://lists.opensuse.org/opensuse-commit/2006-04/msg00090.html
-
-and simple renames str to prevent it conflicting.
-
---- iproute2-2.6.16-060323/tc/emp_ematch.l 2006/10/30 22:46:29 1.1
-+++ iproute2-2.6.16-060323/tc/emp_ematch.l 2006/10/30 22:47:26
-@@ -63,7 +63,7 @@
-
- %}
-
--%x str
-+%x STR
-
- %option 8bit stack warn noyywrap prefix="ematch_"
- %%
-@@ -78,17 +78,17 @@
- }
- strbuf_index = 0;
-
-- BEGIN(str);
-+ BEGIN(STR);
- }
-
--<str>\" {
-+<STR>\" {
- BEGIN(INITIAL);
- yylval.b = bstr_new(strbuf, strbuf_index);
- yylval.b->quoted = 1;
- return ATTRIBUTE;
- }
-
--<str>\\[0-7]{1,3} { /* octal escape sequence */
-+<STR>\\[0-7]{1,3} { /* octal escape sequence */
- int res;
-
- sscanf(yytext + 1, "%o", &res);
-@@ -100,12 +100,12 @@
- strbuf_append_char((unsigned char) res);
- }
-
--<str>\\[0-9]+ { /* catch wrong octal escape seq. */
-+<STR>\\[0-9]+ { /* catch wrong octal escape seq. */
- fprintf(stderr, "error: invalid octale escape sequence\n");
- return ERROR;
- }
-
--<str>\\x[0-9a-fA-F]{1,2} {
-+<STR>\\x[0-9a-fA-F]{1,2} {
- int res;
-
- sscanf(yytext + 2, "%x", &res);
-@@ -118,16 +118,16 @@
- strbuf_append_char((unsigned char) res);
- }
-
--<str>\\n strbuf_append_char('\n');
--<str>\\r strbuf_append_char('\r');
--<str>\\t strbuf_append_char('\t');
--<str>\\v strbuf_append_char('\v');
--<str>\\b strbuf_append_char('\b');
--<str>\\f strbuf_append_char('\f');
--<str>\\a strbuf_append_char('\a');
-+<STR>\\n strbuf_append_char('\n');
-+<STR>\\r strbuf_append_char('\r');
-+<STR>\\t strbuf_append_char('\t');
-+<STR>\\v strbuf_append_char('\v');
-+<STR>\\b strbuf_append_char('\b');
-+<STR>\\f strbuf_append_char('\f');
-+<STR>\\a strbuf_append_char('\a');
-
--<str>\\(.|\n) strbuf_append_char(yytext[1]);
--<str>[^\\\n\"]+ strbuf_append_charp(yytext);
-+<STR>\\(.|\n) strbuf_append_char(yytext[1]);
-+<STR>[^\\\n\"]+ strbuf_append_charp(yytext);
-
- [aA][nN][dD] return AND;
- [oO][rR] return OR;
diff --git a/meta/packages/iproute2/iproute2-2.6.34/configure-cross.patch b/meta/packages/iproute2/iproute2-2.6.34/configure-cross.patch
new file mode 100644
index 000000000..67dc6f5a3
--- /dev/null
+++ b/meta/packages/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 <<EOF
+@@ -15,7 +15,7 @@ int main(int argc, char **argv) {
+ return 0;
+ }
+ EOF
+-gcc -I$INCLUDE -o /tmp/atmtest /tmp/atmtest.c -latm >/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/packages/iproute2/iproute2.inc b/meta/packages/iproute2/iproute2.inc
index 0d7b11028..7246b87e9 100644
--- a/meta/packages/iproute2/iproute2.inc
+++ b/meta/packages/iproute2/iproute2.inc
@@ -1,18 +1,27 @@
DESCRIPTION = "kernel routing and traffic control utilities"
+HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2"
SECTION = "base"
-LICENSE = "GPL"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
+ file://ip/ip.c;md5=186731afa4b42e30b9b37efa4ec90b93"
DEPENDS = "flex-native bison-native"
-# Set SRCDATE in the .bb file
-SRC_URI = "http://developer.osdl.org/dev/iproute2/download/${P}-${SRCDATE}.tar.gz"
-
-S = "${WORKDIR}/${P}-${SRCDATE}"
+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
+ 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/packages/iproute2/iproute2_2.6.18.bb b/meta/packages/iproute2/iproute2_2.6.18.bb
deleted file mode 100644
index 0fc0b8f98..000000000
--- a/meta/packages/iproute2/iproute2_2.6.18.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-PR = "r1"
-
-require iproute2.inc
-
-SRC_URI += "file://iproute2-2.6.15_no_strip.diff;patch=1;pnum=0 \
- file://new-flex-fix.patch;patch=1"
-
-SRCDATE = "061002"
diff --git a/meta/packages/iproute2/iproute2_2.6.34.bb b/meta/packages/iproute2/iproute2_2.6.34.bb
new file mode 100644
index 000000000..c5e0ef6e5
--- /dev/null
+++ b/meta/packages/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"