[oe-commits] Martin Jansa : libnl-1.1: rename to libnl1 and build only static lib

git version control git at git.openembedded.org
Thu Mar 24 10:22:47 UTC 2011


Module: openembedded.git
Branch: master
Commit: f9e42413323c6f402e1e6efd2067373e4bf54a59
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=f9e42413323c6f402e1e6efd2067373e4bf54a59

Author: Martin Jansa <Martin.Jansa at gmail.com>
Date:   Wed Mar 23 16:55:00 2011 +0100

libnl-1.1: rename to libnl1 and build only static lib

* static lib is enough to build nm and shouldn't conflict with libnl2
* this makes special case from libnl1 instead libnl2

Acked-by: Koen Kooi <koen at dominion.thruhere.net>
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>

---

 .../libnl/libnl1-1.1/build.only.static.lib.patch   |   79 ++++++++++++++++++++
 .../dont-link-libnl-from-sysroot.patch             |    0
 .../{libnl-1.1 => libnl1-1.1}/fix-includes.patch   |    0
 .../{libnl-1.1 => libnl1-1.1}/local-includes.patch |    0
 .../netlink-local-fix.patch                        |    0
 .../respect-ldflags.patch                          |    0
 recipes/libnl/{libnl_1.1.bb => libnl1_1.1.bb}      |    5 +
 7 files changed, 84 insertions(+), 0 deletions(-)

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/libnl-1.1/dont-link-libnl-from-sysroot.patch b/recipes/libnl/libnl1-1.1/dont-link-libnl-from-sysroot.patch
similarity index 100%
rename from recipes/libnl/libnl-1.1/dont-link-libnl-from-sysroot.patch
rename to recipes/libnl/libnl1-1.1/dont-link-libnl-from-sysroot.patch
diff --git a/recipes/libnl/libnl-1.1/fix-includes.patch b/recipes/libnl/libnl1-1.1/fix-includes.patch
similarity index 100%
rename from recipes/libnl/libnl-1.1/fix-includes.patch
rename to recipes/libnl/libnl1-1.1/fix-includes.patch
diff --git a/recipes/libnl/libnl-1.1/local-includes.patch b/recipes/libnl/libnl1-1.1/local-includes.patch
similarity index 100%
rename from recipes/libnl/libnl-1.1/local-includes.patch
rename to recipes/libnl/libnl1-1.1/local-includes.patch
diff --git a/recipes/libnl/libnl-1.1/netlink-local-fix.patch b/recipes/libnl/libnl1-1.1/netlink-local-fix.patch
similarity index 100%
rename from recipes/libnl/libnl-1.1/netlink-local-fix.patch
rename to recipes/libnl/libnl1-1.1/netlink-local-fix.patch
diff --git a/recipes/libnl/libnl-1.1/respect-ldflags.patch b/recipes/libnl/libnl1-1.1/respect-ldflags.patch
similarity index 100%
rename from recipes/libnl/libnl-1.1/respect-ldflags.patch
rename to recipes/libnl/libnl1-1.1/respect-ldflags.patch
diff --git a/recipes/libnl/libnl_1.1.bb b/recipes/libnl/libnl1_1.1.bb
similarity index 77%
rename from recipes/libnl/libnl_1.1.bb
rename to recipes/libnl/libnl1_1.1.bb
index d9f250e..3569867 100644
--- a/recipes/libnl/libnl_1.1.bb
+++ b/recipes/libnl/libnl1_1.1.bb
@@ -2,6 +2,9 @@ require libnl.inc
 
 PR = "${INC_PR}.0"
 
+# move it to extra subdirectory
+includedir = "${prefix}/include/libnl1"
+
 CFLAGS += '-DVLAN_FLAG_REORDER_HDR=1'
 
 SRC_URI = "\
@@ -11,7 +14,9 @@ SRC_URI = "\
   file://respect-ldflags.patch \
   file://netlink-local-fix.patch \
   file://dont-link-libnl-from-sysroot.patch \
+  file://build.only.static.lib.patch \
 "
+S = "${WORKDIR}/libnl-${PV}"
 
 SRC_URI[md5sum] = "ae970ccd9144e132b68664f98e7ceeb1"
 SRC_URI[sha256sum] = "35cea4cfb6cd8af0cafa0f34fff81def5a1f193b8b8384299b4b21883e22edc3"





More information about the Openembedded-commits mailing list