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