Message ID | 7e8153e2c300bf65e63c1394322c69b24f3e5822.1353493728.git.Morten.ThunbergSvendsen@prevas.dk |
---|---|
State | Changes Requested |
Delegated to: | Morten Svendsen |
Headers | show |
Morten Thunberg Svendsen <Morten.ThunbergSvendsen@prevas.dk> writes: > --- > recipes/libnl/libnl-common.inc | 6 ++ > recipes/libnl/libnl.inc | 6 +- > .../libnl/libnl1-1.1/build.only.static.lib.patch | 79 ++++++++++++++++++++ > .../libnl1-1.1/dont-link-libnl-from-sysroot.patch | 26 +++++++ > recipes/libnl/libnl1-1.1/fix-includes.patch | 13 ++++ > .../libnl/libnl1-1.1/fix-ucred-declaration.patch | 23 ++++++ > recipes/libnl/libnl1-1.1/local-includes.patch | 12 +++ > recipes/libnl/libnl1-1.1/netlink-local-fix.patch | 12 +++ > recipes/libnl/libnl1-1.1/respect-ldflags.patch | 12 +++ > recipes/libnl/libnl1.inc | 10 +++ > recipes/libnl/libnl1_1.1.oe | 9 +++ > recipes/libnl/libnl1_1.1.oe.sig | 1 + > recipes/libnl/libnl_3.2.14.oe | 2 - > 13 files changed, 204 insertions(+), 7 deletions(-) > create mode 100644 recipes/libnl/libnl-common.inc > create mode 100644 recipes/libnl/libnl1-1.1/build.only.static.lib.patch > create mode 100644 recipes/libnl/libnl1-1.1/dont-link-libnl-from-sysroot.patch > create mode 100644 recipes/libnl/libnl1-1.1/fix-includes.patch > create mode 100644 recipes/libnl/libnl1-1.1/fix-ucred-declaration.patch > create mode 100644 recipes/libnl/libnl1-1.1/local-includes.patch > create mode 100644 recipes/libnl/libnl1-1.1/netlink-local-fix.patch > create mode 100644 recipes/libnl/libnl1-1.1/respect-ldflags.patch > create mode 100644 recipes/libnl/libnl1.inc > create mode 100644 recipes/libnl/libnl1_1.1.oe > create mode 100644 recipes/libnl/libnl1_1.1.oe.sig > > diff --git a/recipes/libnl/libnl-common.inc b/recipes/libnl/libnl-common.inc > new file mode 100644 > index 0000000..114a0f1 > --- /dev/null > +++ b/recipes/libnl/libnl-common.inc > @@ -0,0 +1,6 @@ > +DESCRIPTION = "A library for applications dealing with netlink sockets" > +HOMEPAGE = "http://www.infradead.org/~tgr/libnl/" > +PE ?= "${PN}" > +SRC_URI = "http://www.infradead.org/~tgr/${PN}/files/${PE}-${PV}.tar.gz" > + > +LICENSE = "LGPL-2.1" LICENSE value should generally be placed directly in the recipe file as a reminder that recipe maintainer must check if the license is still valid when upgrading to a new version. Remove LICENSE in this file. > diff --git a/recipes/libnl/libnl.inc b/recipes/libnl/libnl.inc > index 5c287ab..f213125 100644 > --- a/recipes/libnl/libnl.inc > +++ b/recipes/libnl/libnl.inc > @@ -1,8 +1,4 @@ > -DESCRIPTION = "A library for applications dealing with netlink sockets" > -HOMEPAGE = "http://www.infradead.org/~tgr/libnl/" > - > -SRC_URI = "http://www.infradead.org/~tgr/${PN}/files/${PN}-${PV}.tar.gz" > - > +require libnl-common.inc > inherit autotools-autoreconf pkgconfig > > DEPENDS += "libm libpthread libdl" > diff --git a/recipes/libnl/libnl1-1.1/build.only.static.lib.patch b/recipes/libnl/libnl1-1.1/build.only.static.lib.patch > new file mode 100644 > index 0000000..770a392 > --- /dev/null > +++ b/recipes/libnl/libnl1-1.1/build.only.static.lib.patch > @@ -0,0 +1,79 @@ > +diff -uNr libnl-1.1.orig//lib/Makefile libnl-1.1/lib/Makefile > +--- libnl-1.1.orig//lib/Makefile 2011-03-23 15:50:32.310534329 +0100 > ++++ libnl-1.1/lib/Makefile 2011-03-23 15:50:43.926534326 +0100 > +@@ -33,18 +33,24 @@ > + DEPS := $(CIN:%.c=%.d) > + OBJ := $(CIN:%.c=%.o) > + CFLAGS += -fPIC > ++OUT_LIB := $(PACKAGE_NAME)1.a > + OUT_SLIB := $(PACKAGE_NAME).so.$(PACKAGE_VERSION) > + LN_SLIB := $(PACKAGE_NAME).so > + LN1_SLIB := $(LN_SLIB).1 > + > + export > + > +-.PHONY: all clean install librtn.a $(OUT_SLIB) > ++.PHONY: all clean install librtn.a $(OUT_SLIB) $(OUT_LIB) > + > + > + all: > +- @echo " MAKE $(OUT_SLIB)"; \ > +- $(MAKE) $(OUT_SLIB) > ++ @echo " MAKE $(OUT_LIB)"; \ > ++ $(MAKE) $(OUT_LIB) > ++ > ++$(OUT_LIB): ../Makefile.opts $(OBJ) > ++ @echo " LD $(OUT_LIB)"; \ > ++ echo $(AR) rs $(OUT_LIB) $(OBJ) > ++ $(AR) rs $(OUT_LIB) $(OBJ) > + > + $(OUT_SLIB): ../Makefile.opts $(OBJ) > + @echo " LD $(OUT_SLIB)"; \ > +@@ -56,8 +62,8 @@ > + > + clean: > + @echo " CLEAN lib"; \ > +- $(RM) -f $(OBJ) $(OUT_SLIB) $(LN_SLIB) $(LN1_SLIB); \ > +- $(RM) -f $(DEPS) $(OUT_SLIB) $(LN_SLIB) $(LN1_SLIB) > ++ $(RM) -f $(OBJ) $(OUT_SLIB) $(OUT_LIB) $(LN_SLIB) $(LN1_SLIB); \ > ++ $(RM) -f $(DEPS) $(OUT_SLIB) $(OUT_LIB) $(LN_SLIB) $(LN1_SLIB) > + > + distclean: > + @echo " DISTCLEAN lib"; \ > +@@ -65,11 +71,7 @@ > + > + install: > +- mkdir -p $(DESTDIR)$(libdir)/ > +- install -m 0644 $(OUT_SLIB) $(DESTDIR)$(libdir) > +- rm -f $(DESTDIR)$(libdir)/$(LN1_SLIB) > +- $(LN) -s $(OUT_SLIB) $(DESTDIR)$(libdir)/$(LN1_SLIB) > +- rm -f $(DESTDIR)$(libdir)/$(LN_SLIB) > +- $(LN) -s $(LN1_SLIB) $(DESTDIR)$(libdir)/$(LN_SLIB) > ++ mkdir -p $(DESTDIR)$(libdir)/libnl1 > ++ install -m 0644 $(OUT_LIB) $(DESTDIR)$(libdir)/libnl1 > + > + $(DEPS): ../Makefile.opts > + > +diff -uNr libnl-1.1.orig//Makefile libnl-1.1/Makefile > +--- libnl-1.1.orig//Makefile 2008-01-14 16:48:45.000000000 +0100 > ++++ libnl-1.1/Makefile 2011-03-23 16:53:12.438533242 +0100 > +@@ -13,7 +13,7 @@ > + include Makefile.opts > + endif > + > +-SUBDIRS := lib include doc src tests > ++SUBDIRS := lib include doc > + .PHONY: all clean distclean install gendoc $(SUBDIRS) > + > + all: Makefile.opts > +diff -uNr libnl-1.1.orig//libnl-1.pc.in libnl-1.1/libnl-1.pc.in > +--- libnl-1.1.orig//libnl-1.pc.in 2008-01-14 16:48:45.000000000 +0100 > ++++ libnl-1.1/libnl-1.pc.in 2011-03-23 16:57:18.084533174 +0100 > +@@ -6,5 +6,5 @@ > + Name: libnl > + Description: Convenience library for netlink sockets > + Version: @PACKAGE_VERSION@ > +-Libs: -L${libdir} -lnl > +-Cflags: > ++Libs: -L${libdir}/libnl1 -lnl1 -lm > ++Cflags: -I${includedir}/libnl1 > diff --git a/recipes/libnl/libnl1-1.1/dont-link-libnl-from-sysroot.patch b/recipes/libnl/libnl1-1.1/dont-link-libnl-from-sysroot.patch > new file mode 100644 > index 0000000..beb6361 > --- /dev/null > +++ b/recipes/libnl/libnl1-1.1/dont-link-libnl-from-sysroot.patch > @@ -0,0 +1,26 @@ > +Index: libnl-1.1/src/Makefile > +=================================================================== > +--- libnl-1.1.orig/src/Makefile 2008-01-14 07:48:45.000000000 -0800 > ++++ libnl-1.1/src/Makefile 2010-09-22 14:58:46.820826001 -0700 > +@@ -13,7 +13,7 @@ ifeq ($(shell [ ! -r ../Makefile.opts ] > + include ../Makefile.opts > + endif > + > +-LDFLAGS += -L../lib -lnl utils.o > ++LDFLAGS += ../lib/libnl.so utils.o > + CIN := $(wildcard nl-*.c) $(wildcard genl-*.c) $(wildcard nf-*.c) > + TOOLS := $(CIN:%.c=%) > + > +Index: libnl-1.1/tests/Makefile > +=================================================================== > +--- libnl-1.1.orig/tests/Makefile 2008-01-14 07:48:45.000000000 -0800 > ++++ libnl-1.1/tests/Makefile 2010-09-22 14:58:46.820826001 -0700 > +@@ -13,7 +13,7 @@ ifeq ($(shell [ ! -r ../Makefile.opts ] > + include ../Makefile.opts > + endif > + > +-LDFLAGS += -L../lib -lnl ../src/utils.o > ++LDFLAGS += ../lib/libnl.so ../src/utils.o > + CIN := $(wildcard test-*.c) > + TOOLS := $(CIN:%.c=%) > + > diff --git a/recipes/libnl/libnl1-1.1/fix-includes.patch b/recipes/libnl/libnl1-1.1/fix-includes.patch > new file mode 100644 > index 0000000..b172fd2 > --- /dev/null > +++ b/recipes/libnl/libnl1-1.1/fix-includes.patch > @@ -0,0 +1,13 @@ > +diff -ruN libnl-1.1/lib/route/link/vlan.c libnl-1.1-new/lib/route/link/vlan.c > +--- libnl-1.1/lib/route/link/vlan.c 2008-01-14 18:48:45.000000000 +0300 > ++++ libnl-1.1-new/lib/route/link/vlan.c 2009-01-30 10:55:09.000000000 +0300 > +@@ -26,7 +26,9 @@ > + #include <netlink/route/link/info-api.h> > + #include <netlink/route/link/vlan.h> > + > ++#ifndef VLAN_FLAG_REORDER_HDR > + #include <linux/if_vlan.h> > ++#endif > + > + /** @cond SKIP */ > + #define VLAN_HAS_ID (1<<0) > diff --git a/recipes/libnl/libnl1-1.1/fix-ucred-declaration.patch b/recipes/libnl/libnl1-1.1/fix-ucred-declaration.patch > new file mode 100644 > index 0000000..e31b18e > --- /dev/null > +++ b/recipes/libnl/libnl1-1.1/fix-ucred-declaration.patch > @@ -0,0 +1,23 @@ > +diff -pruN libnl-1.1.orig/include/netlink/handlers.h libnl-1.1/include/netlink/handlers.h > +--- libnl-1.1.orig/include/netlink/handlers.h 2008-01-14 18:48:45.000000000 +0300 > ++++ libnl-1.1/include/netlink/handlers.h 2011-04-12 19:23:16.603292527 +0400 > +@@ -120,6 +120,7 @@ extern struct nl_cb * nl_cb_alloc(enum n > + extern struct nl_cb * nl_cb_clone(struct nl_cb *); > + extern struct nl_cb * nl_cb_get(struct nl_cb *); > + extern void nl_cb_put(struct nl_cb *); > ++struct ucred; > + > + extern int nl_cb_set(struct nl_cb *, enum nl_cb_type, enum nl_cb_kind, > + nl_recvmsg_msg_cb_t, void *); > +diff -pruN libnl-1.1.orig/include/netlink/netlink.h libnl-1.1/include/netlink/netlink.h > +--- libnl-1.1.orig/include/netlink/netlink.h 2008-01-14 18:48:45.000000000 +0300 > ++++ libnl-1.1/include/netlink/netlink.h 2011-04-12 19:23:51.370292658 +0400 > +@@ -50,6 +50,8 @@ extern int nl_send_auto_complete(struc > + extern int nl_send_simple(struct nl_handle *, int, int, > + void *, size_t); > + > ++struct ucred; > ++ > + /* Receive */ > + extern int nl_recv(struct nl_handle *, > + struct sockaddr_nl *, unsigned char **, > diff --git a/recipes/libnl/libnl1-1.1/local-includes.patch b/recipes/libnl/libnl1-1.1/local-includes.patch > new file mode 100644 > index 0000000..85659db > --- /dev/null > +++ b/recipes/libnl/libnl1-1.1/local-includes.patch > @@ -0,0 +1,12 @@ > +diff -urN libnl-1.1.orig/Makefile.opts.in libnl-1.1/Makefile.opts.in > +--- libnl-1.1.orig/Makefile.opts.in 2008-01-14 15:48:45.000000000 +0000 > ++++ libnl-1.1/Makefile.opts.in 2009-04-06 10:20:40.000000000 +0000 > +@@ -10,7 +10,7 @@ > + # > + > + CC := @CC@ > +-CFLAGS := @CFLAGS@ > ++CFLAGS := -I./include -I. -I../include @CFLAGS@ > + LDFLAGS := @LDFLAGS@ > + CPPFLAGS := @CPPFLAGS@ > + PACKAGE_NAME := @PACKAGE_NAME@ > diff --git a/recipes/libnl/libnl1-1.1/netlink-local-fix.patch b/recipes/libnl/libnl1-1.1/netlink-local-fix.patch > new file mode 100644 > index 0000000..51c6736 > --- /dev/null > +++ b/recipes/libnl/libnl1-1.1/netlink-local-fix.patch > @@ -0,0 +1,12 @@ > +Index: libnl-1.1/include/netlink-local.h > +=================================================================== > +--- libnl-1.1.orig/include/netlink-local.h 2009-06-18 15:28:32.614209645 +0400 > ++++ libnl-1.1/include/netlink-local.h 2009-06-18 15:28:44.094190518 +0400 > +@@ -26,6 +26,7 @@ > + #include <sys/socket.h> > + #include <inttypes.h> > + #include <assert.h> > ++#include <limits.h> > + > + #include <arpa/inet.h> > + #include <netdb.h> > diff --git a/recipes/libnl/libnl1-1.1/respect-ldflags.patch b/recipes/libnl/libnl1-1.1/respect-ldflags.patch > new file mode 100644 > index 0000000..ba97dc6 > --- /dev/null > +++ b/recipes/libnl/libnl1-1.1/respect-ldflags.patch > @@ -0,0 +1,12 @@ > +diff -urN libnl-1.1.orig/lib/Makefile libnl-1.1/lib/Makefile > +--- libnl-1.1.orig/lib/Makefile 2008-01-14 15:48:45.000000000 +0000 > ++++ libnl-1.1/lib/Makefile 2009-04-06 10:16:21.000000000 +0000 > +@@ -48,7 +48,7 @@ > + > + $(OUT_SLIB): ../Makefile.opts $(OBJ) > + @echo " LD $(OUT_SLIB)"; \ > +- $(CC) -shared -Wl,-soname,libnl.so.1 -o $(OUT_SLIB) $(OBJ) $(LIBNL_LIB) -lc > ++ $(CC) $(LDFLAGS) -shared -Wl,-soname,libnl.so.1 -o $(OUT_SLIB) $(OBJ) $(LIBNL_LIB) -lc > + @echo " LN $(OUT_SLIB) $(LN1_SLIB)"; \ > + rm -f $(LN1_SLIB) ; $(LN) -s $(OUT_SLIB) $(LN1_SLIB) > + @echo " LN $(LN1_SLIB) $(LN_SLIB)"; \ > diff --git a/recipes/libnl/libnl1.inc b/recipes/libnl/libnl1.inc > new file mode 100644 > index 0000000..5bbac73 > --- /dev/null > +++ b/recipes/libnl/libnl1.inc > @@ -0,0 +1,10 @@ > +require libnl-common.inc > +PE = "libnl" > +S = "${SRCDIR}/libnl-${PV}" > + > +inherit autotools pkgconfig library > + > +DEPENDS += "libm libc" > +DEPENDS_${PN} += "libm libc" > +RDEPENDS_${PN} += "libm libc" > +FILES_${PN} = "${sharedlibdir}/${PN}/lib*.a" > diff --git a/recipes/libnl/libnl1_1.1.oe b/recipes/libnl/libnl1_1.1.oe > new file mode 100644 > index 0000000..f4e6ba4 > --- /dev/null > +++ b/recipes/libnl/libnl1_1.1.oe > @@ -0,0 +1,9 @@ > +require ${PN}.inc > +SRC_URI += "file://local-includes.patch \ > + file://fix-includes.patch \ > + file://respect-ldflags.patch \ > + file://netlink-local-fix.patch \ > + file://dont-link-libnl-from-sysroot.patch \ > + file://build.only.static.lib.patch \ > + file://fix-ucred-declaration.patch \ > +" Add LICENSE in this file. > diff --git a/recipes/libnl/libnl1_1.1.oe.sig b/recipes/libnl/libnl1_1.1.oe.sig > new file mode 100644 > index 0000000..5465761 > --- /dev/null > +++ b/recipes/libnl/libnl1_1.1.oe.sig > @@ -0,0 +1 @@ > +54c7d02f93b09b43338e5cbf42f1373e83566577 libnl-1.1.tar.gz > diff --git a/recipes/libnl/libnl_3.2.14.oe b/recipes/libnl/libnl_3.2.14.oe > index 2f14e7d..42bd2ba 100644 > --- a/recipes/libnl/libnl_3.2.14.oe > +++ b/recipes/libnl/libnl_3.2.14.oe > @@ -1,5 +1,3 @@ > require ${PN}.inc > > -LICENSE = "LGPLv2.1" > - Don't remove LICENSE here. > SRC_URI += "file://fix-pc-file.patch" Please resubmit with these changes. /Esben
diff --git a/recipes/libnl/libnl-common.inc b/recipes/libnl/libnl-common.inc new file mode 100644 index 0000000..114a0f1 --- /dev/null +++ b/recipes/libnl/libnl-common.inc @@ -0,0 +1,6 @@ +DESCRIPTION = "A library for applications dealing with netlink sockets" +HOMEPAGE = "http://www.infradead.org/~tgr/libnl/" +PE ?= "${PN}" +SRC_URI = "http://www.infradead.org/~tgr/${PN}/files/${PE}-${PV}.tar.gz" + +LICENSE = "LGPL-2.1" diff --git a/recipes/libnl/libnl.inc b/recipes/libnl/libnl.inc index 5c287ab..f213125 100644 --- a/recipes/libnl/libnl.inc +++ b/recipes/libnl/libnl.inc @@ -1,8 +1,4 @@ -DESCRIPTION = "A library for applications dealing with netlink sockets" -HOMEPAGE = "http://www.infradead.org/~tgr/libnl/" - -SRC_URI = "http://www.infradead.org/~tgr/${PN}/files/${PN}-${PV}.tar.gz" - +require libnl-common.inc inherit autotools-autoreconf pkgconfig DEPENDS += "libm libpthread libdl" diff --git a/recipes/libnl/libnl1-1.1/build.only.static.lib.patch b/recipes/libnl/libnl1-1.1/build.only.static.lib.patch new file mode 100644 index 0000000..770a392 --- /dev/null +++ b/recipes/libnl/libnl1-1.1/build.only.static.lib.patch @@ -0,0 +1,79 @@ +diff -uNr libnl-1.1.orig//lib/Makefile libnl-1.1/lib/Makefile +--- libnl-1.1.orig//lib/Makefile 2011-03-23 15:50:32.310534329 +0100 ++++ libnl-1.1/lib/Makefile 2011-03-23 15:50:43.926534326 +0100 +@@ -33,18 +33,24 @@ + DEPS := $(CIN:%.c=%.d) + OBJ := $(CIN:%.c=%.o) + CFLAGS += -fPIC ++OUT_LIB := $(PACKAGE_NAME)1.a + OUT_SLIB := $(PACKAGE_NAME).so.$(PACKAGE_VERSION) + LN_SLIB := $(PACKAGE_NAME).so + LN1_SLIB := $(LN_SLIB).1 + + export + +-.PHONY: all clean install librtn.a $(OUT_SLIB) ++.PHONY: all clean install librtn.a $(OUT_SLIB) $(OUT_LIB) + + + all: +- @echo " MAKE $(OUT_SLIB)"; \ +- $(MAKE) $(OUT_SLIB) ++ @echo " MAKE $(OUT_LIB)"; \ ++ $(MAKE) $(OUT_LIB) ++ ++$(OUT_LIB): ../Makefile.opts $(OBJ) ++ @echo " LD $(OUT_LIB)"; \ ++ echo $(AR) rs $(OUT_LIB) $(OBJ) ++ $(AR) rs $(OUT_LIB) $(OBJ) + + $(OUT_SLIB): ../Makefile.opts $(OBJ) + @echo " LD $(OUT_SLIB)"; \ +@@ -56,8 +62,8 @@ + + clean: + @echo " CLEAN lib"; \ +- $(RM) -f $(OBJ) $(OUT_SLIB) $(LN_SLIB) $(LN1_SLIB); \ +- $(RM) -f $(DEPS) $(OUT_SLIB) $(LN_SLIB) $(LN1_SLIB) ++ $(RM) -f $(OBJ) $(OUT_SLIB) $(OUT_LIB) $(LN_SLIB) $(LN1_SLIB); \ ++ $(RM) -f $(DEPS) $(OUT_SLIB) $(OUT_LIB) $(LN_SLIB) $(LN1_SLIB) + + distclean: + @echo " DISTCLEAN lib"; \ +@@ -65,11 +71,7 @@ + + install: +- mkdir -p $(DESTDIR)$(libdir)/ +- install -m 0644 $(OUT_SLIB) $(DESTDIR)$(libdir) +- rm -f $(DESTDIR)$(libdir)/$(LN1_SLIB) +- $(LN) -s $(OUT_SLIB) $(DESTDIR)$(libdir)/$(LN1_SLIB) +- rm -f $(DESTDIR)$(libdir)/$(LN_SLIB) +- $(LN) -s $(LN1_SLIB) $(DESTDIR)$(libdir)/$(LN_SLIB) ++ mkdir -p $(DESTDIR)$(libdir)/libnl1 ++ install -m 0644 $(OUT_LIB) $(DESTDIR)$(libdir)/libnl1 + + $(DEPS): ../Makefile.opts + +diff -uNr libnl-1.1.orig//Makefile libnl-1.1/Makefile +--- libnl-1.1.orig//Makefile 2008-01-14 16:48:45.000000000 +0100 ++++ libnl-1.1/Makefile 2011-03-23 16:53:12.438533242 +0100 +@@ -13,7 +13,7 @@ + include Makefile.opts + endif + +-SUBDIRS := lib include doc src tests ++SUBDIRS := lib include doc + .PHONY: all clean distclean install gendoc $(SUBDIRS) + + all: Makefile.opts +diff -uNr libnl-1.1.orig//libnl-1.pc.in libnl-1.1/libnl-1.pc.in +--- libnl-1.1.orig//libnl-1.pc.in 2008-01-14 16:48:45.000000000 +0100 ++++ libnl-1.1/libnl-1.pc.in 2011-03-23 16:57:18.084533174 +0100 +@@ -6,5 +6,5 @@ + Name: libnl + Description: Convenience library for netlink sockets + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -lnl +-Cflags: ++Libs: -L${libdir}/libnl1 -lnl1 -lm ++Cflags: -I${includedir}/libnl1 diff --git a/recipes/libnl/libnl1-1.1/dont-link-libnl-from-sysroot.patch b/recipes/libnl/libnl1-1.1/dont-link-libnl-from-sysroot.patch new file mode 100644 index 0000000..beb6361 --- /dev/null +++ b/recipes/libnl/libnl1-1.1/dont-link-libnl-from-sysroot.patch @@ -0,0 +1,26 @@ +Index: libnl-1.1/src/Makefile +=================================================================== +--- libnl-1.1.orig/src/Makefile 2008-01-14 07:48:45.000000000 -0800 ++++ libnl-1.1/src/Makefile 2010-09-22 14:58:46.820826001 -0700 +@@ -13,7 +13,7 @@ ifeq ($(shell [ ! -r ../Makefile.opts ] + include ../Makefile.opts + endif + +-LDFLAGS += -L../lib -lnl utils.o ++LDFLAGS += ../lib/libnl.so utils.o + CIN := $(wildcard nl-*.c) $(wildcard genl-*.c) $(wildcard nf-*.c) + TOOLS := $(CIN:%.c=%) + +Index: libnl-1.1/tests/Makefile +=================================================================== +--- libnl-1.1.orig/tests/Makefile 2008-01-14 07:48:45.000000000 -0800 ++++ libnl-1.1/tests/Makefile 2010-09-22 14:58:46.820826001 -0700 +@@ -13,7 +13,7 @@ ifeq ($(shell [ ! -r ../Makefile.opts ] + include ../Makefile.opts + endif + +-LDFLAGS += -L../lib -lnl ../src/utils.o ++LDFLAGS += ../lib/libnl.so ../src/utils.o + CIN := $(wildcard test-*.c) + TOOLS := $(CIN:%.c=%) + diff --git a/recipes/libnl/libnl1-1.1/fix-includes.patch b/recipes/libnl/libnl1-1.1/fix-includes.patch new file mode 100644 index 0000000..b172fd2 --- /dev/null +++ b/recipes/libnl/libnl1-1.1/fix-includes.patch @@ -0,0 +1,13 @@ +diff -ruN libnl-1.1/lib/route/link/vlan.c libnl-1.1-new/lib/route/link/vlan.c +--- libnl-1.1/lib/route/link/vlan.c 2008-01-14 18:48:45.000000000 +0300 ++++ libnl-1.1-new/lib/route/link/vlan.c 2009-01-30 10:55:09.000000000 +0300 +@@ -26,7 +26,9 @@ + #include <netlink/route/link/info-api.h> + #include <netlink/route/link/vlan.h> + ++#ifndef VLAN_FLAG_REORDER_HDR + #include <linux/if_vlan.h> ++#endif + + /** @cond SKIP */ + #define VLAN_HAS_ID (1<<0) diff --git a/recipes/libnl/libnl1-1.1/fix-ucred-declaration.patch b/recipes/libnl/libnl1-1.1/fix-ucred-declaration.patch new file mode 100644 index 0000000..e31b18e --- /dev/null +++ b/recipes/libnl/libnl1-1.1/fix-ucred-declaration.patch @@ -0,0 +1,23 @@ +diff -pruN libnl-1.1.orig/include/netlink/handlers.h libnl-1.1/include/netlink/handlers.h +--- libnl-1.1.orig/include/netlink/handlers.h 2008-01-14 18:48:45.000000000 +0300 ++++ libnl-1.1/include/netlink/handlers.h 2011-04-12 19:23:16.603292527 +0400 +@@ -120,6 +120,7 @@ extern struct nl_cb * nl_cb_alloc(enum n + extern struct nl_cb * nl_cb_clone(struct nl_cb *); + extern struct nl_cb * nl_cb_get(struct nl_cb *); + extern void nl_cb_put(struct nl_cb *); ++struct ucred; + + extern int nl_cb_set(struct nl_cb *, enum nl_cb_type, enum nl_cb_kind, + nl_recvmsg_msg_cb_t, void *); +diff -pruN libnl-1.1.orig/include/netlink/netlink.h libnl-1.1/include/netlink/netlink.h +--- libnl-1.1.orig/include/netlink/netlink.h 2008-01-14 18:48:45.000000000 +0300 ++++ libnl-1.1/include/netlink/netlink.h 2011-04-12 19:23:51.370292658 +0400 +@@ -50,6 +50,8 @@ extern int nl_send_auto_complete(struc + extern int nl_send_simple(struct nl_handle *, int, int, + void *, size_t); + ++struct ucred; ++ + /* Receive */ + extern int nl_recv(struct nl_handle *, + struct sockaddr_nl *, unsigned char **, diff --git a/recipes/libnl/libnl1-1.1/local-includes.patch b/recipes/libnl/libnl1-1.1/local-includes.patch new file mode 100644 index 0000000..85659db --- /dev/null +++ b/recipes/libnl/libnl1-1.1/local-includes.patch @@ -0,0 +1,12 @@ +diff -urN libnl-1.1.orig/Makefile.opts.in libnl-1.1/Makefile.opts.in +--- libnl-1.1.orig/Makefile.opts.in 2008-01-14 15:48:45.000000000 +0000 ++++ libnl-1.1/Makefile.opts.in 2009-04-06 10:20:40.000000000 +0000 +@@ -10,7 +10,7 @@ + # + + CC := @CC@ +-CFLAGS := @CFLAGS@ ++CFLAGS := -I./include -I. -I../include @CFLAGS@ + LDFLAGS := @LDFLAGS@ + CPPFLAGS := @CPPFLAGS@ + PACKAGE_NAME := @PACKAGE_NAME@ diff --git a/recipes/libnl/libnl1-1.1/netlink-local-fix.patch b/recipes/libnl/libnl1-1.1/netlink-local-fix.patch new file mode 100644 index 0000000..51c6736 --- /dev/null +++ b/recipes/libnl/libnl1-1.1/netlink-local-fix.patch @@ -0,0 +1,12 @@ +Index: libnl-1.1/include/netlink-local.h +=================================================================== +--- libnl-1.1.orig/include/netlink-local.h 2009-06-18 15:28:32.614209645 +0400 ++++ libnl-1.1/include/netlink-local.h 2009-06-18 15:28:44.094190518 +0400 +@@ -26,6 +26,7 @@ + #include <sys/socket.h> + #include <inttypes.h> + #include <assert.h> ++#include <limits.h> + + #include <arpa/inet.h> + #include <netdb.h> diff --git a/recipes/libnl/libnl1-1.1/respect-ldflags.patch b/recipes/libnl/libnl1-1.1/respect-ldflags.patch new file mode 100644 index 0000000..ba97dc6 --- /dev/null +++ b/recipes/libnl/libnl1-1.1/respect-ldflags.patch @@ -0,0 +1,12 @@ +diff -urN libnl-1.1.orig/lib/Makefile libnl-1.1/lib/Makefile +--- libnl-1.1.orig/lib/Makefile 2008-01-14 15:48:45.000000000 +0000 ++++ libnl-1.1/lib/Makefile 2009-04-06 10:16:21.000000000 +0000 +@@ -48,7 +48,7 @@ + + $(OUT_SLIB): ../Makefile.opts $(OBJ) + @echo " LD $(OUT_SLIB)"; \ +- $(CC) -shared -Wl,-soname,libnl.so.1 -o $(OUT_SLIB) $(OBJ) $(LIBNL_LIB) -lc ++ $(CC) $(LDFLAGS) -shared -Wl,-soname,libnl.so.1 -o $(OUT_SLIB) $(OBJ) $(LIBNL_LIB) -lc + @echo " LN $(OUT_SLIB) $(LN1_SLIB)"; \ + rm -f $(LN1_SLIB) ; $(LN) -s $(OUT_SLIB) $(LN1_SLIB) + @echo " LN $(LN1_SLIB) $(LN_SLIB)"; \ diff --git a/recipes/libnl/libnl1.inc b/recipes/libnl/libnl1.inc new file mode 100644 index 0000000..5bbac73 --- /dev/null +++ b/recipes/libnl/libnl1.inc @@ -0,0 +1,10 @@ +require libnl-common.inc +PE = "libnl" +S = "${SRCDIR}/libnl-${PV}" + +inherit autotools pkgconfig library + +DEPENDS += "libm libc" +DEPENDS_${PN} += "libm libc" +RDEPENDS_${PN} += "libm libc" +FILES_${PN} = "${sharedlibdir}/${PN}/lib*.a" diff --git a/recipes/libnl/libnl1_1.1.oe b/recipes/libnl/libnl1_1.1.oe new file mode 100644 index 0000000..f4e6ba4 --- /dev/null +++ b/recipes/libnl/libnl1_1.1.oe @@ -0,0 +1,9 @@ +require ${PN}.inc +SRC_URI += "file://local-includes.patch \ + file://fix-includes.patch \ + file://respect-ldflags.patch \ + file://netlink-local-fix.patch \ + file://dont-link-libnl-from-sysroot.patch \ + file://build.only.static.lib.patch \ + file://fix-ucred-declaration.patch \ +" diff --git a/recipes/libnl/libnl1_1.1.oe.sig b/recipes/libnl/libnl1_1.1.oe.sig new file mode 100644 index 0000000..5465761 --- /dev/null +++ b/recipes/libnl/libnl1_1.1.oe.sig @@ -0,0 +1 @@ +54c7d02f93b09b43338e5cbf42f1373e83566577 libnl-1.1.tar.gz diff --git a/recipes/libnl/libnl_3.2.14.oe b/recipes/libnl/libnl_3.2.14.oe index 2f14e7d..42bd2ba 100644 --- a/recipes/libnl/libnl_3.2.14.oe +++ b/recipes/libnl/libnl_3.2.14.oe @@ -1,5 +1,3 @@ require ${PN}.inc -LICENSE = "LGPLv2.1" - SRC_URI += "file://fix-pc-file.patch"