From fcc5224904648a8e6eb528d7603154160a20022f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 2 Feb 2022 01:39:05 +0000 Subject: gentoo resync : 02.02.2022 --- net-wireless/iwd/Manifest | 6 +- net-wireless/iwd/files/iwd-1.17-fix-tests.patch | 35 ---- .../iwd/files/iwd-1.18-musl-backport.patch | 30 ---- net-wireless/iwd/iwd-1.22.ebuild | 182 +++++++++++++++++++++ net-wireless/iwd/iwd-1.23.ebuild | 182 +++++++++++++++++++++ 5 files changed, 368 insertions(+), 67 deletions(-) delete mode 100644 net-wireless/iwd/files/iwd-1.17-fix-tests.patch delete mode 100644 net-wireless/iwd/files/iwd-1.18-musl-backport.patch create mode 100644 net-wireless/iwd/iwd-1.22.ebuild create mode 100644 net-wireless/iwd/iwd-1.23.ebuild (limited to 'net-wireless/iwd') diff --git a/net-wireless/iwd/Manifest b/net-wireless/iwd/Manifest index 40cf1f420e94..b8b42917d310 100644 --- a/net-wireless/iwd/Manifest +++ b/net-wireless/iwd/Manifest @@ -1,11 +1,13 @@ AUX ead.initd 243 BLAKE2B dcd843a764c28064eb6bb6c0be6c64482df0ab0fa01e14831f0060719bfe0038ca75d9b0e79d78a234627a15c53da16151094c6cc6d48a049ae6ac3c9b1714a2 SHA512 1b39b25736a11870f5e740b5702b6f18b1714cc06df7e3462cd74d116cfaa82175801f336141f3fdf86be33aa97fcebf32d9c080d80419bbc548ad540ab7bd7d -AUX iwd-1.17-fix-tests.patch 1358 BLAKE2B f399c13ce1c8594bcbe5a4bb84c7cbcf51121cd431dea492ff559b2b768bec56a2e6025771449838ad2a8929fa0a2c8e52495a44d6b7adb5ccaf4b52ecfc8486 SHA512 f63886a0844619442d0c9c662629a46c8075c859fb6fc614c09900ff3ea18335ec5369b50427983f34e8fe86ec13546f5a179770b1482cda0326a041c50ad1da -AUX iwd-1.18-musl-backport.patch 1014 BLAKE2B 47c89ce3f2d39c5c416be8b43a076cb914d5bb2431ea88e437d9966c608786ea00d71d713f143a2c6a957030b806e33c1d9a1ef739836430863f5b362c9f4e8c SHA512 7fc86e71f1c372052051c0ab73df7d301ff7498a8b70d95830bc099f0f4745a247ee54dc93de2e0173b284ac35f73fcad4cec04f1eb2dbe6ed1923d8e14e3035 AUX iwd.initd 246 BLAKE2B 02a422e96de99256e55f2ed86cfd9ed43bf93130021c523d0e4600ab1b7e34212a56def5ab2819c79e2d60cd63e70de4d7c31ae349326b9a15c35a025da4df29 SHA512 699f51082cb44d5ce52ea9dbb9adc4b0eeff945461c66ec4bfcb9d8f26fcc13aee3e7fe69b406d0a7e1ca89af24e655e830c7a61e028a1c0fff1ef8a2b3e153a AUX iwd.initd-r1 290 BLAKE2B ea7a6a51ab0fe4f83a748e61e245cf2d7abac898431bf84d9f30c56a7706828dd8e1544ecd61931f52fd5f52791abb0cfe07c685c297f560fe257b8769bfd6e6 SHA512 be44fb430252cf51e192b7b09a05302e1b9edfc4ebb7c5a357d912d727f25afc165b02752f9c51a9056e86471a12f3d2cfa384560b417d5303a93b5c4dff0a28 DIST iwd-1.20.tar.xz 973964 BLAKE2B 750368aec999b988aaaed34454a1a15a75fa9c37ce4523715156c1bc89e343aad62c0d0f0ef5f798a75b19a271175f05517e641f3e2a6e502d932da8e1cfff63 SHA512 1a272492d101bd6ec22df16d98895ce03aa8470b35a7b3c36e5431239e519f74fae81f8bee25e52ce7705459b42e37298778f671a39e98787ddb1b9881521847 DIST iwd-1.21.tar.xz 994644 BLAKE2B d8a12463f4f6e4b5f1840625b723fbffdd67df12092a9f945240751e40af7cf1d6cab4cba2e97f4fa628f902354bf76921238107c630c9fc4b35f451ccb7456c SHA512 420e4c1f9a7a0a11f6dedff5213d4b80671747ea3d24c4d492a843e3dd9813727127f4f0930588849d4aa6e6e1ca8f8434f0b07be7da50fdd0b2ab4156725389 +DIST iwd-1.22.tar.xz 994224 BLAKE2B 537f95409f31a56c6686d943664c640f086651c35a97bdb782d14011084e76ff13660cb14961e366eec7799144801fb2b38a606838ed9267eaa25d5a757ebfd7 SHA512 62393cda6687588c0a92537517a9e7aeba5f3ebc47f2ad962d5b2ca48b15229910b9ef2c6bae5e5edbac8c188304b4573db29a696af6bccc83a1f9bb5703dac2 +DIST iwd-1.23.tar.xz 994156 BLAKE2B ced2665153db55f71cf34ceec8fd2c6f0fbc9391a8f4d3bf45e88847b89b333b87be1a2c4302076df06f3adbd64ca4891383ea00767e7895ea9e940d375fb6cf SHA512 663530e8ef494d31aa99546c9fc5b0df11846e75445820d89cf6de70a71e1135ea194afd36094b8e831fbf3f9e46697792f078824498a06ba0a25ee891be88ea EBUILD iwd-1.20.ebuild 4935 BLAKE2B 928a2e49188357f14a99c6abe9c60046c8e0471382215791e7a020945ffa37e0dab11e3fbc50cc79b44aadbf2cf17d3f1730300b03c6297d7ad4d39002dd33f8 SHA512 f544d5276a5782cbcefd5221972bf2c0d17a3adfd8e917ea33116dc9a6da7061fb3e96a4d830a5d9be3e1a623e85f72a728f1aa1b53960bce32bfbfb52f895a2 EBUILD iwd-1.21.ebuild 4941 BLAKE2B 3aef789bbbb76a0089b5b9fa0ccf3e82d552729c4adb32c8298c2b7cd037212c51ccf78a6557f15f0940b27642ca200b4d06cc20abf69c8773c88cc578b3ffcc SHA512 a16c1423b0d88ad605bc374e39afc293e16e2eee2be97491d95fc36781121979bc13420dc9960961807a3d6b48ccd6ad6adc0520f020d3be042ce79795173a8d +EBUILD iwd-1.22.ebuild 4941 BLAKE2B d90c222d125aaab976bf187ca3861259c999e80d3612374b3d7de5db2d592f2e7b8805f0d1edff17b1b84c4ca959ac6d8bf09dc3082e30615606c41c55b543b4 SHA512 c90364e5bbe6f4d6ba097313d4f384c0f6005cdd0145f1356e1128d1b98def8e95ff9eee2d430f062e5f31493dc1925c3c7e15f156b7367a9a5378d98107eee5 +EBUILD iwd-1.23.ebuild 4941 BLAKE2B d90c222d125aaab976bf187ca3861259c999e80d3612374b3d7de5db2d592f2e7b8805f0d1edff17b1b84c4ca959ac6d8bf09dc3082e30615606c41c55b543b4 SHA512 c90364e5bbe6f4d6ba097313d4f384c0f6005cdd0145f1356e1128d1b98def8e95ff9eee2d430f062e5f31493dc1925c3c7e15f156b7367a9a5378d98107eee5 EBUILD iwd-9999.ebuild 4937 BLAKE2B 3d6b12722babbfcc1a42faba7fe80fe7a30846b24c5ec45bf51031c0fee77b866f5a89ae89d5c0b812beeb52c776c0534f30792e6754ffa8f0e8d8dc1cafd821 SHA512 30e0ca29f9de87e99dfa36a0aa072c960feb81aeee3d4146f58a307733fd56ddd52b6bc6106eca53cf847c06bb19ed9be0b473abbc97d90e59f27ce1512bad90 MISC metadata.xml 844 BLAKE2B a0745226f5314cee29c405d53b5f03c1e2706518272a69443174123601c4b79ad5902e2f22575b46bed37c5d6ebebd1ad4cdcccbb7c40405c4d04f2b92bef17d SHA512 9997101871ad37981492b0a70150d091926ec2321f13d70d5f85f2ff5d360cc87970beb9575c2f78a909e6f3a91ef022fd7115db9ec0ec77d5d94363ed30d793 diff --git a/net-wireless/iwd/files/iwd-1.17-fix-tests.patch b/net-wireless/iwd/files/iwd-1.17-fix-tests.patch deleted file mode 100644 index cf3de4c1d38f..000000000000 --- a/net-wireless/iwd/files/iwd-1.17-fix-tests.patch +++ /dev/null @@ -1,35 +0,0 @@ -From ed10b00afa3f4c087b46d7ba0b60a47bd05d8b39 Mon Sep 17 00:00:00 2001 -From: Denis Kenzior -Date: Mon, 23 Aug 2021 08:51:35 -0500 -Subject: unit: Fix eapol IP Allocation test failure - -This test was failing due to a change introduced in commit -5c9de0cf23f9 which changed handshake state storage of IPs from host -order to network byte order. Update the test to set IPs in network -byte-order. - -Fixes: 5c9de0cf23f9 ("eapol: Store IP address in network byte order") ---- - unit/test-eapol.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/unit/test-eapol.c b/unit/test-eapol.c -index b6a6adcb..470e0e9f 100644 ---- a/unit/test-eapol.c -+++ b/unit/test-eapol.c -@@ -3802,9 +3802,9 @@ static void eapol_ap_sta_handshake_ip_alloc_ok_test(const void *data) - handshake_state_set_ssid(s.ap_hs, (void *) ssid, strlen(ssid)); - handshake_state_set_pmk(s.ap_hs, psk, 32); - s.ap_hs->support_ip_allocation = true; -- s.ap_hs->client_ip_addr = 0x01020304; -- s.ap_hs->subnet_mask = 0xffff0000; -- s.ap_hs->go_ip_addr = 0x01020305; -+ s.ap_hs->client_ip_addr = L_CPU_TO_BE32(0x01020304); -+ s.ap_hs->subnet_mask = L_CPU_TO_BE32(0xffff0000); -+ s.ap_hs->go_ip_addr = L_CPU_TO_BE32(0x01020305); - - handshake_state_set_authenticator(s.sta_hs, false); - handshake_state_set_event_func(s.sta_hs, test_ap_sta_hs_event, &s); --- -cgit 1.2.3-1.el7 - diff --git a/net-wireless/iwd/files/iwd-1.18-musl-backport.patch b/net-wireless/iwd/files/iwd-1.18-musl-backport.patch deleted file mode 100644 index 99371ca3bb4e..000000000000 --- a/net-wireless/iwd/files/iwd-1.18-musl-backport.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 42bd5ba7c2665c5bf95ba102a8115c4cf01d31d7 Mon Sep 17 00:00:00 2001 -From: Andrew Zaborowski -Date: Thu, 16 Sep 2021 01:58:29 +0200 -Subject: netconfig: Remove usage of in6_addr.__in6_u - -in6_addr.__in6_u.__u6_addr8 is glibc-specific and named differently in -the headers shipped with musl libc for example. The POSIX compliant and -universal way of accessing it is in6_addr.s6_addr. ---- - src/netconfig.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -(limited to 'src/netconfig.c') - -diff --git a/src/netconfig.c b/src/netconfig.c -index ce95db0b..421270c9 100644 ---- a/src/netconfig.c -+++ b/src/netconfig.c -@@ -171,7 +171,7 @@ static inline char *netconfig_ipv6_to_string(const uint8_t *addr) - struct in6_addr in6_addr; - char *addr_str = l_malloc(INET6_ADDRSTRLEN); - -- memcpy(in6_addr.__in6_u.__u6_addr8, addr, 16); -+ memcpy(in6_addr.s6_addr, addr, 16); - - if (L_WARN_ON(unlikely(!inet_ntop(AF_INET6, &in6_addr, addr_str, - INET6_ADDRSTRLEN)))) { --- -cgit 1.2.3-1.el7 - diff --git a/net-wireless/iwd/iwd-1.22.ebuild b/net-wireless/iwd/iwd-1.22.ebuild new file mode 100644 index 000000000000..4e45e6a7927a --- /dev/null +++ b/net-wireless/iwd/iwd-1.22.ebuild @@ -0,0 +1,182 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit flag-o-matic linux-info systemd + +#Set this variable to the required external ell version +ELL_REQ="0.48" + +if [[ ${PV} == *9999* ]]; then + inherit autotools git-r3 + IWD_EGIT_REPO_URI="https://git.kernel.org/pub/scm/network/wireless/iwd.git" + ELL_EGIT_REPO_URI="https://git.kernel.org/pub/scm/libs/ell/ell.git" +else + SRC_URI="https://www.kernel.org/pub/linux/network/wireless/${P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" + MYRST2MAN="RST2MAN=:" +fi + +DESCRIPTION="Wireless daemon for linux" +HOMEPAGE="https://git.kernel.org/pub/scm/network/wireless/iwd.git/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="+client cpu_flags_x86_aes cpu_flags_x86_ssse3 +crda +monitor ofono standalone systemd wired" + +DEPEND=" + sys-apps/dbus + client? ( sys-libs/readline:0= ) +" + +[[ -z "${ELL_REQ}" ]] || DEPEND+=" ~dev-libs/ell-${ELL_REQ}" + +RDEPEND=" + ${DEPEND} + net-wireless/wireless-regdb + crda? ( net-wireless/crda ) + standalone? ( + systemd? ( sys-apps/systemd ) + !systemd? ( virtual/resolvconf ) + ) +" + +BDEPEND=" + virtual/pkgconfig +" + +[[ ${PV} == *9999* ]] && BDEPEND+=" dev-python/docutils" + +pkg_setup() { + CONFIG_CHECK=" + ~ASYMMETRIC_KEY_TYPE + ~ASYMMETRIC_PUBLIC_KEY_SUBTYPE + ~CFG80211 + ~CRYPTO_AES + ~CRYPTO_CBC + ~CRYPTO_CMAC + ~CRYPTO_DES + ~CRYPTO_ECB + ~CRYPTO_HMAC + ~CRYPTO_MD4 + ~CRYPTO_MD5 + ~CRYPTO_RSA + ~CRYPTO_SHA1 + ~CRYPTO_SHA256 + ~CRYPTO_SHA512 + ~CRYPTO_USER_API_HASH + ~CRYPTO_USER_API_SKCIPHER + ~KEY_DH_OPERATIONS + ~PKCS7_MESSAGE_PARSER + ~RFKILL + ~X509_CERTIFICATE_PARSER + " + 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 + + if use amd64;then + CONFIG_CHECK="${CONFIG_CHECK} ~CRYPTO_DES3_EDE_X86_64" + WARNING_CRYPTO_DES3_EDE_X86_64="CRYPTO_DES3_EDE_X86_64: enable for increased performance" + fi + + if use cpu_flags_x86_aes;then + CONFIG_CHECK="${CONFIG_CHECK} ~CRYPTO_AES_NI_INTEL" + WARNING_CRYPTO_AES_NI_INTEL="CRYPTO_AES_NI_INTEL: enable for increased performance" + fi + + if use cpu_flags_x86_ssse3 && use amd64; then + CONFIG_CHECK="${CONFIG_CHECK} ~CRYPTO_SHA1_SSSE3 ~CRYPTO_SHA256_SSSE3 ~CRYPTO_SHA512_SSSE3" + WARNING_CRYPTO_SHA1_SSSE3="CRYPTO_SHA1_SSSE3: enable for increased performance" + WARNING_CRYPTO_SHA256_SSSE3="CRYPTO_SHA256_SSSE3: enable for increased performance" + WARNING_CRYPTO_SHA512_SSSE3="CRYPTO_SHA512_SSSE3: enable for increased performance" + fi + + if use kernel_linux && kernel_is -ge 4 20; then + CONFIG_CHECK="${CONFIG_CHECK} ~PKCS8_PRIVATE_KEY_PARSER" + fi + + check_extra_config + + if ! use crda; then + if use kernel_linux && kernel_is -lt 4 15; then + ewarn "POSSIBLE REGULATORY DOMAIN PROBLEM:" + ewarn "Regulatory domain support for kernels older than 4.15 requires crda." + fi + if linux_config_exists && linux_chkconfig_builtin CFG80211 && + [[ $(linux_chkconfig_string EXTRA_FIRMWARE) != *regulatory.db* ]] + then + ewarn "" + 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." + ewarn "" + fi + fi +} + +src_unpack() { + if [[ ${PV} == *9999* ]] ; then + EGIT_REPO_URI=${IWD_EGIT_REPO_URI} git-r3_src_unpack + EGIT_REPO_URI=${ELL_EGIT_REPO_URI} EGIT_CHECKOUT_DIR=${WORKDIR}/ell git-r3_src_unpack + else + default + fi +} + +src_prepare() { + default + if [[ ${PV} == *9999* ]] ; then + eautoreconf + fi +} + +src_configure() { + append-cflags "-fsigned-char" + local myeconfargs=( + --sysconfdir="${EPREFIX}"/etc/iwd --localstatedir="${EPREFIX}"/var + $(use_enable client) + $(use_enable monitor) + $(use_enable ofono) + $(use_enable wired) + --enable-systemd-service + --with-systemd-unitdir="$(systemd_get_systemunitdir)" + --with-systemd-modloaddir="${EPREFIX}/usr/lib/modules-load.d" + --with-systemd-networkdir="$(systemd_get_utildir)/network" + ) + [[ ${PV} == *9999* ]] || myeconfargs+=(--enable-external-ell) + econf "${myeconfargs[@]}" +} + +src_compile() { + emake ${MYRST2MAN} +} + +src_install() { + emake DESTDIR="${D}" ${MYRST2MAN} install + keepdir /var/lib/${PN} + + newinitd "${FILESDIR}/iwd.initd-r1" iwd + + if use wired;then + newinitd "${FILESDIR}/ead.initd" ead + fi + + if [[ ${PV} == *9999* ]] ; then + exeinto /usr/share/iwd/scripts/ + doexe test/* + fi + + if use standalone ; then + local iwdconf="${ED}/etc/iwd/main.conf" + dodir /etc/iwd + echo "[General]" > "${iwdconf}" + echo "EnableNetworkConfiguration=true" >> "${iwdconf}" + echo "[Network]" >> "${iwdconf}" + echo "NameResolvingService=$(usex systemd systemd resolvconf)" >> "${iwdconf}" + dodir /etc/conf.d + echo "rc_provide=\"net\"" > ${ED}/etc/conf.d/iwd + fi +} diff --git a/net-wireless/iwd/iwd-1.23.ebuild b/net-wireless/iwd/iwd-1.23.ebuild new file mode 100644 index 000000000000..4e45e6a7927a --- /dev/null +++ b/net-wireless/iwd/iwd-1.23.ebuild @@ -0,0 +1,182 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit flag-o-matic linux-info systemd + +#Set this variable to the required external ell version +ELL_REQ="0.48" + +if [[ ${PV} == *9999* ]]; then + inherit autotools git-r3 + IWD_EGIT_REPO_URI="https://git.kernel.org/pub/scm/network/wireless/iwd.git" + ELL_EGIT_REPO_URI="https://git.kernel.org/pub/scm/libs/ell/ell.git" +else + SRC_URI="https://www.kernel.org/pub/linux/network/wireless/${P}.tar.xz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" + MYRST2MAN="RST2MAN=:" +fi + +DESCRIPTION="Wireless daemon for linux" +HOMEPAGE="https://git.kernel.org/pub/scm/network/wireless/iwd.git/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="+client cpu_flags_x86_aes cpu_flags_x86_ssse3 +crda +monitor ofono standalone systemd wired" + +DEPEND=" + sys-apps/dbus + client? ( sys-libs/readline:0= ) +" + +[[ -z "${ELL_REQ}" ]] || DEPEND+=" ~dev-libs/ell-${ELL_REQ}" + +RDEPEND=" + ${DEPEND} + net-wireless/wireless-regdb + crda? ( net-wireless/crda ) + standalone? ( + systemd? ( sys-apps/systemd ) + !systemd? ( virtual/resolvconf ) + ) +" + +BDEPEND=" + virtual/pkgconfig +" + +[[ ${PV} == *9999* ]] && BDEPEND+=" dev-python/docutils" + +pkg_setup() { + CONFIG_CHECK=" + ~ASYMMETRIC_KEY_TYPE + ~ASYMMETRIC_PUBLIC_KEY_SUBTYPE + ~CFG80211 + ~CRYPTO_AES + ~CRYPTO_CBC + ~CRYPTO_CMAC + ~CRYPTO_DES + ~CRYPTO_ECB + ~CRYPTO_HMAC + ~CRYPTO_MD4 + ~CRYPTO_MD5 + ~CRYPTO_RSA + ~CRYPTO_SHA1 + ~CRYPTO_SHA256 + ~CRYPTO_SHA512 + ~CRYPTO_USER_API_HASH + ~CRYPTO_USER_API_SKCIPHER + ~KEY_DH_OPERATIONS + ~PKCS7_MESSAGE_PARSER + ~RFKILL + ~X509_CERTIFICATE_PARSER + " + 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 + + if use amd64;then + CONFIG_CHECK="${CONFIG_CHECK} ~CRYPTO_DES3_EDE_X86_64" + WARNING_CRYPTO_DES3_EDE_X86_64="CRYPTO_DES3_EDE_X86_64: enable for increased performance" + fi + + if use cpu_flags_x86_aes;then + CONFIG_CHECK="${CONFIG_CHECK} ~CRYPTO_AES_NI_INTEL" + WARNING_CRYPTO_AES_NI_INTEL="CRYPTO_AES_NI_INTEL: enable for increased performance" + fi + + if use cpu_flags_x86_ssse3 && use amd64; then + CONFIG_CHECK="${CONFIG_CHECK} ~CRYPTO_SHA1_SSSE3 ~CRYPTO_SHA256_SSSE3 ~CRYPTO_SHA512_SSSE3" + WARNING_CRYPTO_SHA1_SSSE3="CRYPTO_SHA1_SSSE3: enable for increased performance" + WARNING_CRYPTO_SHA256_SSSE3="CRYPTO_SHA256_SSSE3: enable for increased performance" + WARNING_CRYPTO_SHA512_SSSE3="CRYPTO_SHA512_SSSE3: enable for increased performance" + fi + + if use kernel_linux && kernel_is -ge 4 20; then + CONFIG_CHECK="${CONFIG_CHECK} ~PKCS8_PRIVATE_KEY_PARSER" + fi + + check_extra_config + + if ! use crda; then + if use kernel_linux && kernel_is -lt 4 15; then + ewarn "POSSIBLE REGULATORY DOMAIN PROBLEM:" + ewarn "Regulatory domain support for kernels older than 4.15 requires crda." + fi + if linux_config_exists && linux_chkconfig_builtin CFG80211 && + [[ $(linux_chkconfig_string EXTRA_FIRMWARE) != *regulatory.db* ]] + then + ewarn "" + 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." + ewarn "" + fi + fi +} + +src_unpack() { + if [[ ${PV} == *9999* ]] ; then + EGIT_REPO_URI=${IWD_EGIT_REPO_URI} git-r3_src_unpack + EGIT_REPO_URI=${ELL_EGIT_REPO_URI} EGIT_CHECKOUT_DIR=${WORKDIR}/ell git-r3_src_unpack + else + default + fi +} + +src_prepare() { + default + if [[ ${PV} == *9999* ]] ; then + eautoreconf + fi +} + +src_configure() { + append-cflags "-fsigned-char" + local myeconfargs=( + --sysconfdir="${EPREFIX}"/etc/iwd --localstatedir="${EPREFIX}"/var + $(use_enable client) + $(use_enable monitor) + $(use_enable ofono) + $(use_enable wired) + --enable-systemd-service + --with-systemd-unitdir="$(systemd_get_systemunitdir)" + --with-systemd-modloaddir="${EPREFIX}/usr/lib/modules-load.d" + --with-systemd-networkdir="$(systemd_get_utildir)/network" + ) + [[ ${PV} == *9999* ]] || myeconfargs+=(--enable-external-ell) + econf "${myeconfargs[@]}" +} + +src_compile() { + emake ${MYRST2MAN} +} + +src_install() { + emake DESTDIR="${D}" ${MYRST2MAN} install + keepdir /var/lib/${PN} + + newinitd "${FILESDIR}/iwd.initd-r1" iwd + + if use wired;then + newinitd "${FILESDIR}/ead.initd" ead + fi + + if [[ ${PV} == *9999* ]] ; then + exeinto /usr/share/iwd/scripts/ + doexe test/* + fi + + if use standalone ; then + local iwdconf="${ED}/etc/iwd/main.conf" + dodir /etc/iwd + echo "[General]" > "${iwdconf}" + echo "EnableNetworkConfiguration=true" >> "${iwdconf}" + echo "[Network]" >> "${iwdconf}" + echo "NameResolvingService=$(usex systemd systemd resolvconf)" >> "${iwdconf}" + dodir /etc/conf.d + echo "rc_provide=\"net\"" > ${ED}/etc/conf.d/iwd + fi +} -- cgit v1.2.3