summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjarke Istrup Pedersen <gurligebis@gentoo.org>2011-11-14 10:07:52 +0000
committerBjarke Istrup Pedersen <gurligebis@gentoo.org>2011-11-14 10:07:52 +0000
commite6309678f9a874388b1dbda69ac99d2e2b18ca35 (patch)
tree3297e567891f5229349450394ae895ab9b8408bd /net-wireless/iw/files
parentRework the libav-0.7 patch to copy the filename (diff)
downloadgentoo-2-e6309678f9a874388b1dbda69ac99d2e2b18ca35.tar.gz
gentoo-2-e6309678f9a874388b1dbda69ac99d2e2b18ca35.tar.bz2
gentoo-2-e6309678f9a874388b1dbda69ac99d2e2b18ca35.zip
Bumping to 3.2 and fixing bug 389173
(Portage version: 2.2.0_alpha74/cvs/Linux i686)
Diffstat (limited to 'net-wireless/iw/files')
-rw-r--r--net-wireless/iw/files/iw-3.1_libnl-3-support.patch88
-rw-r--r--net-wireless/iw/files/iw-3.2_libnl-3x-compile.diff69
2 files changed, 69 insertions, 88 deletions
diff --git a/net-wireless/iw/files/iw-3.1_libnl-3-support.patch b/net-wireless/iw/files/iw-3.1_libnl-3-support.patch
deleted file mode 100644
index 001d3a64c3b4..000000000000
--- a/net-wireless/iw/files/iw-3.1_libnl-3-support.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-diff -aurp a/iw.c b/iw.c
---- a/iw.c 2011-09-09 23:08:55.539173966 +0000
-+++ b/iw.c 2011-09-09 23:10:31.139170016 +0000
-@@ -23,9 +23,8 @@
- #include "nl80211.h"
- #include "iw.h"
-
--#ifndef CONFIG_LIBNL20
--/* libnl 2.0 compatibility code */
--
-+/* libnl 1.x compatibility code */
-+#if !defined(CONFIG_LIBNL20) && !defined(CONFIG_LIBNL30) && !defined(CONFIG_LIBNL31)
- static inline struct nl_handle *nl_socket_alloc(void)
- {
- return nl_handle_alloc();
-@@ -45,7 +44,7 @@ static inline int __genl_ctrl_alloc_cach
- return 0;
- }
- #define genl_ctrl_alloc_cache __genl_ctrl_alloc_cache
--#endif /* CONFIG_LIBNL20 */
-+#endif /* CONFIG_LIBNL20 && CONFIG_LIBNL30 && CONFIG_LIBNL31 */
-
- int iw_debug = 0;
-
-diff -aurp a/iw.h b/iw.h
---- a/iw.h 2011-09-09 23:08:55.539173966 +0000
-+++ b/iw.h 2011-09-09 23:11:28.149167067 +0000
-@@ -11,7 +11,8 @@
-
- #define ETH_ALEN 6
-
--#ifndef CONFIG_LIBNL20
-+/* libnl 1.x compatibility code */
-+#if !defined(CONFIG_LIBNL20) && !defined(CONFIG_LIBNL30) && !defined(CONFIG_LIBNL31)
- # define nl_sock nl_handle
- #endif
-
-diff -aurp a/Makefile b/Makefile
---- a/Makefile 2011-09-09 23:08:55.539173966 +0000
-+++ b/Makefile 2011-09-09 23:12:49.528163734 +0000
-@@ -24,6 +24,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) --atleast-version=3 libnl-3.1 && echo Y)
-
- ifeq ($(NL1FOUND),Y)
- NLLIBNAME = libnl-1
-@@ -35,6 +37,18 @@ LIBS += -lnl-genl
- NLLIBNAME = libnl-2.0
- endif
-
-+ifeq ($(NL3FOUND),Y)
-+CFLAGS += -DCONFIG_LIBNL30
-+LIBS += -lnl-genl
-+NLLIBNAME = libnl-3.0
-+endif
-+
-+ifeq ($(NL31FOUND),Y)
-+CFLAGS += -DCONFIG_LIBNL31
-+LIBS += -lnl-genl
-+NLLIBNAME = libnl-3.1
-+endif
-+
- ifeq ($(NLLIBNAME),)
- $(error Cannot find development files for any supported version of libnl)
- endif
-@@ -53,6 +67,10 @@ endif
- all: version_check $(ALL)
-
- version_check:
-+ifeq ($(NL31FOUND),Y)
-+else
-+ifeq ($(NL3FOUND),Y)
-+else
- ifeq ($(NL2FOUND),Y)
- else
- ifeq ($(NL1FOUND),Y)
-@@ -60,6 +78,8 @@ else
- $(error No libnl found)
- endif
- endif
-+endif
-+endif
-
-
- VERSION_OBJS := $(filter-out version.o, $(OBJS))
diff --git a/net-wireless/iw/files/iw-3.2_libnl-3x-compile.diff b/net-wireless/iw/files/iw-3.2_libnl-3x-compile.diff
new file mode 100644
index 000000000000..199fc20a0161
--- /dev/null
+++ b/net-wireless/iw/files/iw-3.2_libnl-3x-compile.diff
@@ -0,0 +1,69 @@
+diff -aurp old/Makefile new/Makefile
+--- old/Makefile 2011-11-04 10:53:29.000000000 +0000
++++ new/Makefile 2011-11-14 09:30:04.514995618 +0000
+@@ -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
+@@ -36,18 +38,34 @@ LIBS += -lnl-genl
+ NLLIBNAME = libnl-2.0
+ endif
+
++ifeq ($(NL3xFOUND),Y)
++NL3FOUND = N
++CFLAGS += -DCONFIG_LIBNL30
++LIBS += -lnl-genl-3
++NLLIBNAME = libnl-3.0
++endif
++
+ ifeq ($(NL3FOUND),Y)
+ CFLAGS += -DCONFIG_LIBNL30
+ 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 ($(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 +75,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))
+