commit:     9040d6c5be62a68a0cfc2a5fc824e9abc5f19951
Author:     Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com>
AuthorDate: Sun Nov  6 21:26:04 2016 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Sun Dec  4 00:54:19 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9040d6c5

net-wireless/wpa_supplicant: Move USE=gnutls behind USE=ssl flag.

Gentoo-Bug: https://bugs.gentoo.org/587238

Package-Manager: portage-2.3.0
Closes: https://github.com/gentoo/gentoo/pull/2673

 .../wpa_supplicant/wpa_supplicant-2.6-r1.ebuild    | 34 +++++++++++++---------
 1 file changed, 20 insertions(+), 14 deletions(-)

diff --git a/net-wireless/wpa_supplicant/wpa_supplicant-2.6-r1.ebuild 
b/net-wireless/wpa_supplicant/wpa_supplicant-2.6-r1.ebuild
index 5db3238..18e0b3e 100644
--- a/net-wireless/wpa_supplicant/wpa_supplicant-2.6-r1.ebuild
+++ b/net-wireless/wpa_supplicant/wpa_supplicant-2.6-r1.ebuild
@@ -14,7 +14,7 @@ LICENSE="|| ( GPL-2 BSD )"
 SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 
~x86-fbsd"
 IUSE="ap dbus gnutls eap-sim fasteap +hs2-0 libressl p2p ps3 qt5 readline 
selinux smartcard ssl tdls uncommon-eap-types wimax wps kernel_linux 
kernel_FreeBSD"
-REQUIRED_USE="fasteap? ( !gnutls !ssl ) smartcard? ( ssl )"
+REQUIRED_USE="fasteap? ( !ssl ) smartcard? ( ssl )"
 
 CDEPEND="dbus? ( sys-apps/dbus )
        kernel_linux? (
@@ -34,16 +34,16 @@ CDEPEND="dbus? ( sys-apps/dbus )
                sys-libs/readline:0=
        )
        ssl? (
-               !libressl? ( dev-libs/openssl:0= )
-               libressl? ( dev-libs/libressl:0= )
-       )
-       !ssl? (
                gnutls? (
-                       dev-libs/libgcrypt:*
-                       net-libs/gnutls
+                       dev-libs/libgcrypt:0=
+                       net-libs/gnutls:=
+               )
+               !gnutls? (
+                       !libressl? ( dev-libs/openssl:0= )
+                       libressl? ( dev-libs/libressl:0= )
                )
-               !gnutls? ( dev-libs/libtommath )
        )
+       !ssl? ( dev-libs/libtommath )
 "
 DEPEND="${CDEPEND}
        virtual/pkgconfig
@@ -72,8 +72,12 @@ Kconfig_style_config() {
 }
 
 pkg_setup() {
-       if use gnutls && use ssl ; then
-               elog "You have both 'gnutls' and 'ssl' USE flags enabled: 
defaulting to USE=\"ssl\""
+       if use ssl ; then
+               if use gnutls && use libressl ; then
+                       elog "You have both 'gnutls' and 'libressl' USE flags 
enabled: defaulting to USE=\"gnutls\""
+               fi
+       else
+               elog "You have 'ssl' USE flag disabled: defaulting to internal 
TLS implementation"
        fi
 }
 
@@ -204,10 +208,12 @@ src_configure() {
 
        # SSL authentication methods
        if use ssl ; then
-               Kconfig_style_config TLS openssl
-       elif use gnutls ; then
-               Kconfig_style_config TLS gnutls
-               Kconfig_style_config GNUTLS_EXTRA
+               if use gnutls ; then
+                       Kconfig_style_config TLS gnutls
+                       Kconfig_style_config GNUTLS_EXTRA
+               else
+                       Kconfig_style_config TLS openssl
+               fi
        else
                Kconfig_style_config TLS internal
        fi

Reply via email to