summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjarke Istrup Pedersen <gurligebis@gentoo.org>2011-09-09 23:17:31 +0000
committerBjarke Istrup Pedersen <gurligebis@gentoo.org>2011-09-09 23:17:31 +0000
commit581f1c0da6ca3e671db8e280601af27090f54e96 (patch)
tree445e87c72f416a305cd8ef178c53e8434186cd64 /net-wireless
parentSwitch JNLP dep once again, bug #382351. (diff)
downloadgentoo-2-581f1c0da6ca3e671db8e280601af27090f54e96.tar.gz
gentoo-2-581f1c0da6ca3e671db8e280601af27090f54e96.tar.bz2
gentoo-2-581f1c0da6ca3e671db8e280601af27090f54e96.zip
Bumping to 3.1
(Portage version: 2.2.0_alpha54/cvs/Linux i686)
Diffstat (limited to 'net-wireless')
-rw-r--r--net-wireless/iw/ChangeLog8
-rw-r--r--net-wireless/iw/files/iw-3.1_libnl-3-support.patch88
-rw-r--r--net-wireless/iw/iw-3.1.ebuild (renamed from net-wireless/iw/iw-3.0.ebuild)12
3 files changed, 104 insertions, 4 deletions
diff --git a/net-wireless/iw/ChangeLog b/net-wireless/iw/ChangeLog
index 9c8f426a072b..07804f89b643 100644
--- a/net-wireless/iw/ChangeLog
+++ b/net-wireless/iw/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-wireless/iw
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/iw/ChangeLog,v 1.35 2011/08/19 09:19:40 gurligebis Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/iw/ChangeLog,v 1.36 2011/09/09 23:17:31 gurligebis Exp $
+
+*iw-3.1 (09 Sep 2011)
+
+ 09 Sep 2011; <gurligebis@gentoo.org> -iw-3.0.ebuild, +iw-3.1.ebuild,
+ +files/iw-3.1_libnl-3-support.patch:
+ Bumping to 3.1 and adding support for libnl 3.0 and 3.1
*iw-3.0 (19 Aug 2011)
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
new file mode 100644
index 000000000000..001d3a64c3b4
--- /dev/null
+++ b/net-wireless/iw/files/iw-3.1_libnl-3-support.patch
@@ -0,0 +1,88 @@
+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/iw-3.0.ebuild b/net-wireless/iw/iw-3.1.ebuild
index fda0ff891529..549d855a8e3e 100644
--- a/net-wireless/iw/iw-3.0.ebuild
+++ b/net-wireless/iw/iw-3.1.ebuild
@@ -1,12 +1,14 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/iw/iw-3.0.ebuild,v 1.1 2011/08/19 09:19:40 gurligebis Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/iw/iw-3.1.ebuild,v 1.1 2011/09/09 23:17:31 gurligebis Exp $
-inherit toolchain-funcs
+EAPI="2"
+
+inherit toolchain-funcs eutils
DESCRIPTION="nl80211-based configuration utility for wireless devices using the mac80211 kernel stack"
HOMEPAGE="http://wireless.kernel.org/en/users/Documentation/iw"
-SRC_URI="http://wireless.kernel.org/download/${PN}/${P}.tar.bz2"
+SRC_URI="http://linuxwireless.org/download/${PN}/${P}.tar.bz2"
LICENSE="as-is"
SLOT="0"
@@ -20,6 +22,10 @@ DEPEND="${RDEPEND}
CC=$(tc-getCC)
LD=$(tc-getLD)
+src_prepare() {
+ epatch "${FILESDIR}/${P}_libnl-3-support.patch"
+}
+
src_install() {
emake install DESTDIR="${D}" || die "Failed to install"
}