summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Shvetsov <alexxy@gentoo.org>2010-07-25 13:29:03 +0000
committerAlexey Shvetsov <alexxy@gentoo.org>2010-07-25 13:29:03 +0000
commit3757a9198e1e217b6cfe9f89b3d625b6a85ce0b2 (patch)
tree9e97b1dc1e0f8b5b5d97d519b4902dfc15766b9f /net-wireless/wpa_supplicant
parentStable on alpha, bug #321493 (diff)
downloadgentoo-2-3757a9198e1e217b6cfe9f89b3d625b6a85ce0b2.tar.gz
gentoo-2-3757a9198e1e217b6cfe9f89b3d625b6a85ce0b2.tar.bz2
gentoo-2-3757a9198e1e217b6cfe9f89b3d625b6a85ce0b2.zip
[net-wireless/wpa_supplicant] Add patch to support wimax-1.5 linux stack
(Portage version: 2.2_rc67_p258/cvs/Linux x86_64)
Diffstat (limited to 'net-wireless/wpa_supplicant')
-rw-r--r--net-wireless/wpa_supplicant/ChangeLog9
-rw-r--r--net-wireless/wpa_supplicant/files/wpa_supplicant-0.6.10-generate-libeap-peer.patch387
-rw-r--r--net-wireless/wpa_supplicant/metadata.xml6
-rw-r--r--net-wireless/wpa_supplicant/wpa_supplicant-0.6.10-r1.ebuild271
-rw-r--r--net-wireless/wpa_supplicant/wpa_supplicant-9999.ebuild4
5 files changed, 674 insertions, 3 deletions
diff --git a/net-wireless/wpa_supplicant/ChangeLog b/net-wireless/wpa_supplicant/ChangeLog
index a8118de125b7..3f39ae117991 100644
--- a/net-wireless/wpa_supplicant/ChangeLog
+++ b/net-wireless/wpa_supplicant/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-wireless/wpa_supplicant
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog,v 1.141 2010/07/19 19:05:02 josejx Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog,v 1.142 2010/07/25 13:29:03 alexxy Exp $
+
+*wpa_supplicant-0.6.10-r1 (25 Jul 2010)
+
+ 25 Jul 2010; Alexey Shvetsov <alexxy@gentoo.org>
+ +wpa_supplicant-0.6.10-r1.ebuild,
+ +files/wpa_supplicant-0.6.10-generate-libeap-peer.patch, metadata.xml:
+ Add patch to support wimax-1.5 linux stack
19 Jul 2010; Joseph Jezak <josejx@gentoo.org>
wpa_supplicant-0.6.10.ebuild:
diff --git a/net-wireless/wpa_supplicant/files/wpa_supplicant-0.6.10-generate-libeap-peer.patch b/net-wireless/wpa_supplicant/files/wpa_supplicant-0.6.10-generate-libeap-peer.patch
new file mode 100644
index 000000000000..ac2b8ec5f4ec
--- /dev/null
+++ b/net-wireless/wpa_supplicant/files/wpa_supplicant-0.6.10-generate-libeap-peer.patch
@@ -0,0 +1,387 @@
+diff -urN wpa_supplicant-0.6.10.orig/src/eap_peer/eap_methods.c wpa_supplicant-0.6.10/src/eap_peer/eap_methods.c
+--- wpa_supplicant-0.6.10.orig/src/eap_peer/eap_methods.c 2010-01-12 17:55:02.000000000 +0300
++++ wpa_supplicant-0.6.10/src/eap_peer/eap_methods.c 2010-07-22 03:45:02.000000000 +0400
+@@ -339,6 +339,146 @@
+ }
+
+
++// ######################################################
++
++#ifdef EAP_MD5
++ int eap_peer_md5_register(void);
++#endif /* EAP_MD5 */
++
++#ifdef EAP_TLS
++ int eap_peer_tls_register(void);
++#endif /* EAP_TLS */
++
++#ifdef EAP_MSCHAPv2
++ int eap_peer_mschapv2_register(void);
++#endif /* EAP_MSCHAPv2 */
++
++#ifdef EAP_PEAP
++ int eap_peer_peap_register(void);
++#endif /* EAP_PEAP */
++
++#ifdef EAP_TTLS
++ int eap_peer_ttls_register(void);
++#endif /* EAP_TTLS */
++
++#ifdef EAP_GTC
++ int eap_peer_gtc_register(void);
++#endif /* EAP_GTC */
++
++#ifdef EAP_OTP
++ int eap_peer_otp_register(void);
++#endif /* EAP_OTP */
++
++#ifdef EAP_SIM
++ int eap_peer_sim_register(void);
++#endif /* EAP_SIM */
++
++#ifdef EAP_LEAP
++ int eap_peer_leap_register(void);
++#endif /* EAP_LEAP */
++
++#ifdef EAP_PSK
++ int eap_peer_psk_register(void);
++#endif /* EAP_PSK */
++
++#ifdef EAP_AKA
++ int eap_peer_aka_register(void);
++#endif /* EAP_AKA */
++
++#ifdef EAP_AKA_PRIME
++ int eap_peer_aka_prime_register(void);
++#endif /* EAP_AKA_PRIME */
++
++#ifdef EAP_FAST
++ int eap_peer_fast_register(void);
++#endif /* EAP_FAST */
++
++#ifdef EAP_PAX
++ int eap_peer_pax_register(void);
++#endif /* EAP_PAX */
++
++#ifdef EAP_SAKE
++ int eap_peer_sake_register(void);
++#endif /* EAP_SAKE */
++
++#ifdef EAP_GPSK
++ int eap_peer_gpsk_register(void);
++#endif /* EAP_GPSK */
++
++#ifdef EAP_WSC
++ int eap_peer_wsc_register(void);
++#endif /* EAP_WSC */
++
++#ifdef EAP_IKEV2
++ int eap_peer_ikev2_register(void);
++#endif /* EAP_IKEV2 */
++
++#ifdef EAP_VENDOR_TEST
++ int eap_peer_vendor_test_register(void);
++#endif /* EAP_VENDOR_TEST */
++
++#ifdef EAP_TNC
++ int eap_peer_tnc_register(void);
++#endif
++
++// ######################################################
++
++int eap_peer_set_method(int eap_method)
++{
++ typedef int (*eap_method_register)();
++
++ static eap_method_register eap_method_register_funcs[] =
++ {
++ NULL, /* EAP_TYPE_NONE = 0, */
++ NULL, /* EAP_TYPE_IDENTITY */
++ NULL, /* EAP_TYPE_NOTIFICATION */
++ NULL, /* EAP_TYPE_NAK */
++#ifdef EAP_MD5
++ eap_peer_md5_register,
++#else
++ NULL, /* EAP_TYPE_MD5 */
++#endif
++ NULL, // EAP_TYPE_OTP
++ NULL, // EAP_TYPE_GTC
++ NULL, // EAP_TYPE_LEAP
++ NULL, // EAP_TYPE_SIM
++ NULL, // EAP_TYPE_AKA
++
++ NULL, // EAP_TYPE_PEAP
++ NULL, // EAP_TYPE_MSCHAPV2
++ NULL, // EAP_TYPE_TLV
++#ifdef EAP_TLS
++ eap_peer_tls_register,
++#else
++ NULL, // EAP_TYPE_TLS
++#endif
++ NULL, // EAP_TYPE_TNC
++ NULL, // EAP_TYPE_FAST
++ NULL, // EAP_TYPE_PAX
++ NULL, // EAP_TYPE_PSK
++ NULL, // EAP_TYPE_SAKE
++ NULL, // EAP_TYPE_IKEV2
++ NULL, // EAP_TYPE_AKA_PRIME
++#ifdef EAP_TTLS
++ eap_peer_ttls_register,
++#else
++ NULL, // EAP_TYPE_TTLS
++#endif
++ NULL // EAP_TYPE_GPSK
++
++ };
++
++
++ if ( eap_method_register_funcs[eap_method] != NULL )
++ {
++ eap_method_register_funcs[eap_method]();
++ return 1;
++ }
++ else
++ return -1;
++}
++
++
+ /**
+ * eap_peer_register_methods - Register statically linked EAP peer methods
+ * Returns: 0 on success, -1 on failure
+diff -urN wpa_supplicant-0.6.10.orig/src/eap_peer/libeap0.pc wpa_supplicant-0.6.10/src/eap_peer/libeap0.pc
+--- wpa_supplicant-0.6.10.orig/src/eap_peer/libeap0.pc 1970-01-01 03:00:00.000000000 +0300
++++ wpa_supplicant-0.6.10/src/eap_peer/libeap0.pc 2010-07-22 03:45:02.000000000 +0400
+@@ -0,0 +1,10 @@
++prefix=/usr
++exec_prefix=/usr
++libdir=${exec_prefix}/lib
++includedir=${prefix}/include/eap_peer
++
++Name: libeap0
++Description: EAP Peer Library API
++Version: 0.6.7
++Libs: -L${libdir} -leap
++Cflags: -I${includedir}
+diff -urN wpa_supplicant-0.6.10.orig/src/eap_peer/Makefile wpa_supplicant-0.6.10/src/eap_peer/Makefile
+--- wpa_supplicant-0.6.10.orig/src/eap_peer/Makefile 2010-01-12 17:55:02.000000000 +0300
++++ wpa_supplicant-0.6.10/src/eap_peer/Makefile 2010-07-22 03:45:31.000000000 +0400
+@@ -1,12 +1,179 @@
+-all:
+- @echo Nothing to be made.
++LIBEAP_NAME = libeap
++LIBEAP_CURRENT = 0
++LIBEAP_REVISION = 0
++LIBEAP_AGE = 0
++
++LIBEAP = $(LIBEAP_NAME).so.$(LIBEAP_CURRENT).$(LIBEAP_REVISION).$(LIBEAP_AGE)
++LIBEAP_SO = $(LIBEAP_NAME).so.$(LIBEAP_CURRENT)
++
++.PHONY: all clean install uninstall
++
++all: $(LIBEAP)
++
++ifndef CC
++CC=gcc
++endif
++
++ifndef CFLAGS
++CFLAGS = -MMD -O2 -Wall -g
++endif
++
++CFLAGS += -fPIC
++
++CONFIG_TLS=openssl
++
++INCLUDE_INSTALL_DIR=/usr/include/eap_peer
++
++CFLAGS += -I.
++CFLAGS += -I ..
++CFLAGS += -I ../crypto
++CFLAGS += -I ../utils
++CFLAGS += -I ../common
++
++# at least for now, need to include config_ssid.h and config_blob.h from
++# wpa_supplicant directory
++CFLAGS += -I ../../wpa_supplicant
++
++OBJS_both += ../utils/common.o
++OBJS_both += ../utils/os_unix.o
++OBJS_both += ../utils/wpa_debug.o
++OBJS_both += ../utils/base64.o
++OBJS_both += ../utils/wpabuf.o
++OBJS_both += ../crypto/md5.o
++OBJS_both += ../crypto/rc4.o
++OBJS_both += ../crypto/md4.o
++OBJS_both += ../crypto/sha1.o
++OBJS_both += ../crypto/des.o
++OBJS_both += ../crypto/aes_wrap.o
++OBJS_both += ../crypto/aes.o
++OBJS_both += ../crypto/ms_funcs.o
++OBJS_both += ../crypto/sha256.o
++
++
++OBJS_both += ../eap_common/eap_peap_common.o
++OBJS_both += ../eap_common/eap_psk_common.o
++OBJS_both += ../eap_common/eap_pax_common.o
++OBJS_both += ../eap_common/eap_sake_common.o
++OBJS_both += ../eap_common/eap_gpsk_common.o
++OBJS_both += ../eap_common/chap.o
++
++OBJS_peer += ../eap_peer/eap_tls.o
++OBJS_peer += ../eap_peer/eap_peap.o
++OBJS_peer += ../eap_peer/eap_ttls.o
++OBJS_peer += ../eap_peer/eap_md5.o
++OBJS_peer += ../eap_peer/eap_mschapv2.o
++OBJS_peer += ../eap_peer/mschapv2.o
++OBJS_peer += ../eap_peer/eap_otp.o
++OBJS_peer += ../eap_peer/eap_gtc.o
++OBJS_peer += ../eap_peer/eap_leap.o
++OBJS_peer += ../eap_peer/eap_psk.o
++OBJS_peer += ../eap_peer/eap_pax.o
++OBJS_peer += ../eap_peer/eap_sake.o
++OBJS_peer += ../eap_peer/eap_gpsk.o
++OBJS_peer += ../eap_peer/eap.o
++OBJS_peer += ../eap_common/eap_common.o
++OBJS_peer += ../eap_peer/eap_methods.o
++OBJS_peer += ../eap_peer/eap_tls_common.o
++
++CFLAGS += -DEAP_TLS
++CFLAGS += -DEAP_PEAP
++CFLAGS += -DEAP_TTLS
++CFLAGS += -DEAP_MD5
++CFLAGS += -DEAP_MSCHAPv2
++CFLAGS += -DEAP_GTC
++CFLAGS += -DEAP_OTP
++CFLAGS += -DEAP_LEAP
++CFLAGS += -DEAP_PSK
++CFLAGS += -DEAP_PAX
++CFLAGS += -DEAP_SAKE
++CFLAGS += -DEAP_GPSK -DEAP_GPSK_SHA256
++CFLAGS += -DEAP_TLS_FUNCS
++
++CFLAGS += -DIEEE8021X_EAPOL
++
++ifeq ($(CONFIG_TLS), openssl)
++CFLAGS += -DEAP_TLS_OPENSSL
++OBJS_both += ../crypto/tls_openssl.o
++OBJS_both += ../crypto/crypto_openssl.o
++LIBS += -lssl -lcrypto
++CFLAGS += -DINTERNAL_SHA256
++endif
++
++ifeq ($(CONFIG_TLS), internal)
++OBJS_both += ../crypto/tls_internal.o
++OBJS_both += ../tls/tlsv1_common.o ../../tls/tlsv1_record.o
++OBJS_both += ../tls/tlsv1_cred.o
++OBJS_both += ../tls/asn1.o ../../tls/x509v3.o
++OBJS_both += ../crypto/crypto_internal.o ../../tls/rsa.o ../../tls/bignum.o
++
++OBJS_peer += ../tls/tlsv1_client.o
++OBJS_peer += ../tls/tlsv1_client_write.o ../../tls/tlsv1_client_read.o
++CFLAGS += -DCONFIG_TLS_INTERNAL_CLIENT
++
++OBJS_server += ../tls/tlsv1_server.o
++OBJS_server += ../tls/tlsv1_server_write.o ../../tls/tlsv1_server_read.o
++CFLAGS += -DCONFIG_TLS_INTERNAL_SERVER
++
++CFLAGS += -DCONFIG_TLS_INTERNAL
++CFLAGS += -DCONFIG_CRYPTO_INTERNAL
++CFLAGS += -DCONFIG_INTERNAL_X509
++CFLAGS += -DINTERNAL_AES
++CFLAGS += -DINTERNAL_SHA1
++CFLAGS += -DINTERNAL_SHA256
++CFLAGS += -DINTERNAL_MD5
++CFLAGS += -DINTERNAL_MD4
++CFLAGS += -DINTERNAL_DES
++ifdef CONFIG_INTERNAL_LIBTOMMATH
++CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH
++else
++LIBS += -ltommath
++endif
++endif
++
++ifndef LDO
++LDO=$(CC)
++endif
++
++
++OBJS_lib=$(OBJS_both) $(OBJS_peer)
++
++ #$(OBJS_server)
++
++CFLAGS += -fPIC -DPIC
++LDFLAGS += -shared
++
++$(LIBEAP): $(OBJS_lib)
++ $(LDO) $(LDFLAGS) $(OBJS_lib) -Wl,-soname -Wl,$(LIBEAP_SO) -o $(LIBEAP) $(LIBS)
++
++
++INCLUDE_HEADERS = ../utils/includes.h ../utils/common.h eap.h ../common/defs.h ../eap_common/eap_defs.h eap_methods.h eap_config.h ../utils/wpabuf.h ../crypto/tls.h ../utils/build_config.h ../utils/os.h ../utils/wpa_debug.h
++
++install:
++
++ mkdir -p $(DESTDIR)/usr/lib
++# copy the lib file to std lib location
++ cp $(LIBEAP) $(DESTDIR)/usr/lib
++
++# copy the headers reqd by apps using eap peer library in its own subfolder under /usr/include
++ test -z $(DESTDIR)/$(INCLUDE_INSTALL_DIR) || mkdir -p $(DESTDIR)/$(INCLUDE_INSTALL_DIR)
++
++# the header folder structure needs to be preserved.
++ test -z $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/eap_common || mkdir -p $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/eap_common
++
++ cp $(INCLUDE_HEADERS) $(DESTDIR)/$(INCLUDE_INSTALL_DIR)
++
++ mv $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/eap_defs.h $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/eap_common
++
++ mkdir -p $(DESTDIR)/usr/lib/pkgconfig
++ cp libeap0.pc $(DESTDIR)/usr/lib/pkgconfig
++
++uninstall:
++
++ rm $(DESTDIR)/usr/lib/$(LIBEAP)
++ rm -fr $(DESTDIR)/$(INCLUDE_INSTALL_DIR)
++ rm -f $(DESTDIR)/usr/lib/pkgconfig/libeap0.pc
+
+ clean:
+- for d in $(SUBDIRS); do make -C $$d clean; done
+- rm -f *~ *.o *.so *.d
++ rm -f core *~ *.o *.d libeap.a $(LIBEAP)
+
+-install:
+- if ls *.so >/dev/null 2>&1; then \
+- install -d $(DESTDIR)$(LIBDIR)/wpa_supplicant && \
+- cp *.so $(DESTDIR)$(LIBDIR)/wpa_supplicant \
+- ; fi
++-include $(OBJS:%.o=%.d)
+diff -urN wpa_supplicant-0.6.10.orig/wpa_supplicant/Makefile wpa_supplicant-0.6.10/wpa_supplicant/Makefile
+--- wpa_supplicant-0.6.10.orig/wpa_supplicant/Makefile 2010-01-12 17:55:02.000000000 +0300
++++ wpa_supplicant-0.6.10/wpa_supplicant/Makefile 2010-07-22 04:04:36.000000000 +0400
+@@ -6,6 +6,8 @@
+ CFLAGS = -MMD -O2 -Wall -g
+ endif
+
++CFLAGS += -fPIC
++
+ export LIBDIR ?= /usr/local/lib/
+ export BINDIR ?= /usr/local/sbin/
+
+@@ -17,7 +19,7 @@
+
+ ALL=wpa_supplicant wpa_passphrase wpa_cli
+
+-all: verify_config $(ALL) dynamic_eap_methods
++all: verify_config $(ALL) dynamic_eap_methods eap_peer_lib
+
+ verify_config:
+ @if [ ! -r .config ]; then \
+@@ -1102,6 +1104,9 @@
+ wpa_cli: $(OBJS_c)
+ $(LDO) $(LDFLAGS) -o wpa_cli $(OBJS_c) $(LIBS_c)
+
++eap_peer_lib:
++ $(MAKE) -C ../src/eap_peer
++
+ link_test: $(OBJS) $(OBJS_h) tests/link_test.o
+ $(LDO) $(LDFLAGS) -o link_test $(OBJS) $(OBJS_h) tests/link_test.o $(LIBS)
+
diff --git a/net-wireless/wpa_supplicant/metadata.xml b/net-wireless/wpa_supplicant/metadata.xml
index efaff3713119..dd5be8ca581f 100644
--- a/net-wireless/wpa_supplicant/metadata.xml
+++ b/net-wireless/wpa_supplicant/metadata.xml
@@ -5,6 +5,10 @@
<email>gurligebis@gentoo.org</email>
<name>Bjarke Istrup Pedersen</name>
</maintainer>
+ <maintainer>
+ <email>alexxy@gentoo.org</email>
+ <name>Alexey Shvetsov</name>
+ </maintainer>
<herd>mobile</herd>
<use>
<flag name='eap-sim'>Add support for EAP-SIM authentication algorithm</flag>
@@ -12,5 +16,7 @@
<flag name='madwifi'>Add support for madwifi (Atheros chipset)</flag>
<flag name='ps3'>Add support for ps3 hypervisor driven gelic wifi</flag>
<flag name='wps'>Add support for Wi-Fi Protected Setup</flag>
+ <flag name='wimax'>Add support for Wimax EAP-PEER authentication
+ algorithm</flag>
</use>
</pkgmetadata>
diff --git a/net-wireless/wpa_supplicant/wpa_supplicant-0.6.10-r1.ebuild b/net-wireless/wpa_supplicant/wpa_supplicant-0.6.10-r1.ebuild
new file mode 100644
index 000000000000..3633427736ff
--- /dev/null
+++ b/net-wireless/wpa_supplicant/wpa_supplicant-0.6.10-r1.ebuild
@@ -0,0 +1,271 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/wpa_supplicant-0.6.10-r1.ebuild,v 1.1 2010/07/25 13:29:03 alexxy Exp $
+
+EAPI="2"
+
+inherit eutils toolchain-funcs qt4
+
+DESCRIPTION="IEEE 802.1X/WPA supplicant for secure wireless transfers"
+HOMEPAGE="http://hostap.epitest.fi/wpa_supplicant/"
+SRC_URI="http://hostap.epitest.fi/releases/${P}.tar.gz"
+LICENSE="|| ( GPL-2 BSD )"
+
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd"
+IUSE="dbus debug gnutls eap-sim fasteap madwifi ps3 qt4 readline ssl wimax wps kernel_linux kernel_FreeBSD"
+
+RDEPEND="dbus? ( sys-apps/dbus )
+ kernel_linux? (
+ eap-sim? ( sys-apps/pcsc-lite )
+ madwifi? ( ||
+ ( >net-wireless/madwifi-ng-tools-0.9.3
+ net-wireless/madwifi-old )
+ )
+ dev-libs/libnl
+ )
+ !kernel_linux? ( net-libs/libpcap )
+ qt4? ( x11-libs/qt-gui:4
+ x11-libs/qt-svg:4 )
+ readline? ( sys-libs/ncurses sys-libs/readline )
+ ssl? ( dev-libs/openssl )
+ !ssl? ( gnutls? ( net-libs/gnutls ) )
+ !ssl? ( !gnutls? ( dev-libs/libtommath ) )"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig"
+
+S="${WORKDIR}/${P}/${PN}"
+
+pkg_setup() {
+ if use fasteap && (use gnutls || use ssl) ; then
+ die "If you use fasteap, you must build with wpa_supplicant's internal TLS implementation. That is, both 'gnutls' and 'ssl' USE flags must be disabled"
+ fi
+
+ if use gnutls && use ssl ; then
+ einfo "You have both 'gnutls' and 'ssl' USE flags enabled: defaulting to USE=\"ssl\""
+ fi
+}
+
+src_prepare() {
+ # net/bpf.h needed for net-libs/libpcap on Gentoo/FreeBSD
+ sed -i \
+ -e "s:\(#include <pcap\.h>\):#include <net/bpf.h>\n\1:" \
+ ../src/l2_packet/l2_packet_freebsd.c || die
+
+ # People seem to take the example configuration file too literally (bug #102361)
+ sed -i \
+ -e "s:^\(opensc_engine_path\):#\1:" \
+ -e "s:^\(pkcs11_engine_path\):#\1:" \
+ -e "s:^\(pkcs11_module_path\):#\1:" \
+ wpa_supplicant.conf || die
+
+ # Change configuration to match Gentoo locations (bug #143750)
+ sed -i \
+ -e "s:/usr/lib/opensc:/usr/$(get_libdir):" \
+ -e "s:/usr/lib/pkcs11:/usr/$(get_libdir):" \
+ wpa_supplicant.conf || die
+
+ epatch "${FILESDIR}"/dbus_path_fix.patch
+
+ if use wimax; then
+ cd "${WORKDIR}/${P}"
+ epatch "${FILESDIR}/${P}-generate-libeap-peer.patch"
+ fi
+}
+
+src_configure() {
+ # Toolchain setup
+ echo "CC = $(tc-getCC)" > .config
+
+ # Basic setup
+ echo "CONFIG_CTRL_IFACE=y" >> .config
+ echo "CONFIG_BACKEND=file" >> .config
+
+ # Basic authentication methods
+ # NOTE: we don't set GPSK or SAKE as they conflict
+ # with the below options
+ echo "CONFIG_EAP_GTC=y" >> .config
+ echo "CONFIG_EAP_MD5=y" >> .config
+ echo "CONFIG_EAP_OTP=y" >> .config
+ echo "CONFIG_EAP_PAX=y" >> .config
+ echo "CONFIG_EAP_PSK=y" >> .config
+ echo "CONFIG_EAP_TLV=y" >> .config
+ echo "CONFIG_IEEE8021X_EAPOL=y" >> .config
+ echo "CONFIG_PKCS12=y" >> .config
+ echo "CONFIG_PEERKEY=y" >> .config
+ echo "CONFIG_EAP_LEAP=y" >> .config
+ echo "CONFIG_EAP_MSCHAPV2=y" >> .config
+ echo "CONFIG_EAP_PEAP=y" >> .config
+ echo "CONFIG_EAP_TLS=y" >> .config
+ echo "CONFIG_EAP_TTLS=y" >> .config
+
+ if use dbus ; then
+ echo "CONFIG_CTRL_IFACE_DBUS=y" >> .config
+ fi
+
+ if use debug ; then
+ echo "CONFIG_DEBUG_FILE=y" >> .config
+ fi
+
+ if use eap-sim ; then
+ # Smart card authentication
+ echo "CONFIG_EAP_SIM=y" >> .config
+ echo "CONFIG_EAP_AKA=y" >> .config
+ echo "CONFIG_EAP_AKA_PRIME=y" >> .config
+ echo "CONFIG_PCSC=y" >> .config
+ fi
+
+ if use fasteap ; then
+ echo "CONFIG_EAP_FAST=y" >> .config
+ fi
+
+ if use readline ; then
+ # readline/history support for wpa_cli
+ echo "CONFIG_READLINE=y" >> .config
+ fi
+
+ # SSL authentication methods
+ if use ssl ; then
+ echo "CONFIG_TLS=openssl" >> .config
+ echo "CONFIG_SMARTCARD=y" >> .config
+ elif use gnutls ; then
+ echo "CONFIG_TLS=gnutls" >> .config
+ echo "CONFIG_GNUTLS_EXTRA=y" >> .config
+ else
+ echo "CONFIG_TLS=internal" >> .config
+ fi
+
+ if use kernel_linux ; then
+ # Linux specific drivers
+ echo "CONFIG_DRIVER_ATMEL=y" >> .config
+ #echo "CONFIG_DRIVER_BROADCOM=y" >> .config
+ #echo "CONFIG_DRIVER_HERMES=y" >> .config
+ echo "CONFIG_DRIVER_HOSTAP=y" >> .config
+ echo "CONFIG_DRIVER_IPW=y" >> .config
+ echo "CONFIG_DRIVER_NDISWRAPPER=y" >> .config
+ echo "CONFIG_DRIVER_NL80211=y" >> .config
+ #echo "CONFIG_DRIVER_PRISM54=y" >> .config
+ echo "CONFIG_DRIVER_RALINK=y" >> .config
+ echo "CONFIG_DRIVER_WEXT=y" >> .config
+ echo "CONFIG_DRIVER_WIRED=y" >> .config
+
+ if use madwifi ; then
+ # Add include path for madwifi-driver headers
+ echo "CFLAGS += -I/usr/include/madwifi" >> .config
+ echo "CONFIG_DRIVER_MADWIFI=y" >> .config
+ fi
+
+ if use ps3 ; then
+ echo "CONFIG_DRIVER_PS3=y" >> .config
+ fi
+
+ elif use kernel_FreeBSD ; then
+ # FreeBSD specific driver
+ echo "CONFIG_DRIVER_BSD=y" >> .config
+ fi
+
+ # Wi-Fi Protected Setup (WPS)
+ if use wps ; then
+ echo "CONFIG_WPS=y" >> .config
+ fi
+
+ # Enable mitigation against certain attacks against TKIP
+ echo "CONFIG_DELAYED_MIC_ERROR_REPORT=y" >> .config
+}
+
+src_compile() {
+ emake || die "emake failed"
+
+ if use qt4 ; then
+ cd "${S}"/wpa_gui-qt4
+ eqmake4 wpa_gui.pro
+ emake || die "Qt4 wpa_gui compilation failed"
+ fi
+}
+
+src_install() {
+ dosbin wpa_supplicant || die
+ dobin wpa_cli wpa_passphrase || die
+
+ # baselayout-1 compat
+ if has_version "<sys-apps/baselayout-2.0.0"; then
+ dodir /sbin
+ dosym /usr/sbin/wpa_supplicant /sbin/wpa_supplicant || die
+ dodir /bin
+ dosym /usr/bin/wpa_cli /bin/wpa_cli || die
+ fi
+
+ if has_version ">=sys-apps/openrc-0.5.0"; then
+ newinitd "$FILESDIR"/${PN}-init.d wpa_supplicant
+ newconfd "$FILESDIR"/${PN}-conf.d wpa_supplicant
+ fi
+
+ exeinto /etc/wpa_supplicant/
+ newexe "${FILESDIR}"/wpa_cli.sh wpa_cli.sh
+
+ dodoc ChangeLog {eap_testing,todo}.txt README{,-WPS} \
+ wpa_supplicant.conf || die "dodoc failed"
+
+ doman doc/docbook/*.{5,8} || die "doman failed"
+
+ if use qt4 ; then
+ into /usr
+ dobin wpa_gui-qt4/wpa_gui || die
+ fi
+
+ if use qt4 ; then
+ doicon wpa_gui-qt4/icons/wpa_gui.svg || die "Icon not found"
+ make_desktop_entry wpa_gui "WPA Supplicant Administration GUI" "wpa_gui" "Qt;Network;"
+ fi
+
+ if use wimax; then
+ insinto /usr/include/eap_peer
+ doins ../src/utils/includes.h
+ doins ../src/utils/common.h
+ doins ../src/eap_peer/eap.h
+ doins ../src/common/defs.h
+ doins ../src/eap_peer/eap_methods.h
+ doins ../src/eap_peer/eap_config.h
+ doins ../src/utils/wpabuf.h
+ doins ../src/crypto/tls.h
+ doins ../src/utils/build_config.h
+ doins ../src/utils/os.h
+ doins ../src/utils/wpa_debug.h
+ insinto /usr/include/eap_peer/eap_common
+ doins ../src/eap_common/eap_defs.h || die
+ insinto /usr/lib/pkgconfig
+ doins ../src/eap_peer/libeap0.pc
+ dolib.so ../src/eap_peer/libeap.so.0.0.0
+ dosym /usr/$(get_libdir)/libeap.so.0.0.0 /usr/$(get_libdir)/libeap.so.0
+ fi
+
+ if use dbus ; then
+ insinto /etc/dbus-1/system.d
+ newins dbus-wpa_supplicant.conf wpa_supplicant.conf || die
+ insinto /usr/share/dbus-1/system-services
+ newins dbus-wpa_supplicant.service 'fi.epitest.hostap.WPASupplicant.service' || die
+ keepdir /var/run/wpa_supplicant
+ fi
+}
+
+pkg_postinst() {
+ einfo "If this is a clean installation of wpa_supplicant, you"
+ einfo "have to create a configuration file named"
+ einfo "/etc/wpa_supplicant/wpa_supplicant.conf"
+ einfo
+ einfo "An example configuration file is available for reference in"
+ einfo "/usr/share/doc/${PF}/"
+
+ if [[ -e ${ROOT}etc/wpa_supplicant.conf ]] ; then
+ echo
+ ewarn "WARNING: your old configuration file ${ROOT}etc/wpa_supplicant.conf"
+ ewarn "needs to be moved to ${ROOT}etc/wpa_supplicant/wpa_supplicant.conf"
+ fi
+
+ if use madwifi ; then
+ echo
+ einfo "This package compiles against the headers installed by"
+ einfo "madwifi-old, madwifi-ng or madwifi-ng-tools."
+ einfo "You should re-emerge ${PN} after upgrading these packages."
+ fi
+}
diff --git a/net-wireless/wpa_supplicant/wpa_supplicant-9999.ebuild b/net-wireless/wpa_supplicant/wpa_supplicant-9999.ebuild
index 8fdda2ced7c8..39eca79b9b1b 100644
--- a/net-wireless/wpa_supplicant/wpa_supplicant-9999.ebuild
+++ b/net-wireless/wpa_supplicant/wpa_supplicant-9999.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/wpa_supplicant-9999.ebuild,v 1.4 2010/03/22 08:51:09 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/wpa_supplicant-9999.ebuild,v 1.5 2010/07/25 13:29:03 alexxy Exp $
EAPI="2"
@@ -22,7 +22,7 @@ HOMEPAGE="http://hostap.epitest.fi/wpa_supplicant/"
LICENSE="|| ( GPL-2 BSD )"
SLOT="0"
-KEYWORDS="-*"
+KEYWORDS=""
IUSE="dbus debug gnutls eap-sim fasteap madwifi ps3 qt4 readline ssl wps kernel_linux kernel_FreeBSD"
DEPEND="dev-libs/libnl