commit:     521ac32673a1a454420ab24908cd07b09cd0e0c2
Author:     David Ruth <druth <AT> google <DOT> com>
AuthorDate: Wed Mar 19 17:57:40 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Mar 20 00:01:10 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=521ac326

net-wireless/wireless-regdb: add 20250220

Signed-off-by: David Ruth <druth <AT> google.com>
Closes: https://github.com/gentoo/gentoo/pull/41175
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-wireless/wireless-regdb/Manifest               |  1 +
 .../wireless-regdb/wireless-regdb-20250220.ebuild  | 61 ++++++++++++++++++++++
 2 files changed, 62 insertions(+)

diff --git a/net-wireless/wireless-regdb/Manifest 
b/net-wireless/wireless-regdb/Manifest
index b7c60c2a5733..0f2aa34e7539 100644
--- a/net-wireless/wireless-regdb/Manifest
+++ b/net-wireless/wireless-regdb/Manifest
@@ -1 +1,2 @@
 DIST wireless-regdb-2024.05.08.tar.xz 27716 BLAKE2B 
223268c6ba9e3f616b28a9317d62ac687cd09c9ff3cc8e0d0827b3a59efa7b3bc64c0c094b70aaceb87cffba7d36d36d550c001d0778238adcf2ac5cbe3f6b93
 SHA512 
edb562d708be7119e80bb48d7520c11e409b81178168f9c6873ea97a2e4d9277d02d3b72b1af9f0302ba2e252d94d14c4468ee4cc1a6bb186a17d74c57d7594d
+DIST wireless-regdb-2025.02.20.tar.xz 30900 BLAKE2B 
ae089e9bfb92c0643f537aed8aab7907a0179aedc0a0356f9ec483063d677d999839cffa8e6574e50d7fff82f5824466d4a23ca780bbe386c4c4be6b975a2bd6
 SHA512 
d7ccdd10d7258ef5470f90e0bb9aacd80f55e315e9703e2d765cdc09cdbf72179fe0a7ca1340b6338bc25c8d423401d1666a1243a4a118f03eafdb4b8c4a921b

diff --git a/net-wireless/wireless-regdb/wireless-regdb-20250220.ebuild 
b/net-wireless/wireless-regdb/wireless-regdb-20250220.ebuild
new file mode 100644
index 000000000000..fa93e758c660
--- /dev/null
+++ b/net-wireless/wireless-regdb/wireless-regdb-20250220.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit linux-info
+
+MY_P="wireless-regdb-${PV:0:4}.${PV:4:2}.${PV:6:2}"
+DESCRIPTION="Wireless Regulatory database for Linux"
+HOMEPAGE="https://wireless.wiki.kernel.org/en/developers/regulatory/wireless-regdb";
+SRC_URI="https://mirrors.edge.kernel.org/pub/software/network/${PN}/${MY_P}.tar.xz";
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv 
~sparc ~x86"
+REQUIRED_USE="kernel_linux"
+
+pkg_pretend() {
+       if kernel_is -ge 4 15; then
+               if linux_config_exists; then
+                       if 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(s) 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."
+                       fi
+                       if ! linux_chkconfig_present CFG80211; then
+                               ewarn "REGULATORY DOMAIN PROBLEM:"
+                               ewarn "  With CONFIG_CFG80211 unset, the 
driver(s) won't be able to load the regulatory.db from"
+                               ewarn "  /lib/firmware, resulting in broken 
regulatory domain support. Please set CONFIG_CFG80211=m."
+                       fi
+                       if linux_chkconfig_present EXPERT && 
linux_chkconfig_present CFG80211_CRDA_SUPPORT; then
+                               ewarn "You can safely disable 
CFG80211_CRDA_SUPPORT"
+                       fi
+               fi
+       else
+               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
+}
+
+src_compile() {
+       einfo "Recompiling regulatory database(s) from db.txt would break 
signature verification."
+       einfo "Installing unmodified binary version."
+}
+
+src_install() {
+       # install the files the kernel needs unconditionally,
+       # they are small and kernels get upgraded
+       insinto /lib/firmware
+       doins regulatory.db regulatory.db.p7s
+
+       # regulatory.db.5 is a reference to regulatory.bin.5 so you need both 
unconditionally
+       doman -i18n= regulatory.db.5 regulatory.bin.5
+       dodoc README db.txt
+}

Reply via email to