summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2011-09-17 15:37:01 +0200
committerKoen Kooi <koen@dominion.thruhere.net>2011-09-17 15:41:27 +0200
commitc05439a18540ac2e0e0f97f8694872269f62c570 (patch)
tree054d7ff126a44d9bd9a46450e5c2a34eaf2895e7 /meta-oe/recipes-support
parentf18e72b87404fa35b451e8a47d197e61a1b3973f (diff)
downloadmeta-openembedded-c05439a18540ac2e0e0f97f8694872269f62c570.tar.gz
libnl1: import from OE .dev
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe/recipes-support')
-rw-r--r--meta-oe/recipes-support/libnl/libnl1-1.1/build.only.static.lib.patch79
-rw-r--r--meta-oe/recipes-support/libnl/libnl1-1.1/dont-link-libnl-from-sysroot.patch26
-rw-r--r--meta-oe/recipes-support/libnl/libnl1-1.1/fix-includes.patch13
-rw-r--r--meta-oe/recipes-support/libnl/libnl1-1.1/fix-ucred-declaration.patch23
-rw-r--r--meta-oe/recipes-support/libnl/libnl1-1.1/local-includes.patch12
-rw-r--r--meta-oe/recipes-support/libnl/libnl1-1.1/netlink-local-fix.patch12
-rw-r--r--meta-oe/recipes-support/libnl/libnl1-1.1/respect-ldflags.patch12
-rw-r--r--meta-oe/recipes-support/libnl/libnl1_1.1.bb27
8 files changed, 204 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/libnl/libnl1-1.1/build.only.static.lib.patch b/meta-oe/recipes-support/libnl/libnl1-1.1/build.only.static.lib.patch
new file mode 100644
index 000000000..770a3924f
--- /dev/null
+++ b/meta-oe/recipes-support/libnl/libnl1-1.1/build.only.static.lib.patch
@@ -0,0 +1,79 @@
1diff -uNr libnl-1.1.orig//lib/Makefile libnl-1.1/lib/Makefile
2--- libnl-1.1.orig//lib/Makefile 2011-03-23 15:50:32.310534329 +0100
3+++ libnl-1.1/lib/Makefile 2011-03-23 15:50:43.926534326 +0100
4@@ -33,18 +33,24 @@
5 DEPS := $(CIN:%.c=%.d)
6 OBJ := $(CIN:%.c=%.o)
7 CFLAGS += -fPIC
8+OUT_LIB := $(PACKAGE_NAME)1.a
9 OUT_SLIB := $(PACKAGE_NAME).so.$(PACKAGE_VERSION)
10 LN_SLIB := $(PACKAGE_NAME).so
11 LN1_SLIB := $(LN_SLIB).1
12
13 export
14
15-.PHONY: all clean install librtn.a $(OUT_SLIB)
16+.PHONY: all clean install librtn.a $(OUT_SLIB) $(OUT_LIB)
17
18
19 all:
20- @echo " MAKE $(OUT_SLIB)"; \
21- $(MAKE) $(OUT_SLIB)
22+ @echo " MAKE $(OUT_LIB)"; \
23+ $(MAKE) $(OUT_LIB)
24+
25+$(OUT_LIB): ../Makefile.opts $(OBJ)
26+ @echo " LD $(OUT_LIB)"; \
27+ echo $(AR) rs $(OUT_LIB) $(OBJ)
28+ $(AR) rs $(OUT_LIB) $(OBJ)
29
30 $(OUT_SLIB): ../Makefile.opts $(OBJ)
31 @echo " LD $(OUT_SLIB)"; \
32@@ -56,8 +62,8 @@
33
34 clean:
35 @echo " CLEAN lib"; \
36- $(RM) -f $(OBJ) $(OUT_SLIB) $(LN_SLIB) $(LN1_SLIB); \
37- $(RM) -f $(DEPS) $(OUT_SLIB) $(LN_SLIB) $(LN1_SLIB)
38+ $(RM) -f $(OBJ) $(OUT_SLIB) $(OUT_LIB) $(LN_SLIB) $(LN1_SLIB); \
39+ $(RM) -f $(DEPS) $(OUT_SLIB) $(OUT_LIB) $(LN_SLIB) $(LN1_SLIB)
40
41 distclean:
42 @echo " DISTCLEAN lib"; \
43@@ -65,11 +71,7 @@
44
45 install:
46- mkdir -p $(DESTDIR)$(libdir)/
47- install -m 0644 $(OUT_SLIB) $(DESTDIR)$(libdir)
48- rm -f $(DESTDIR)$(libdir)/$(LN1_SLIB)
49- $(LN) -s $(OUT_SLIB) $(DESTDIR)$(libdir)/$(LN1_SLIB)
50- rm -f $(DESTDIR)$(libdir)/$(LN_SLIB)
51- $(LN) -s $(LN1_SLIB) $(DESTDIR)$(libdir)/$(LN_SLIB)
52+ mkdir -p $(DESTDIR)$(libdir)/libnl1
53+ install -m 0644 $(OUT_LIB) $(DESTDIR)$(libdir)/libnl1
54
55 $(DEPS): ../Makefile.opts
56
57diff -uNr libnl-1.1.orig//Makefile libnl-1.1/Makefile
58--- libnl-1.1.orig//Makefile 2008-01-14 16:48:45.000000000 +0100
59+++ libnl-1.1/Makefile 2011-03-23 16:53:12.438533242 +0100
60@@ -13,7 +13,7 @@
61 include Makefile.opts
62 endif
63
64-SUBDIRS := lib include doc src tests
65+SUBDIRS := lib include doc
66 .PHONY: all clean distclean install gendoc $(SUBDIRS)
67
68 all: Makefile.opts
69diff -uNr libnl-1.1.orig//libnl-1.pc.in libnl-1.1/libnl-1.pc.in
70--- libnl-1.1.orig//libnl-1.pc.in 2008-01-14 16:48:45.000000000 +0100
71+++ libnl-1.1/libnl-1.pc.in 2011-03-23 16:57:18.084533174 +0100
72@@ -6,5 +6,5 @@
73 Name: libnl
74 Description: Convenience library for netlink sockets
75 Version: @PACKAGE_VERSION@
76-Libs: -L${libdir} -lnl
77-Cflags:
78+Libs: -L${libdir}/libnl1 -lnl1 -lm
79+Cflags: -I${includedir}/libnl1
diff --git a/meta-oe/recipes-support/libnl/libnl1-1.1/dont-link-libnl-from-sysroot.patch b/meta-oe/recipes-support/libnl/libnl1-1.1/dont-link-libnl-from-sysroot.patch
new file mode 100644
index 000000000..beb63617a
--- /dev/null
+++ b/meta-oe/recipes-support/libnl/libnl1-1.1/dont-link-libnl-from-sysroot.patch
@@ -0,0 +1,26 @@
1Index: libnl-1.1/src/Makefile
2===================================================================
3--- libnl-1.1.orig/src/Makefile 2008-01-14 07:48:45.000000000 -0800
4+++ libnl-1.1/src/Makefile 2010-09-22 14:58:46.820826001 -0700
5@@ -13,7 +13,7 @@ ifeq ($(shell [ ! -r ../Makefile.opts ]
6 include ../Makefile.opts
7 endif
8
9-LDFLAGS += -L../lib -lnl utils.o
10+LDFLAGS += ../lib/libnl.so utils.o
11 CIN := $(wildcard nl-*.c) $(wildcard genl-*.c) $(wildcard nf-*.c)
12 TOOLS := $(CIN:%.c=%)
13
14Index: libnl-1.1/tests/Makefile
15===================================================================
16--- libnl-1.1.orig/tests/Makefile 2008-01-14 07:48:45.000000000 -0800
17+++ libnl-1.1/tests/Makefile 2010-09-22 14:58:46.820826001 -0700
18@@ -13,7 +13,7 @@ ifeq ($(shell [ ! -r ../Makefile.opts ]
19 include ../Makefile.opts
20 endif
21
22-LDFLAGS += -L../lib -lnl ../src/utils.o
23+LDFLAGS += ../lib/libnl.so ../src/utils.o
24 CIN := $(wildcard test-*.c)
25 TOOLS := $(CIN:%.c=%)
26
diff --git a/meta-oe/recipes-support/libnl/libnl1-1.1/fix-includes.patch b/meta-oe/recipes-support/libnl/libnl1-1.1/fix-includes.patch
new file mode 100644
index 000000000..b172fd2f8
--- /dev/null
+++ b/meta-oe/recipes-support/libnl/libnl1-1.1/fix-includes.patch
@@ -0,0 +1,13 @@
1diff -ruN libnl-1.1/lib/route/link/vlan.c libnl-1.1-new/lib/route/link/vlan.c
2--- libnl-1.1/lib/route/link/vlan.c 2008-01-14 18:48:45.000000000 +0300
3+++ libnl-1.1-new/lib/route/link/vlan.c 2009-01-30 10:55:09.000000000 +0300
4@@ -26,7 +26,9 @@
5 #include <netlink/route/link/info-api.h>
6 #include <netlink/route/link/vlan.h>
7
8+#ifndef VLAN_FLAG_REORDER_HDR
9 #include <linux/if_vlan.h>
10+#endif
11
12 /** @cond SKIP */
13 #define VLAN_HAS_ID (1<<0)
diff --git a/meta-oe/recipes-support/libnl/libnl1-1.1/fix-ucred-declaration.patch b/meta-oe/recipes-support/libnl/libnl1-1.1/fix-ucred-declaration.patch
new file mode 100644
index 000000000..e31b18e5a
--- /dev/null
+++ b/meta-oe/recipes-support/libnl/libnl1-1.1/fix-ucred-declaration.patch
@@ -0,0 +1,23 @@
1diff -pruN libnl-1.1.orig/include/netlink/handlers.h libnl-1.1/include/netlink/handlers.h
2--- libnl-1.1.orig/include/netlink/handlers.h 2008-01-14 18:48:45.000000000 +0300
3+++ libnl-1.1/include/netlink/handlers.h 2011-04-12 19:23:16.603292527 +0400
4@@ -120,6 +120,7 @@ extern struct nl_cb * nl_cb_alloc(enum n
5 extern struct nl_cb * nl_cb_clone(struct nl_cb *);
6 extern struct nl_cb * nl_cb_get(struct nl_cb *);
7 extern void nl_cb_put(struct nl_cb *);
8+struct ucred;
9
10 extern int nl_cb_set(struct nl_cb *, enum nl_cb_type, enum nl_cb_kind,
11 nl_recvmsg_msg_cb_t, void *);
12diff -pruN libnl-1.1.orig/include/netlink/netlink.h libnl-1.1/include/netlink/netlink.h
13--- libnl-1.1.orig/include/netlink/netlink.h 2008-01-14 18:48:45.000000000 +0300
14+++ libnl-1.1/include/netlink/netlink.h 2011-04-12 19:23:51.370292658 +0400
15@@ -50,6 +50,8 @@ extern int nl_send_auto_complete(struc
16 extern int nl_send_simple(struct nl_handle *, int, int,
17 void *, size_t);
18
19+struct ucred;
20+
21 /* Receive */
22 extern int nl_recv(struct nl_handle *,
23 struct sockaddr_nl *, unsigned char **,
diff --git a/meta-oe/recipes-support/libnl/libnl1-1.1/local-includes.patch b/meta-oe/recipes-support/libnl/libnl1-1.1/local-includes.patch
new file mode 100644
index 000000000..85659db6d
--- /dev/null
+++ b/meta-oe/recipes-support/libnl/libnl1-1.1/local-includes.patch
@@ -0,0 +1,12 @@
1diff -urN libnl-1.1.orig/Makefile.opts.in libnl-1.1/Makefile.opts.in
2--- libnl-1.1.orig/Makefile.opts.in 2008-01-14 15:48:45.000000000 +0000
3+++ libnl-1.1/Makefile.opts.in 2009-04-06 10:20:40.000000000 +0000
4@@ -10,7 +10,7 @@
5 #
6
7 CC := @CC@
8-CFLAGS := @CFLAGS@
9+CFLAGS := -I./include -I. -I../include @CFLAGS@
10 LDFLAGS := @LDFLAGS@
11 CPPFLAGS := @CPPFLAGS@
12 PACKAGE_NAME := @PACKAGE_NAME@
diff --git a/meta-oe/recipes-support/libnl/libnl1-1.1/netlink-local-fix.patch b/meta-oe/recipes-support/libnl/libnl1-1.1/netlink-local-fix.patch
new file mode 100644
index 000000000..51c673602
--- /dev/null
+++ b/meta-oe/recipes-support/libnl/libnl1-1.1/netlink-local-fix.patch
@@ -0,0 +1,12 @@
1Index: libnl-1.1/include/netlink-local.h
2===================================================================
3--- libnl-1.1.orig/include/netlink-local.h 2009-06-18 15:28:32.614209645 +0400
4+++ libnl-1.1/include/netlink-local.h 2009-06-18 15:28:44.094190518 +0400
5@@ -26,6 +26,7 @@
6 #include <sys/socket.h>
7 #include <inttypes.h>
8 #include <assert.h>
9+#include <limits.h>
10
11 #include <arpa/inet.h>
12 #include <netdb.h>
diff --git a/meta-oe/recipes-support/libnl/libnl1-1.1/respect-ldflags.patch b/meta-oe/recipes-support/libnl/libnl1-1.1/respect-ldflags.patch
new file mode 100644
index 000000000..ba97dc672
--- /dev/null
+++ b/meta-oe/recipes-support/libnl/libnl1-1.1/respect-ldflags.patch
@@ -0,0 +1,12 @@
1diff -urN libnl-1.1.orig/lib/Makefile libnl-1.1/lib/Makefile
2--- libnl-1.1.orig/lib/Makefile 2008-01-14 15:48:45.000000000 +0000
3+++ libnl-1.1/lib/Makefile 2009-04-06 10:16:21.000000000 +0000
4@@ -48,7 +48,7 @@
5
6 $(OUT_SLIB): ../Makefile.opts $(OBJ)
7 @echo " LD $(OUT_SLIB)"; \
8- $(CC) -shared -Wl,-soname,libnl.so.1 -o $(OUT_SLIB) $(OBJ) $(LIBNL_LIB) -lc
9+ $(CC) $(LDFLAGS) -shared -Wl,-soname,libnl.so.1 -o $(OUT_SLIB) $(OBJ) $(LIBNL_LIB) -lc
10 @echo " LN $(OUT_SLIB) $(LN1_SLIB)"; \
11 rm -f $(LN1_SLIB) ; $(LN) -s $(OUT_SLIB) $(LN1_SLIB)
12 @echo " LN $(LN1_SLIB) $(LN_SLIB)"; \
diff --git a/meta-oe/recipes-support/libnl/libnl1_1.1.bb b/meta-oe/recipes-support/libnl/libnl1_1.1.bb
new file mode 100644
index 000000000..cf5396fce
--- /dev/null
+++ b/meta-oe/recipes-support/libnl/libnl1_1.1.bb
@@ -0,0 +1,27 @@
1require libnl.inc
2
3LICENSE = "LGPLv2.1"
4LIC_FILES_CHKSUM = "file://COPYING;md5=2b41e13261a330ee784153ecbb6a82bc"
5
6
7PR = "${INC_PR}.0"
8
9# move it to extra subdirectory
10includedir = "${prefix}/include/libnl1"
11
12CFLAGS += '-DVLAN_FLAG_REORDER_HDR=1'
13
14SRC_URI = "\
15 http://www.infradead.org/~tgr/libnl/files/libnl-${PV}.tar.gz \
16 file://local-includes.patch \
17 file://fix-includes.patch \
18 file://respect-ldflags.patch \
19 file://netlink-local-fix.patch \
20 file://dont-link-libnl-from-sysroot.patch \
21 file://build.only.static.lib.patch \
22 file://fix-ucred-declaration.patch \
23"
24S = "${WORKDIR}/libnl-${PV}"
25
26SRC_URI[md5sum] = "ae970ccd9144e132b68664f98e7ceeb1"
27SRC_URI[sha256sum] = "35cea4cfb6cd8af0cafa0f34fff81def5a1f193b8b8384299b4b21883e22edc3"