commit:     eb05f1c34454ccbad4bca7032537917d05f894ac
Author:     Rick Farina <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 19 16:57:45 2023 +0000
Commit:     Rick Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Sat Aug 19 17:29:38 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb05f1c3

net-wireless/wpa_supplicant: make crda optional

net-wireless/wireless-regdb now handles crda if requested and other
packages do not need that handling.
Closes: https://bugs.gentoo.org/829958
Signed-off-by: Rick Farina <zerochaos <AT> gentoo.org>

 ...t-9999.ebuild => wpa_supplicant-2.10-r2.ebuild} | 35 +++++-----------------
 .../wpa_supplicant/wpa_supplicant-9999.ebuild      | 35 +++++-----------------
 2 files changed, 16 insertions(+), 54 deletions(-)

diff --git a/net-wireless/wpa_supplicant/wpa_supplicant-9999.ebuild 
b/net-wireless/wpa_supplicant/wpa_supplicant-2.10-r2.ebuild
similarity index 90%
copy from net-wireless/wpa_supplicant/wpa_supplicant-9999.ebuild
copy to net-wireless/wpa_supplicant/wpa_supplicant-2.10-r2.ebuild
index aee70bb7bc41..710e7c4ad2c2 100644
--- a/net-wireless/wpa_supplicant/wpa_supplicant-9999.ebuild
+++ b/net-wireless/wpa_supplicant/wpa_supplicant-2.10-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -18,7 +18,7 @@ else
 fi
 
 SLOT="0"
-IUSE="ap +crda broadcom-sta dbus eap-sim eapol-test fasteap +fils +hs2-0 
macsec +mbo +mesh p2p privsep ps3 qt5 readline selinux smartcard tdls tkip 
uncommon-eap-types wep wimax wps"
+IUSE="ap broadcom-sta dbus eap-sim eapol-test fasteap +fils +hs2-0 macsec +mbo 
+mesh p2p privsep ps3 qt5 readline selinux smartcard tdls tkip 
uncommon-eap-types wep wimax wps"
 
 # CONFIG_PRIVSEP=y does not have sufficient support for the new driver
 # interface functions used for MACsec, so this combination cannot be used
@@ -52,7 +52,6 @@ RDEPEND="${DEPEND}
        selinux? ( sec-policy/selinux-networkmanager )
        kernel_linux? (
                net-wireless/wireless-regdb
-               crda? ( net-wireless/crda )
        )
 "
 BDEPEND="virtual/pkgconfig"
@@ -77,36 +76,18 @@ Kconfig_style_config() {
                        #first remove any leading "# " if $2 is not n
                        sed -i "/^# *$CONFIG_PARAM=/s/^# *//" .config || echo 
"Kconfig_style_config error uncommenting $CONFIG_PARAM"
                        #set item = $setting (defaulting to y)
-                       sed -i "/^$CONFIG_PARAM\>/s/=.*/=$setting/" .config || 
echo "Kconfig_style_config error setting $CONFIG_PARAM=$setting"
+                       if ! sed -i "/^$CONFIG_PARAM\>/s/=.*/=$setting/" 
.config; then
+                               echo "Kconfig_style_config error setting 
$CONFIG_PARAM=$setting"
+                       fi
                        if [ -z "$( grep ^$CONFIG_PARAM= .config )" ] ; then
                                echo "$CONFIG_PARAM=$setting" >>.config
                        fi
                else
                        #ensure item commented out
-                       sed -i "/^$CONFIG_PARAM\>/s/$CONFIG_PARAM/# 
$CONFIG_PARAM/" .config || echo "Kconfig_style_config error commenting 
$CONFIG_PARAM"
-               fi
-}
-
-pkg_pretend() {
-       CONFIG_CHECK=""
-
-       if use crda ; then
-               CONFIG_CHECK="${CONFIG_CHECK} ~CFG80211_CRDA_SUPPORT"
-               WARNING_CFG80211_CRDA_SUPPORT="REGULATORY DOMAIN PROBLEM: 
please enable CFG80211_CRDA_SUPPORT for proper regulatory domain support"
-       fi
-
-       check_extra_config
-
-       if ! use crda ; then
-               if linux_config_exists && linux_chkconfig_builtin CFG80211 &&
-                       [[ $(linux_chkconfig_string EXTRA_FIRMWARE) != 
*regulatory.db* ]]
-               then
-                       ewarn "REGULATORY DOMAIN PROBLEM:"
-                       ewarn "With CONFIG_CFG80211=y (built-in), the driver 
won't be able to load regulatory.db from"
-                       ewarn " /lib/firmware, resulting in broken regulatory 
domain support.  Please set CONFIG_CFG80211=m"
-                       ewarn " or add regulatory.db and regulatory.db.p7s to 
CONFIG_EXTRA_FIRMWARE."
+                       if ! sed -i "/^$CONFIG_PARAM\>/s/$CONFIG_PARAM/# 
$CONFIG_PARAM/" .config; then
+                               echo "Kconfig_style_config error commenting 
$CONFIG_PARAM"
+                       fi
                fi
-       fi
 }
 
 src_prepare() {

diff --git a/net-wireless/wpa_supplicant/wpa_supplicant-9999.ebuild 
b/net-wireless/wpa_supplicant/wpa_supplicant-9999.ebuild
index aee70bb7bc41..710e7c4ad2c2 100644
--- a/net-wireless/wpa_supplicant/wpa_supplicant-9999.ebuild
+++ b/net-wireless/wpa_supplicant/wpa_supplicant-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -18,7 +18,7 @@ else
 fi
 
 SLOT="0"
-IUSE="ap +crda broadcom-sta dbus eap-sim eapol-test fasteap +fils +hs2-0 
macsec +mbo +mesh p2p privsep ps3 qt5 readline selinux smartcard tdls tkip 
uncommon-eap-types wep wimax wps"
+IUSE="ap broadcom-sta dbus eap-sim eapol-test fasteap +fils +hs2-0 macsec +mbo 
+mesh p2p privsep ps3 qt5 readline selinux smartcard tdls tkip 
uncommon-eap-types wep wimax wps"
 
 # CONFIG_PRIVSEP=y does not have sufficient support for the new driver
 # interface functions used for MACsec, so this combination cannot be used
@@ -52,7 +52,6 @@ RDEPEND="${DEPEND}
        selinux? ( sec-policy/selinux-networkmanager )
        kernel_linux? (
                net-wireless/wireless-regdb
-               crda? ( net-wireless/crda )
        )
 "
 BDEPEND="virtual/pkgconfig"
@@ -77,36 +76,18 @@ Kconfig_style_config() {
                        #first remove any leading "# " if $2 is not n
                        sed -i "/^# *$CONFIG_PARAM=/s/^# *//" .config || echo 
"Kconfig_style_config error uncommenting $CONFIG_PARAM"
                        #set item = $setting (defaulting to y)
-                       sed -i "/^$CONFIG_PARAM\>/s/=.*/=$setting/" .config || 
echo "Kconfig_style_config error setting $CONFIG_PARAM=$setting"
+                       if ! sed -i "/^$CONFIG_PARAM\>/s/=.*/=$setting/" 
.config; then
+                               echo "Kconfig_style_config error setting 
$CONFIG_PARAM=$setting"
+                       fi
                        if [ -z "$( grep ^$CONFIG_PARAM= .config )" ] ; then
                                echo "$CONFIG_PARAM=$setting" >>.config
                        fi
                else
                        #ensure item commented out
-                       sed -i "/^$CONFIG_PARAM\>/s/$CONFIG_PARAM/# 
$CONFIG_PARAM/" .config || echo "Kconfig_style_config error commenting 
$CONFIG_PARAM"
-               fi
-}
-
-pkg_pretend() {
-       CONFIG_CHECK=""
-
-       if use crda ; then
-               CONFIG_CHECK="${CONFIG_CHECK} ~CFG80211_CRDA_SUPPORT"
-               WARNING_CFG80211_CRDA_SUPPORT="REGULATORY DOMAIN PROBLEM: 
please enable CFG80211_CRDA_SUPPORT for proper regulatory domain support"
-       fi
-
-       check_extra_config
-
-       if ! use crda ; then
-               if linux_config_exists && linux_chkconfig_builtin CFG80211 &&
-                       [[ $(linux_chkconfig_string EXTRA_FIRMWARE) != 
*regulatory.db* ]]
-               then
-                       ewarn "REGULATORY DOMAIN PROBLEM:"
-                       ewarn "With CONFIG_CFG80211=y (built-in), the driver 
won't be able to load regulatory.db from"
-                       ewarn " /lib/firmware, resulting in broken regulatory 
domain support.  Please set CONFIG_CFG80211=m"
-                       ewarn " or add regulatory.db and regulatory.db.p7s to 
CONFIG_EXTRA_FIRMWARE."
+                       if ! sed -i "/^$CONFIG_PARAM\>/s/$CONFIG_PARAM/# 
$CONFIG_PARAM/" .config; then
+                               echo "Kconfig_style_config error commenting 
$CONFIG_PARAM"
+                       fi
                fi
-       fi
 }
 
 src_prepare() {

Reply via email to