[pkg-wpa-devel] r1631 - in /iw/trunk/debian: changelog patches/always-use-libnl-3.2-as-3.2-not-3.0.patch patches/fix-compilation-against-libnl-3.x.patch patches/series

slh-guest at users.alioth.debian.org slh-guest at users.alioth.debian.org
Mon Nov 14 13:56:39 UTC 2011


Author: slh-guest
Date: Mon Nov 14 13:56:38 2011
New Revision: 1631

URL: http://svn.debian.org/wsvn/pkg-wpa/?sc=1&rev=1631
Log:
* fix linking against different libnl3.x versions, taken from upstream git:
  - fix compilation against libnl-3.x
  - always use libnl 3.2 as 3.2, not 3.0

Added:
    iw/trunk/debian/patches/always-use-libnl-3.2-as-3.2-not-3.0.patch
    iw/trunk/debian/patches/fix-compilation-against-libnl-3.x.patch
Modified:
    iw/trunk/debian/changelog
    iw/trunk/debian/patches/series

Modified: iw/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/debian/changelog?rev=1631&op=diff
==============================================================================
--- iw/trunk/debian/changelog (original)
+++ iw/trunk/debian/changelog Mon Nov 14 13:56:38 2011
@@ -12,11 +12,14 @@
     nl80211 kernel interface.
   * add fix for the newly introduced tx power validation regression from
     upstream, thanks to Felix Fietkau <nbd at openwrt.org>.
+  * fix linking against different libnl3.x versions, taken from upstream git:
+    - fix compilation against libnl-3.x
+    - always use libnl 3.2 as 3.2, not 3.0
 
   [ Jonathan Nieder ]
   * change Priority to optional from extra (Closes: #591102).
 
- -- Stefan Lippers-Hollmann <s.l-h at gmx.de>  Mon, 07 Nov 2011 20:22:13 +0100
+ -- Stefan Lippers-Hollmann <s.l-h at gmx.de>  Mon, 14 Nov 2011 14:53:38 +0100
 
 iw (3.1-1) unstable; urgency=low
 

Added: iw/trunk/debian/patches/always-use-libnl-3.2-as-3.2-not-3.0.patch
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/debian/patches/always-use-libnl-3.2-as-3.2-not-3.0.patch?rev=1631&op=file
==============================================================================
--- iw/trunk/debian/patches/always-use-libnl-3.2-as-3.2-not-3.0.patch (added)
+++ iw/trunk/debian/patches/always-use-libnl-3.2-as-3.2-not-3.0.patch Mon Nov 14 13:56:38 2011
@@ -1,0 +1,42 @@
+From 57df6fdf8df8ea9b72d6afdf9da09343b8138261 Mon Sep 17 00:00:00 2001
+From: Bjarke Istrup Pedersen <gurli at gurlinet.dk>
+Date: Mon, 14 Nov 2011 11:12:19 +0100
+Subject: [PATCH 2/2] always use libnl 3.2 as 3.2, not 3.0
+
+With libnl 3.2, both LIBNL3FOUND and LIBNL3xFOUND
+might become true, leading to errors. Disable the
+former if the latter is found.
+---
+ Makefile |   14 ++++++++------
+ 1 files changed, 8 insertions(+), 6 deletions(-)
+
+--- a/Makefile
++++ b/Makefile
+@@ -38,6 +38,14 @@ LIBS += -lnl-genl
+ NLLIBNAME = libnl-2.0
+ endif
+ 
++ifeq ($(NL3xFOUND),Y)
++# libnl 3.2 might be found as 3.2 and 3.0
++NL3FOUND = N
++CFLAGS += -DCONFIG_LIBNL30
++LIBS += -lnl-genl-3
++NLLIBNAME = libnl-3.0
++endif
++
+ ifeq ($(NL3FOUND),Y)
+ CFLAGS += -DCONFIG_LIBNL30
+ LIBS += -lnl-genl
+@@ -52,12 +60,6 @@ LIBS += -lnl-genl
+ NLLIBNAME = libnl-3.1
+ endif
+ 
+-ifeq ($(NL3xFOUND),Y)
+-CFLAGS += -DCONFIG_LIBNL30
+-LIBS += -lnl-genl-3
+-NLLIBNAME = libnl-3.0
+-endif
+-
+ ifeq ($(NLLIBNAME),)
+ $(error Cannot find development files for any supported version of libnl)
+ endif

Added: iw/trunk/debian/patches/fix-compilation-against-libnl-3.x.patch
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/debian/patches/fix-compilation-against-libnl-3.x.patch?rev=1631&op=file
==============================================================================
--- iw/trunk/debian/patches/fix-compilation-against-libnl-3.x.patch (added)
+++ iw/trunk/debian/patches/fix-compilation-against-libnl-3.x.patch Mon Nov 14 13:56:38 2011
@@ -1,0 +1,96 @@
+From 9c1d758129e02af5623b4faa52342b8bae3f5fd9 Mon Sep 17 00:00:00 2001
+From: Gilles Espinasse <g.esp at free.fr>
+Date: Sat, 12 Nov 2011 00:04:38 +0100
+Subject: [PATCH 1/2] fix compilation against libnl-3.x
+
+Add configuration to compile against 3.1 and 3.2 without breaking 3.0
+That's a bit of mess with version on .pc file and the part which belong or not to the shared lib name.
+
+libnl-genl-3.1 is broken and can't be used
+
+Starting from 3.2.0, I could have used libnl-genl-3.0.pc file like in patch V1 and not hardcode adding libnl-genl-3 into LIBS
+I consider this a matter of tast for now, coded like previous versions that can't use that way to code.
+
+Added an echo to display against which libnl version iw is compiled.
+That particulary help me to test with various versions because of the mess on .pc file version as libnl>=3.2.0 has again pc file version with 3.0 number.
+
+Removed the version_check part instead of extending blindly for the new versions.
+That was mostly dead code because prior check on NLLIBNAME not empty already care.
+The only case where that could matter would be using something stupid like
+NLLIBNAME=foo make
+
+Compilation tested to work against
+- libnl-2.0
+- libnl-3.0
+- libnl-3.1
+- libnl-3.2.0
+- libnl-3.2.2
+
+Tested to fail without a libnl .pc file
+
+Signed-off-by: Gilles Espinasse <g.esp at free.fr>
+---
+ Makefile |   32 ++++++++++++++++++--------------
+ 1 files changed, 18 insertions(+), 14 deletions(-)
+
+--- a/Makefile
++++ b/Makefile
+@@ -25,6 +25,8 @@ ALL = iw
+ NL1FOUND := $(shell $(PKG_CONFIG) --atleast-version=1 libnl-1 && echo Y)
+ NL2FOUND := $(shell $(PKG_CONFIG) --atleast-version=2 libnl-2.0 && echo Y)
+ NL3FOUND := $(shell $(PKG_CONFIG) --atleast-version=3 libnl-3.0 && echo Y)
++NL31FOUND := $(shell $(PKG_CONFIG) --exact-version=3.1 libnl-3.1 && echo Y)
++NL3xFOUND := $(shell $(PKG_CONFIG) --atleast-version=3.2 libnl-3.0 && echo Y)
+ 
+ ifeq ($(NL1FOUND),Y)
+ NLLIBNAME = libnl-1
+@@ -42,12 +44,27 @@ LIBS += -lnl-genl
+ NLLIBNAME = libnl-3.0
+ endif
+ 
++# nl-3.1 has a broken libnl-gnl-3.1.pc file
++# as show by pkg-config --debug --libs --cflags --exact-version=3.1 libnl-genl-3.1;echo $?
++ifeq ($(NL31FOUND),Y)
++CFLAGS += -DCONFIG_LIBNL30
++LIBS += -lnl-genl
++NLLIBNAME = libnl-3.1
++endif
++
++ifeq ($(NL3xFOUND),Y)
++CFLAGS += -DCONFIG_LIBNL30
++LIBS += -lnl-genl-3
++NLLIBNAME = libnl-3.0
++endif
++
+ ifeq ($(NLLIBNAME),)
+ $(error Cannot find development files for any supported version of libnl)
+ endif
+ 
+ LIBS += $(shell $(PKG_CONFIG) --libs $(NLLIBNAME))
+ CFLAGS += $(shell $(PKG_CONFIG) --cflags $(NLLIBNAME))
++NLVERSION :=$(shell $(PKG_CONFIG) --print-provides $(NLLIBNAME))
+ 
+ ifeq ($(V),1)
+ Q=
+@@ -57,20 +74,7 @@ Q=@
+ NQ=echo
+ endif
+ 
+-all: version_check $(ALL)
+-
+-version_check:
+-ifeq ($(NL3FOUND),Y)
+-else
+-ifeq ($(NL2FOUND),Y)
+-else
+-ifeq ($(NL1FOUND),Y)
+-else
+-	$(error No libnl found)
+-endif
+-endif
+-endif
+-
++all: $(ALL)
+ 
+ VERSION_OBJS := $(filter-out version.o, $(OBJS))
+ 

Modified: iw/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-wpa/iw/trunk/debian/patches/series?rev=1631&op=diff
==============================================================================
--- iw/trunk/debian/patches/series (original)
+++ iw/trunk/debian/patches/series Mon Nov 14 13:56:38 2011
@@ -1,2 +1,4 @@
 dont-use-git-on-the-buildd.patch
 iw_fix-regression-in-tx-power-validation.patch
+fix-compilation-against-libnl-3.x.patch
+always-use-libnl-3.2-as-3.2-not-3.0.patch




More information about the Pkg-wpa-devel mailing list