summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Shvetsov <alexxy@gentoo.org>2010-11-08 17:39:02 +0000
committerAlexey Shvetsov <alexxy@gentoo.org>2010-11-08 17:39:02 +0000
commit2c54041655cab9f0798cfd663ab3673c769eea35 (patch)
treef5ba20fb5fe8f7ed33c0d7624370e6450baf24f3 /net-wireless
parentmedia-libs/jpeg -> virtual/jpeg (diff)
downloadhistorical-2c54041655cab9f0798cfd663ab3673c769eea35.tar.gz
historical-2c54041655cab9f0798cfd663ab3673c769eea35.tar.bz2
historical-2c54041655cab9f0798cfd663ab3673c769eea35.zip
[net-wireless/wpa_supplicant] Add wimax libeap support for wpa_supplicant
Package-Manager: portage-2.2.0_alpha4_p14/cvs/Linux x86_64
Diffstat (limited to 'net-wireless')
-rw-r--r--net-wireless/wpa_supplicant/ChangeLog9
-rw-r--r--net-wireless/wpa_supplicant/Manifest24
-rw-r--r--net-wireless/wpa_supplicant/files/wpa_supplicant-0.7.3-generate-libeap-peer.patch395
-rw-r--r--net-wireless/wpa_supplicant/wpa_supplicant-0.7.3-r1.ebuild267
4 files changed, 693 insertions, 2 deletions
diff --git a/net-wireless/wpa_supplicant/ChangeLog b/net-wireless/wpa_supplicant/ChangeLog
index 6d93a4060c85..9f266eaa66ef 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.149 2010/09/26 11:52:03 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/wpa_supplicant/ChangeLog,v 1.150 2010/11/08 17:39:02 alexxy Exp $
+
+*wpa_supplicant-0.7.3-r1 (08 Nov 2010)
+
+ 08 Nov 2010; Alexey Shvetsov <alexxy@gentoo.org>
+ +wpa_supplicant-0.7.3-r1.ebuild,
+ +files/wpa_supplicant-0.7.3-generate-libeap-peer.patch:
+ Add wimax libeap support for wpa_supplicant
26 Sep 2010; Raúl Porcel <armin76@gentoo.org>
wpa_supplicant-0.7.2-r3.ebuild:
diff --git a/net-wireless/wpa_supplicant/Manifest b/net-wireless/wpa_supplicant/Manifest
index 420a396db5a8..74363a3294fb 100644
--- a/net-wireless/wpa_supplicant/Manifest
+++ b/net-wireless/wpa_supplicant/Manifest
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
AUX dbus_path_fix.patch 286 RMD160 891b3b8dc1ed75089a5be31e4a6937fe52178ad0 SHA1 8bf3cc3e970a039c282ca8e01d3096273f1d19f7 SHA256 1d64d21d9a38a41665b054775bfa77c3c3849d2d60d30575434c77b3630ff52f
AUX do-not-call-dbus-functions-with-NULL-path.patch 1931 RMD160 9ba6cc14cb6816062ba208f136785d664e58d347 SHA1 9ae40351bd125d5be0a392bff5239b6f3ce85af4 SHA256 faa5d9bbc79ff719c61ed24bc173ad07699a0b21f9fc472f09157d001299395e
AUX fix-ssid-combo.patch 3713 RMD160 97e68ffcf2ae2a0d45ca5d868e0490ce531af8b4 SHA1 5f12d283fb7bf119807ae01783db99a1f1549c9a SHA256 68e351bf69eb9cba38c093b0f252a89d2b8794039def4697b5f6851feedc7831
@@ -6,6 +9,7 @@ AUX wpa_supplicant-0.6.10-generate-libeap-peer.patch 10190 RMD160 f921ae64098597
AUX wpa_supplicant-0.7.2-dbus_path_fix.patch 316 RMD160 bb1b43b0d369a93fa01cef10ca5ad93d9b608853 SHA1 2f9715b648ceb8c67b15a3b1b345a27b5e1dc933 SHA256 3fdc64892399b158b912dac6902ea8c161e998591d4b3bcf56bc1ab06d7a4791
AUX wpa_supplicant-0.7.2-no-crash.patch 601 RMD160 ade21c632516b4ea179a9bc361d5f8944f5541f4 SHA1 8da52f09f7402dc78b71e39cb5c097169fc7dfa3 SHA256 58922437ffa6be06dd3f6f4e8ae9598c342d6e865f2b43442655666eab3e6611
AUX wpa_supplicant-0.7.3-dbus_path_fix.patch 316 RMD160 bb1b43b0d369a93fa01cef10ca5ad93d9b608853 SHA1 2f9715b648ceb8c67b15a3b1b345a27b5e1dc933 SHA256 3fdc64892399b158b912dac6902ea8c161e998591d4b3bcf56bc1ab06d7a4791
+AUX wpa_supplicant-0.7.3-generate-libeap-peer.patch 11149 RMD160 7598acdba1e561fda981dca063ced10eb064048e SHA1 e1625b02c33caa3212255804f8e1335213a4ee39 SHA256 aaaf08dc2149c0ce8d6622c2cf6b893ba899baf3df0087725974c22f44543f56
AUX wpa_supplicant-conf.d 161 RMD160 8188ddf3448d31c6288d4201cc9d10d0c4ac3ee3 SHA1 c0ca31e2ddb9b2b5cbafc3eba66316e83688b808 SHA256 61ec59007f66ac5bacc0aa095d1f2ccbc977a687038e161a463d1727223d5a90
AUX wpa_supplicant-init.d 1249 RMD160 b91b304a2913ce47f04c625e01e5cc504922cf0f SHA1 0e158f5954e4046af3bc157a1c85aab4bbcc71cb SHA256 62a3655ea88b3dfff5243666a4e90d3f0eef6370a7889affb849e178ba4a82b0
AUX wpa_supplicant.conf 183 RMD160 591d852e8993648793f717402c7b5c52e1f54b71 SHA1 0a7f2922ad2394f475e1485d5537d1b2c6d7cafb SHA256 15082ad37ebd98f57c3733454a0921a79dc2b41007f1b012fb7e67c09d87de3a
@@ -15,6 +19,24 @@ DIST wpa_supplicant-0.7.3.tar.gz 1638224 RMD160 e22f0440d64c943e4b0886eefa3418e7
EBUILD wpa_supplicant-0.6.10-r1.ebuild 7964 RMD160 c655684a622f6483213ccc72045d0768ead956c2 SHA1 84e02c0a23525720f1553f39da36a374d2fe230c SHA256 5a72126b2ecbaa77e7b8b940a9a304cc89695031fb57ec933d89097ae093542d
EBUILD wpa_supplicant-0.6.10.ebuild 7174 RMD160 00bcc016cd92490a79a37d86d639368b70190b74 SHA1 3be13113ff07ce8489e5916cb22addfe723c42bf SHA256 535b47551b6044ace8cad9b9b91da37f453a2c130a6a1e846ed3f18747a2fb5e
EBUILD wpa_supplicant-0.7.2-r3.ebuild 7452 RMD160 146b6a75921a123a2e03af560359a513fe316603 SHA1 6ce002f0b54305a1d86e12d9002581a979f7d778 SHA256 8bae50364de36069e48e71f6efd09be55301f35630e568a2aeae3fefb35dea20
+EBUILD wpa_supplicant-0.7.3-r1.ebuild 7690 RMD160 6d3450c5fa246612b271c4df2c8b907bfb803712 SHA1 34bd8938570f7d36ce194f736a4dc088d354e000 SHA256 962ac0efa4f6ecb7bcefd8f372913db3fb9f47043025b42c1262af5678965629
EBUILD wpa_supplicant-0.7.3.ebuild 7338 RMD160 b08afd181c20f05b73d161a8fdf7143dc8fd1422 SHA1 8fc93a2f91ec3b83b5a36bbbe7ddfed7c7627668 SHA256 da38172c49068cd9c871886fe6c4281e06c7d9ad3d51f8fd28d6f5feb6338321
-MISC ChangeLog 32023 RMD160 20bf999a8c3595ac5769e3b606fc3bbe585c4f7c SHA1 8a74ce392e71a26907cf0b859649f34d5d1e0d3a SHA256 c96df07c04b1b4402adab3676dcd1b086a2fa21b4a9c08cec9b3765d750c4b5b
+MISC ChangeLog 32253 RMD160 d54bca858e79b7c6fd1da4f29e00c1948d78a90a SHA1 d20038f550d30b7ee6b2662aab8dc7071b28d90a SHA256 ce535ae5170a23772ad2247a963508673a851033a37b8ecf8d9630339c1fea38
MISC metadata.xml 832 RMD160 14771aa4f3533875b5f3f900ee513dcda354873d SHA1 01f054ebe9f2bebdf8814558085c65ce9d8a15f6 SHA256 a8de983e560152d0491219686afa13bde6e5aa9fcade3b79e77f179c61bb164c
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.16 (GNU/Linux)
+
+iQIcBAEBCAAGBQJM2DU/AAoJEOf+E+/4L5LmEIsQAJMUK+Zu1+LI/rqlQun0Dv9t
+QkUpkRNdUZ2PN3Vg1UcHM1zGSmJh/2Qv1BuxBSokg+dkOWInXZcCCVG5WLLDAqnC
+azI8JvBnCckGk7Ug3a4d2xd+OwTN7J8x8spWr9z2ggIbaK1fiNG9KD1Ey0pwlEHC
+q8bwf+WrpUmsHmcWBXONOQ8z4PphrdpWL9Mg0YyWauVW7LP7ZOYo8L0gKB3UO5Qf
+61GJ+QdYwuT2KAoM/sjVeU1Nw0kIVMReLdA5ScwuHzvJg/tKmBMSeYZ+xEljS0hN
+eV/btKNRUTTvjLCpX5MeTCL/Su2+fSVgEdfSg1YYfmT320sHZYJmO8g5nhqM8oHh
+hVZioUVwX+JKL623Hy36RrCvtWPC+E5Q6lubAHJpRWhnWQ7FtN7AIGo6dl6EgY74
+K3LNsF8j3aeb3GLPeIpUrs4Zge8qpdFXTJlVsdHrnY7LAF4GVqNFUVe8y75J5TDf
+dpGRIteojc7aYDxkSXygjndiFKhAzYQjIyCAzqfXKtyk9NWrZ9cqACSbmZwI8O5Z
+Ff4yptcTzgcQkEPv0M4ZgavtPm2CSTtSMLnH4GZh4p6HU/OAh7g5vHDtTyMNjVmX
+JrXOcK7whe2AjE6efZ/wSoWmPFkuG9T7hNEI+slw0S5O2M59BvHnfrjXZtkcVZwj
+3b5SHsRhUTWuaRL0QPsv
+=+tmd
+-----END PGP SIGNATURE-----
diff --git a/net-wireless/wpa_supplicant/files/wpa_supplicant-0.7.3-generate-libeap-peer.patch b/net-wireless/wpa_supplicant/files/wpa_supplicant-0.7.3-generate-libeap-peer.patch
new file mode 100644
index 000000000000..a2bbc5c8448e
--- /dev/null
+++ b/net-wireless/wpa_supplicant/files/wpa_supplicant-0.7.3-generate-libeap-peer.patch
@@ -0,0 +1,395 @@
+From 3de5e59b291b6f58317bb16736f8c0271754378e Mon Sep 17 00:00:00 2001
+From: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
+Date: Sat, 2 Oct 2010 00:11:51 -0700
+Subject: [PATCH] eap_peer: create a libeap library, with header files and pkg-config [v2]
+
+This adds infrastructe in src/eap_peer to make libeap.so and install
+the needed header files and pkg-config files.
+
+Now, this is quite dirty and probably not what we want in the long
+term, but serves as an starting point:
+
+ - we don't build from the wpa_supplicant directory because the
+ objects the .so have to be built with -fPIC. So if you need to
+ build both the binary and the library:
+
+ make -C wpa_supplicant
+ make -C src/eap_peer clean
+ make -C src/eap_peer
+
+ As I said, it's dirty -- we'd need either wpa_supplicant linking
+ against the library properly (but that seems not to be desirable)
+ or a multiple object build approach ala automake.
+
+ - need to use 'override CFLAGS' in src/eap_peer/Makefile, otherwise
+ any CFLAGS setting will kill the build infrastructure. I miss
+ AM_CFLAGS.
+
+ - adds 'eap_register_methods()' that will register every compiled in
+ method.
+
+Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
+---
+ build_release | 12 +++
+ src/eap_peer/Makefile | 191 ++++++++++++++++++++++++++++++++++++++++++--
+ src/eap_peer/eap_methods.c | 114 ++++++++++++++++++++++++++
+ src/eap_peer/eap_methods.h | 1 +
+ src/eap_peer/libeap0.pc | 10 +++
+ 5 files changed, 320 insertions(+), 8 deletions(-)
+ create mode 100644 src/eap_peer/libeap0.pc
+
+diff --git a/src/eap_peer/Makefile b/src/eap_peer/Makefile
+index 3651056..58c067a 100644
+--- a/src/eap_peer/Makefile
++++ b/src/eap_peer/Makefile
+@@ -1,11 +1,186 @@
+-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 -O0 -Wall -g
++endif
++
++CONFIG_TLS=openssl
++
++INCLUDE_INSTALL_DIR=/usr/include/eap_peer
++
++# Got to use override all across the board, otherwise a 'make
++# CFLAGS=XX' will kill us because the command line's CFLAGS will
++# overwrite Make's and we'll loose all the infrastructure it sets.
++override CFLAGS += -I. -I.. -I../crypto -I../utils -I../common
++
++# at least for now, need to include config_ssid.h and config_blob.h from
++# wpa_supplicant directory
++override 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/sha1.o
++OBJS_both += ../crypto/sha1-tlsprf.o
++OBJS_both += ../crypto/aes-encblock.o
++OBJS_both += ../crypto/aes-wrap.o
++OBJS_both += ../crypto/aes-ctr.o
++OBJS_both += ../crypto/aes-eax.o
++OBJS_both += ../crypto/aes-omac1.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
++
++override CFLAGS += -DEAP_TLS
++override CFLAGS += -DEAP_PEAP
++override CFLAGS += -DEAP_TTLS
++override CFLAGS += -DEAP_MD5
++override CFLAGS += -DEAP_MSCHAPv2
++override CFLAGS += -DEAP_GTC
++override CFLAGS += -DEAP_OTP
++override CFLAGS += -DEAP_LEAP
++override CFLAGS += -DEAP_PSK
++override CFLAGS += -DEAP_PAX
++override CFLAGS += -DEAP_SAKE
++override CFLAGS += -DEAP_GPSK -DEAP_GPSK_SHA256
++override CFLAGS += -DEAP_TLS_FUNCS
++
++override CFLAGS += -DIEEE8021X_EAPOL
++
++ifeq ($(CONFIG_TLS), openssl)
++override CFLAGS += -DEAP_TLS_OPENSSL
++OBJS_both += ../crypto/tls_openssl.o
++OBJS_both += ../crypto/crypto_openssl.o
++LIBS += -lssl -lcrypto
++override 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
++override CFLAGS += -DCONFIG_TLS_INTERNAL_CLIENT
++
++OBJS_server += ../tls/tlsv1_server.o
++OBJS_server += ../tls/tlsv1_server_write.o ../../tls/tlsv1_server_read.o
++override CFLAGS += -DCONFIG_TLS_INTERNAL_SERVER
++
++override CFLAGS += -DCONFIG_TLS_INTERNAL
++override CFLAGS += -DCONFIG_CRYPTO_INTERNAL
++override CFLAGS += -DCONFIG_INTERNAL_X509
++override CFLAGS += -DINTERNAL_AES
++override CFLAGS += -DINTERNAL_SHA1
++override CFLAGS += -DINTERNAL_SHA256
++override CFLAGS += -DINTERNAL_MD5
++override CFLAGS += -DINTERNAL_MD4
++override CFLAGS += -DINTERNAL_DES
++ifdef CONFIG_INTERNAL_LIBTOMMATH
++override CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH
++else
++LIBS += -ltommath
++endif
++endif
++
++ifndef LDO
++LDO=$(CC)
++endif
++
++
++OBJS_lib=$(OBJS_both) $(OBJS_peer)
++
++ #$(OBJS_server)
++
++override CFLAGS += -fPIC -DPIC
++LDFLAGS += -shared
++
++$(LIBEAP): $(OBJS_lib)
++ $(LDO) $(LDFLAGS) $(OBJS_lib) -Wl,-soname -Wl,$(LIBEAP_SO) -o $(LIBEAP) $(LIBS)
++
++
++UTIL_HEADERS = ../utils/includes.h ../utils/common.h \
++ ../utils/wpabuf.h ../utils/build_config.h \
++ ../utils/os.h ../utils/wpa_debug.h
++COMMON_HEADERS = ../common/defs.h
++EAP_COMMON_HEADERS = ../eap_common/eap_defs.h
++MAIN_HEADERS = eap.h eap_methods.h eap_config.h
++CRYPTO_HEADERS = ../crypto/tls.h
++
++install:
++
++ mkdir -p $(DESTDIR)/usr/lib
++# copy the lib file to std lib location
++ cp $(LIBEAP) $(DESTDIR)/usr/lib
++ ln -fs $(LIBEAP_SO) $(DESTDIR)/usr/lib/$(LIBEAP_NAME).so
++
++# copy the headers reqd by apps using eap peer library in its own subfolder under /usr/include
++ mkdir -p \
++ $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/eap_common \
++ $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/common \
++ $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/util \
++ $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/crypto
++ install -m 0644 $(EAP_COMMON_HEADERS) $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/eap_common
++ install -m 0644 $(COMMON_HEADERS) $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/common
++ install -m 0644 $(CRYPTO_HEADERS) $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/crypto
++ install -m 0644 $(UTIL_HEADERS) $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/util
++ install -m 0644 $(MAIN_HEADERS) $(DESTDIR)/$(INCLUDE_INSTALL_DIR)/
++
++ 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:
+- rm -f *~ *.o *.so *.d
++ rm -f *~ *.o *.so *.d libeap.a $(LIBEAP) $(OBJS_lib)
+
+-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 --git a/src/eap_peer/eap_methods.c b/src/eap_peer/eap_methods.c
+index 3b0af05..092f266 100644
+--- a/src/eap_peer/eap_methods.c
++++ b/src/eap_peer/eap_methods.c
+@@ -340,6 +340,120 @@ int eap_peer_method_register(struct eap_method *method)
+
+
+ /**
++ * eap_peer_register_methods - Register all known EAP peer methods
++ *
++ * This function is called at program start to register all compiled
++ * in EAP peer methods.
++ */
++int eap_peer_register_methods(void)
++{
++ int ret = 0;
++
++#ifdef EAP_MD5
++ if (ret == 0)
++ ret = eap_peer_md5_register();
++#endif /* EAP_MD5 */
++
++#ifdef EAP_TLS
++ if (ret == 0)
++ ret = eap_peer_tls_register();
++#endif /* EAP_TLS */
++
++#ifdef EAP_MSCHAPv2
++ if (ret == 0)
++ ret = eap_peer_mschapv2_register();
++#endif /* EAP_MSCHAPv2 */
++
++#ifdef EAP_PEAP
++ if (ret == 0)
++ ret = eap_peer_peap_register();
++#endif /* EAP_PEAP */
++
++#ifdef EAP_TTLS
++ if (ret == 0)
++ ret = eap_peer_ttls_register();
++#endif /* EAP_TTLS */
++
++#ifdef EAP_GTC
++ if (ret == 0)
++ ret = eap_peer_gtc_register();
++#endif /* EAP_GTC */
++
++#ifdef EAP_OTP
++ if (ret == 0)
++ ret = eap_peer_otp_register();
++#endif /* EAP_OTP */
++
++#ifdef EAP_SIM
++ if (ret == 0)
++ ret = eap_peer_sim_register();
++#endif /* EAP_SIM */
++
++#ifdef EAP_LEAP
++ if (ret == 0)
++ ret = eap_peer_leap_register();
++#endif /* EAP_LEAP */
++
++#ifdef EAP_PSK
++ if (ret == 0)
++ ret = eap_peer_psk_register();
++#endif /* EAP_PSK */
++
++#ifdef EAP_AKA
++ if (ret == 0)
++ ret = eap_peer_aka_register();
++#endif /* EAP_AKA */
++
++#ifdef EAP_AKA_PRIME
++ if (ret == 0)
++ ret = eap_peer_aka_prime_register();
++#endif /* EAP_AKA_PRIME */
++
++#ifdef EAP_FAST
++ if (ret == 0)
++ ret = eap_peer_fast_register();
++#endif /* EAP_FAST */
++
++#ifdef EAP_PAX
++ if (ret == 0)
++ ret = eap_peer_pax_register();
++#endif /* EAP_PAX */
++
++#ifdef EAP_SAKE
++ if (ret == 0)
++ ret = eap_peer_sake_register();
++#endif /* EAP_SAKE */
++
++#ifdef EAP_GPSK
++ if (ret == 0)
++ ret = eap_peer_gpsk_register();
++#endif /* EAP_GPSK */
++
++#ifdef EAP_WSC
++ if (ret == 0)
++ ret = eap_peer_wsc_register();
++#endif /* EAP_WSC */
++
++#ifdef EAP_IKEV2
++ if (ret == 0)
++ ret = eap_peer_ikev2_register();
++#endif /* EAP_IKEV2 */
++
++#ifdef EAP_VENDOR_TEST
++ if (ret == 0)
++ ret = eap_peer_vendor_test_register();
++#endif /* EAP_VENDOR_TEST */
++
++#ifdef EAP_TNC
++ if (ret == 0)
++ ret = eap_peer_tnc_register();
++#endif /* EAP_TNC */
++
++ return ret;
++}
++
++
++/**
+ * eap_peer_unregister_methods - Unregister EAP peer methods
+ *
+ * This function is called at program termination to unregister all EAP peer
+diff --git a/src/eap_peer/eap_methods.h b/src/eap_peer/eap_methods.h
+index 384c61b..b83a46f 100644
+--- a/src/eap_peer/eap_methods.h
++++ b/src/eap_peer/eap_methods.h
+@@ -32,6 +32,7 @@ EapType eap_peer_get_type(const char *name, int *vendor);
+ const char * eap_get_name(int vendor, EapType type);
+ size_t eap_get_names(char *buf, size_t buflen);
+ char ** eap_get_names_as_string_array(size_t *num);
++int eap_peer_register_methods(void);
+ void eap_peer_unregister_methods(void);
+
+ #else /* IEEE8021X_EAPOL */
+diff --git a/src/eap_peer/libeap0.pc b/src/eap_peer/libeap0.pc
+new file mode 100644
+index 0000000..2f8463a
+--- /dev/null
++++ b/src/eap_peer/libeap0.pc
+@@ -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.7.2
++Libs: -L${libdir} -leap
++Cflags: -I${includedir}
+--
+1.6.6.1
+
diff --git a/net-wireless/wpa_supplicant/wpa_supplicant-0.7.3-r1.ebuild b/net-wireless/wpa_supplicant/wpa_supplicant-0.7.3-r1.ebuild
new file mode 100644
index 000000000000..e69e1e1debdd
--- /dev/null
+++ b/net-wireless/wpa_supplicant/wpa_supplicant-0.7.3-r1.ebuild
@@ -0,0 +1,267 @@
+# 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.7.3-r1.ebuild,v 1.1 2010/11/08 17:39:02 alexxy Exp $
+
+EAPI="2"
+
+inherit eutils toolchain-funcs qt4-r2
+
+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 )
+ wimax? ( !net-wireless/libeap )
+ 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}/${P}-dbus_path_fix.patch"
+
+ if use wimax; then
+ cd "${WORKDIR}/${P}"
+ epatch "${FILESDIR}/${P}-generate-libeap-peer.patch"
+ fi
+
+ # bug (320097)
+ epatch "${FILESDIR}/do-not-call-dbus-functions-with-NULL-path.patch"
+}
+
+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
+
+ if use qt4 ; then
+ cd "${S}"/wpa_gui-qt4
+ eqmake4 wpa_gui.pro
+ fi
+}
+
+src_compile() {
+ einfo "Building wpa_supplicant"
+ emake || die "emake failed"
+
+ if use wimax; then
+ emake -C ../src/eap_peer clean || die "emake failed"
+ emake -C ../src/eap_peer || die "emake failed"
+ fi
+
+ if use qt4 ; then
+ cd "${S}"/wpa_gui-qt4
+ einfo "Building wpa_gui"
+ emake || die "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
+ 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
+ emake DESTDIR="${D}" -C ../src/eap_peer install || die
+ fi
+
+ if use dbus ; then
+ cd "${S}"/dbus
+ insinto /etc/dbus-1/system.d
+ newins dbus-wpa_supplicant.conf wpa_supplicant.conf || die
+ insinto /usr/share/dbus-1/system-services
+ doins 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
+}