Gentoo Archives: gentoo-commits

From: Ben Kohler <bkohler@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-wireless/iwd/
Date: Thu, 26 May 2022 16:27:42
Message-Id: 1653582452.1104a4540800b46667221920ace00883177f5a19.bkohler@gentoo
1 commit: 1104a4540800b46667221920ace00883177f5a19
2 Author: Ben Kohler <bkohler <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 26 16:25:23 2022 +0000
4 Commit: Ben Kohler <bkohler <AT> gentoo <DOT> org>
5 CommitDate: Thu May 26 16:27:32 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1104a454
7
8 Revert "net-wireless/iwd: drop 1.26"
9
10 This reverts commit f2aa3a5fa21a059c91bf3e75bd9c5aeaa2705c77.
11
12 Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>
13
14 net-wireless/iwd/Manifest | 1 +
15 net-wireless/iwd/iwd-1.26.ebuild | 182 +++++++++++++++++++++++++++++++++++++++
16 2 files changed, 183 insertions(+)
17
18 diff --git a/net-wireless/iwd/Manifest b/net-wireless/iwd/Manifest
19 index 5c67003f4408..028d93f6e9f2 100644
20 --- a/net-wireless/iwd/Manifest
21 +++ b/net-wireless/iwd/Manifest
22 @@ -1 +1,2 @@
23 +DIST iwd-1.26.tar.xz 1005532 BLAKE2B 8e12ecdf77e6d6a99477605aa727609f55a652af2d1f3a028812d352ea8aef5465c6c6063a6f9ef92ce940a34c44ce7bf77dcd6895173422d984eb3e61636d72 SHA512 b3fc002ca1da4edaeaec88142226b978991fa93dc65b7a79057514a4eb88e620e08a9ea22b49f8efe6707dcd94dd556fbaafcee46de2de19ee9163bd9e95d197
24 DIST iwd-1.27.tar.xz 1007432 BLAKE2B 0df0e5a8cec660521c44ae37102465bcc45e76805e65c76e48d6325b40484cd30d436db8c656d2f9bbd937c3f614de59d3a066642aa83f48002124bf334dbd62 SHA512 9027b20e22ae89a188b428eb84c5266ae242d8cfda452ad93db0cced8713d4f861dd1daf761632d4d2e9732d754db3a708d403a57f10c9ba3d76e23b7585f0c6
25
26 diff --git a/net-wireless/iwd/iwd-1.26.ebuild b/net-wireless/iwd/iwd-1.26.ebuild
27 new file mode 100644
28 index 000000000000..e1cea9837ac4
29 --- /dev/null
30 +++ b/net-wireless/iwd/iwd-1.26.ebuild
31 @@ -0,0 +1,182 @@
32 +# Copyright 1999-2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +inherit flag-o-matic linux-info systemd
37 +
38 +#Set this variable to the required external ell version
39 +ELL_REQ="0.49"
40 +
41 +if [[ ${PV} == *9999* ]]; then
42 + inherit autotools git-r3
43 + IWD_EGIT_REPO_URI="https://git.kernel.org/pub/scm/network/wireless/iwd.git"
44 + ELL_EGIT_REPO_URI="https://git.kernel.org/pub/scm/libs/ell/ell.git"
45 +else
46 + SRC_URI="https://www.kernel.org/pub/linux/network/wireless/${P}.tar.xz"
47 + KEYWORDS="~alpha amd64 arm arm64 ~ia64 ppc ppc64 ~riscv ~sparc x86"
48 + MYRST2MAN="RST2MAN=:"
49 +fi
50 +
51 +DESCRIPTION="Wireless daemon for linux"
52 +HOMEPAGE="https://git.kernel.org/pub/scm/network/wireless/iwd.git/"
53 +
54 +LICENSE="GPL-2"
55 +SLOT="0"
56 +IUSE="+client cpu_flags_x86_aes cpu_flags_x86_ssse3 +crda +monitor ofono standalone systemd wired"
57 +
58 +DEPEND="
59 + sys-apps/dbus
60 + client? ( sys-libs/readline:0= )
61 +"
62 +
63 +[[ -z "${ELL_REQ}" ]] || DEPEND+=" ~dev-libs/ell-${ELL_REQ}"
64 +
65 +RDEPEND="
66 + ${DEPEND}
67 + net-wireless/wireless-regdb
68 + crda? ( net-wireless/crda )
69 + standalone? (
70 + systemd? ( sys-apps/systemd )
71 + !systemd? ( virtual/resolvconf )
72 + )
73 +"
74 +
75 +BDEPEND="
76 + virtual/pkgconfig
77 +"
78 +
79 +[[ ${PV} == *9999* ]] && BDEPEND+=" dev-python/docutils"
80 +
81 +pkg_setup() {
82 + CONFIG_CHECK="
83 + ~ASYMMETRIC_KEY_TYPE
84 + ~ASYMMETRIC_PUBLIC_KEY_SUBTYPE
85 + ~CFG80211
86 + ~CRYPTO_AES
87 + ~CRYPTO_CBC
88 + ~CRYPTO_CMAC
89 + ~CRYPTO_DES
90 + ~CRYPTO_ECB
91 + ~CRYPTO_HMAC
92 + ~CRYPTO_MD4
93 + ~CRYPTO_MD5
94 + ~CRYPTO_RSA
95 + ~CRYPTO_SHA1
96 + ~CRYPTO_SHA256
97 + ~CRYPTO_SHA512
98 + ~CRYPTO_USER_API_HASH
99 + ~CRYPTO_USER_API_SKCIPHER
100 + ~KEY_DH_OPERATIONS
101 + ~PKCS7_MESSAGE_PARSER
102 + ~RFKILL
103 + ~X509_CERTIFICATE_PARSER
104 + "
105 + if use crda;then
106 + CONFIG_CHECK="${CONFIG_CHECK} ~CFG80211_CRDA_SUPPORT"
107 + WARNING_CFG80211_CRDA_SUPPORT="REGULATORY DOMAIN PROBLEM: please enable CFG80211_CRDA_SUPPORT for proper regulatory domain support"
108 + fi
109 +
110 + if use amd64;then
111 + CONFIG_CHECK="${CONFIG_CHECK} ~CRYPTO_DES3_EDE_X86_64"
112 + WARNING_CRYPTO_DES3_EDE_X86_64="CRYPTO_DES3_EDE_X86_64: enable for increased performance"
113 + fi
114 +
115 + if use cpu_flags_x86_aes;then
116 + CONFIG_CHECK="${CONFIG_CHECK} ~CRYPTO_AES_NI_INTEL"
117 + WARNING_CRYPTO_AES_NI_INTEL="CRYPTO_AES_NI_INTEL: enable for increased performance"
118 + fi
119 +
120 + if use cpu_flags_x86_ssse3 && use amd64; then
121 + CONFIG_CHECK="${CONFIG_CHECK} ~CRYPTO_SHA1_SSSE3 ~CRYPTO_SHA256_SSSE3 ~CRYPTO_SHA512_SSSE3"
122 + WARNING_CRYPTO_SHA1_SSSE3="CRYPTO_SHA1_SSSE3: enable for increased performance"
123 + WARNING_CRYPTO_SHA256_SSSE3="CRYPTO_SHA256_SSSE3: enable for increased performance"
124 + WARNING_CRYPTO_SHA512_SSSE3="CRYPTO_SHA512_SSSE3: enable for increased performance"
125 + fi
126 +
127 + if use kernel_linux && kernel_is -ge 4 20; then
128 + CONFIG_CHECK="${CONFIG_CHECK} ~PKCS8_PRIVATE_KEY_PARSER"
129 + fi
130 +
131 + check_extra_config
132 +
133 + if ! use crda; then
134 + if use kernel_linux && kernel_is -lt 4 15; then
135 + ewarn "POSSIBLE REGULATORY DOMAIN PROBLEM:"
136 + ewarn "Regulatory domain support for kernels older than 4.15 requires crda."
137 + fi
138 + if linux_config_exists && linux_chkconfig_builtin CFG80211 &&
139 + [[ $(linux_chkconfig_string EXTRA_FIRMWARE) != *regulatory.db* ]]
140 + then
141 + ewarn ""
142 + ewarn "REGULATORY DOMAIN PROBLEM:"
143 + ewarn "With CONFIG_CFG80211=y (built-in), the driver won't be able to load regulatory.db from"
144 + ewarn " /lib/firmware, resulting in broken regulatory domain support. Please set CONFIG_CFG80211=m"
145 + ewarn " or add regulatory.db and regulatory.db.p7s to CONFIG_EXTRA_FIRMWARE."
146 + ewarn ""
147 + fi
148 + fi
149 +}
150 +
151 +src_unpack() {
152 + if [[ ${PV} == *9999* ]] ; then
153 + EGIT_REPO_URI=${IWD_EGIT_REPO_URI} git-r3_src_unpack
154 + EGIT_REPO_URI=${ELL_EGIT_REPO_URI} EGIT_CHECKOUT_DIR=${WORKDIR}/ell git-r3_src_unpack
155 + else
156 + default
157 + fi
158 +}
159 +
160 +src_prepare() {
161 + default
162 + if [[ ${PV} == *9999* ]] ; then
163 + eautoreconf
164 + fi
165 +}
166 +
167 +src_configure() {
168 + append-cflags "-fsigned-char"
169 + local myeconfargs=(
170 + --sysconfdir="${EPREFIX}"/etc/iwd --localstatedir="${EPREFIX}"/var
171 + $(use_enable client)
172 + $(use_enable monitor)
173 + $(use_enable ofono)
174 + $(use_enable wired)
175 + --enable-systemd-service
176 + --with-systemd-unitdir="$(systemd_get_systemunitdir)"
177 + --with-systemd-modloaddir="${EPREFIX}/usr/lib/modules-load.d"
178 + --with-systemd-networkdir="$(systemd_get_utildir)/network"
179 + )
180 + [[ ${PV} == *9999* ]] || myeconfargs+=(--enable-external-ell)
181 + econf "${myeconfargs[@]}"
182 +}
183 +
184 +src_compile() {
185 + emake ${MYRST2MAN}
186 +}
187 +
188 +src_install() {
189 + emake DESTDIR="${D}" ${MYRST2MAN} install
190 + keepdir /var/lib/${PN}
191 +
192 + newinitd "${FILESDIR}/iwd.initd-r1" iwd
193 +
194 + if use wired;then
195 + newinitd "${FILESDIR}/ead.initd" ead
196 + fi
197 +
198 + if [[ ${PV} == *9999* ]] ; then
199 + exeinto /usr/share/iwd/scripts/
200 + doexe test/*
201 + fi
202 +
203 + if use standalone ; then
204 + local iwdconf="${ED}/etc/iwd/main.conf"
205 + dodir /etc/iwd
206 + echo "[General]" > "${iwdconf}"
207 + echo "EnableNetworkConfiguration=true" >> "${iwdconf}"
208 + echo "[Network]" >> "${iwdconf}"
209 + echo "NameResolvingService=$(usex systemd systemd resolvconf)" >> "${iwdconf}"
210 + dodir /etc/conf.d
211 + echo "rc_provide=\"net\"" > ${ED}/etc/conf.d/iwd
212 + fi
213 +}