1 |
commit: 66b6ba832890b4ce13aaed88913a0d8c4714e5d2 |
2 |
Author: Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Oct 23 18:34:07 2016 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 4 00:54:19 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66b6ba83 |
7 |
|
8 |
net-wireless/wpa_supplicant: Drop USE=qt4, bump to EAPI 6. |
9 |
|
10 |
Package-Manager: portage-2.3.0 |
11 |
Closes: https://github.com/gentoo/gentoo/pull/2673 |
12 |
|
13 |
.../wpa_supplicant/wpa_supplicant-2.6-r1.ebuild | 379 +++++++++++++++++++++ |
14 |
1 file changed, 379 insertions(+) |
15 |
|
16 |
diff --git a/net-wireless/wpa_supplicant/wpa_supplicant-2.6-r1.ebuild b/net-wireless/wpa_supplicant/wpa_supplicant-2.6-r1.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000..5db3238 |
19 |
--- /dev/null |
20 |
+++ b/net-wireless/wpa_supplicant/wpa_supplicant-2.6-r1.ebuild |
21 |
@@ -0,0 +1,379 @@ |
22 |
+# Copyright 1999-2016 Gentoo Foundation |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+# $Id$ |
25 |
+ |
26 |
+EAPI=6 |
27 |
+ |
28 |
+inherit qmake-utils systemd toolchain-funcs |
29 |
+ |
30 |
+DESCRIPTION="IEEE 802.1X/WPA supplicant for secure wireless transfers" |
31 |
+HOMEPAGE="http://hostap.epitest.fi/wpa_supplicant/" |
32 |
+SRC_URI="http://hostap.epitest.fi/releases/${P}.tar.gz" |
33 |
+LICENSE="|| ( GPL-2 BSD )" |
34 |
+ |
35 |
+SLOT="0" |
36 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" |
37 |
+IUSE="ap dbus gnutls eap-sim fasteap +hs2-0 libressl p2p ps3 qt5 readline selinux smartcard ssl tdls uncommon-eap-types wimax wps kernel_linux kernel_FreeBSD" |
38 |
+REQUIRED_USE="fasteap? ( !gnutls !ssl ) smartcard? ( ssl )" |
39 |
+ |
40 |
+CDEPEND="dbus? ( sys-apps/dbus ) |
41 |
+ kernel_linux? ( |
42 |
+ dev-libs/libnl:3 |
43 |
+ net-wireless/crda |
44 |
+ eap-sim? ( sys-apps/pcsc-lite ) |
45 |
+ ) |
46 |
+ !kernel_linux? ( net-libs/libpcap ) |
47 |
+ qt5? ( |
48 |
+ dev-qt/qtcore:5 |
49 |
+ dev-qt/qtgui:5 |
50 |
+ dev-qt/qtsvg:5 |
51 |
+ dev-qt/qtwidgets:5 |
52 |
+ ) |
53 |
+ readline? ( |
54 |
+ sys-libs/ncurses:0= |
55 |
+ sys-libs/readline:0= |
56 |
+ ) |
57 |
+ ssl? ( |
58 |
+ !libressl? ( dev-libs/openssl:0= ) |
59 |
+ libressl? ( dev-libs/libressl:0= ) |
60 |
+ ) |
61 |
+ !ssl? ( |
62 |
+ gnutls? ( |
63 |
+ dev-libs/libgcrypt:* |
64 |
+ net-libs/gnutls |
65 |
+ ) |
66 |
+ !gnutls? ( dev-libs/libtommath ) |
67 |
+ ) |
68 |
+" |
69 |
+DEPEND="${CDEPEND} |
70 |
+ virtual/pkgconfig |
71 |
+" |
72 |
+RDEPEND="${CDEPEND} |
73 |
+ selinux? ( sec-policy/selinux-networkmanager ) |
74 |
+" |
75 |
+ |
76 |
+S="${WORKDIR}/${P}/${PN}" |
77 |
+ |
78 |
+Kconfig_style_config() { |
79 |
+ #param 1 is CONFIG_* item |
80 |
+ #param 2 is what to set it = to, defaulting in y |
81 |
+ CONFIG_PARAM="${CONFIG_HEADER:-CONFIG_}$1" |
82 |
+ setting="${2:-y}" |
83 |
+ |
84 |
+ if [ ! $setting = n ]; then |
85 |
+ #first remove any leading "# " if $2 is not n |
86 |
+ sed -i "/^# *$CONFIG_PARAM=/s/^# *//" .config || echo "Kconfig_style_config error uncommenting $CONFIG_PARAM" |
87 |
+ #set item = $setting (defaulting to y) |
88 |
+ sed -i "/^$CONFIG_PARAM/s/=.*/=$setting/" .config || echo "Kconfig_style_config error setting $CONFIG_PARAM=$setting" |
89 |
+ else |
90 |
+ #ensure item commented out |
91 |
+ sed -i "/^$CONFIG_PARAM/s/$CONFIG_PARAM/# $CONFIG_PARAM/" .config || echo "Kconfig_style_config error commenting $CONFIG_PARAM" |
92 |
+ fi |
93 |
+} |
94 |
+ |
95 |
+pkg_setup() { |
96 |
+ if use gnutls && use ssl ; then |
97 |
+ elog "You have both 'gnutls' and 'ssl' USE flags enabled: defaulting to USE=\"ssl\"" |
98 |
+ fi |
99 |
+} |
100 |
+ |
101 |
+src_prepare() { |
102 |
+ default |
103 |
+ |
104 |
+ # net/bpf.h needed for net-libs/libpcap on Gentoo/FreeBSD |
105 |
+ sed -i \ |
106 |
+ -e "s:\(#include <pcap\.h>\):#include <net/bpf.h>\n\1:" \ |
107 |
+ ../src/l2_packet/l2_packet_freebsd.c || die |
108 |
+ |
109 |
+ # People seem to take the example configuration file too literally (bug #102361) |
110 |
+ sed -i \ |
111 |
+ -e "s:^\(opensc_engine_path\):#\1:" \ |
112 |
+ -e "s:^\(pkcs11_engine_path\):#\1:" \ |
113 |
+ -e "s:^\(pkcs11_module_path\):#\1:" \ |
114 |
+ wpa_supplicant.conf || die |
115 |
+ |
116 |
+ # Change configuration to match Gentoo locations (bug #143750) |
117 |
+ sed -i \ |
118 |
+ -e "s:/usr/lib/opensc:/usr/$(get_libdir):" \ |
119 |
+ -e "s:/usr/lib/pkcs11:/usr/$(get_libdir):" \ |
120 |
+ wpa_supplicant.conf || die |
121 |
+ |
122 |
+ # systemd entries to D-Bus service files (bug #372877) |
123 |
+ echo 'SystemdService=wpa_supplicant.service' \ |
124 |
+ | tee -a dbus/*.service >/dev/null || die |
125 |
+ |
126 |
+ cd "${WORKDIR}/${P}" || die |
127 |
+ |
128 |
+ if use wimax; then |
129 |
+ # generate-libeap-peer.patch comes before |
130 |
+ # fix-undefined-reference-to-random_get_bytes.patch |
131 |
+ eapply "${FILESDIR}/${P}-generate-libeap-peer.patch" |
132 |
+ |
133 |
+ # multilib-strict fix (bug #373685) |
134 |
+ sed -e "s/\/usr\/lib/\/usr\/$(get_libdir)/" -i src/eap_peer/Makefile || die |
135 |
+ fi |
136 |
+ |
137 |
+ # bug (320097) |
138 |
+ eapply "${FILESDIR}/${P}-do-not-call-dbus-functions-with-NULL-path.patch" |
139 |
+ |
140 |
+ # bug (596332) |
141 |
+ eapply "${FILESDIR}/${P}-libressl.patch" |
142 |
+} |
143 |
+ |
144 |
+src_configure() { |
145 |
+ # Toolchain setup |
146 |
+ tc-export CC |
147 |
+ |
148 |
+ cp defconfig .config || die |
149 |
+ |
150 |
+ # Basic setup |
151 |
+ Kconfig_style_config CTRL_IFACE |
152 |
+ Kconfig_style_config BACKEND file |
153 |
+ Kconfig_style_config IBSS_RSN |
154 |
+ Kconfig_style_config IEEE80211W |
155 |
+ Kconfig_style_config IEEE80211R |
156 |
+ |
157 |
+ # Basic authentication methods |
158 |
+ # NOTE: we don't set GPSK or SAKE as they conflict |
159 |
+ # with the below options |
160 |
+ Kconfig_style_config EAP_GTC |
161 |
+ Kconfig_style_config EAP_MD5 |
162 |
+ Kconfig_style_config EAP_OTP |
163 |
+ Kconfig_style_config EAP_PAX |
164 |
+ Kconfig_style_config EAP_PSK |
165 |
+ Kconfig_style_config EAP_TLV |
166 |
+ Kconfig_style_config EAP_EXE |
167 |
+ Kconfig_style_config IEEE8021X_EAPOL |
168 |
+ Kconfig_style_config PKCS12 |
169 |
+ Kconfig_style_config PEERKEY |
170 |
+ Kconfig_style_config EAP_LEAP |
171 |
+ Kconfig_style_config EAP_MSCHAPV2 |
172 |
+ Kconfig_style_config EAP_PEAP |
173 |
+ Kconfig_style_config EAP_TLS |
174 |
+ Kconfig_style_config EAP_TTLS |
175 |
+ |
176 |
+ # Enabling background scanning. |
177 |
+ Kconfig_style_config BGSCAN_SIMPLE |
178 |
+ Kconfig_style_config BGSCAN_LEARN |
179 |
+ |
180 |
+ # Enabling mesh networks. |
181 |
+ Kconfig_style_config MESH |
182 |
+ |
183 |
+ if use dbus ; then |
184 |
+ Kconfig_style_config CTRL_IFACE_DBUS |
185 |
+ Kconfig_style_config CTRL_IFACE_DBUS_NEW |
186 |
+ Kconfig_style_config CTRL_IFACE_DBUS_INTRO |
187 |
+ fi |
188 |
+ |
189 |
+ # Enable support for writing debug info to a log file and syslog. |
190 |
+ Kconfig_style_config DEBUG_FILE |
191 |
+ Kconfig_style_config DEBUG_SYSLOG |
192 |
+ |
193 |
+ if use hs2-0 ; then |
194 |
+ Kconfig_style_config INTERWORKING |
195 |
+ Kconfig_style_config HS20 |
196 |
+ fi |
197 |
+ |
198 |
+ if use uncommon-eap-types; then |
199 |
+ Kconfig_style_config EAP_GPSK |
200 |
+ Kconfig_style_config EAP_SAKE |
201 |
+ Kconfig_style_config EAP_GPSK_SHA256 |
202 |
+ Kconfig_style_config EAP_IKEV2 |
203 |
+ Kconfig_style_config EAP_EKE |
204 |
+ fi |
205 |
+ |
206 |
+ if use eap-sim ; then |
207 |
+ # Smart card authentication |
208 |
+ Kconfig_style_config EAP_SIM |
209 |
+ Kconfig_style_config EAP_AKA |
210 |
+ Kconfig_style_config EAP_AKA_PRIME |
211 |
+ Kconfig_style_config PCSC |
212 |
+ fi |
213 |
+ |
214 |
+ if use fasteap ; then |
215 |
+ Kconfig_style_config EAP_FAST |
216 |
+ fi |
217 |
+ |
218 |
+ if use readline ; then |
219 |
+ # readline/history support for wpa_cli |
220 |
+ Kconfig_style_config READLINE |
221 |
+ else |
222 |
+ #internal line edit mode for wpa_cli |
223 |
+ Kconfig_style_config WPA_CLI_EDIT |
224 |
+ fi |
225 |
+ |
226 |
+ # SSL authentication methods |
227 |
+ if use ssl ; then |
228 |
+ Kconfig_style_config TLS openssl |
229 |
+ elif use gnutls ; then |
230 |
+ Kconfig_style_config TLS gnutls |
231 |
+ Kconfig_style_config GNUTLS_EXTRA |
232 |
+ else |
233 |
+ Kconfig_style_config TLS internal |
234 |
+ fi |
235 |
+ |
236 |
+ if use smartcard ; then |
237 |
+ Kconfig_style_config SMARTCARD |
238 |
+ fi |
239 |
+ |
240 |
+ if use tdls ; then |
241 |
+ Kconfig_style_config TDLS |
242 |
+ fi |
243 |
+ |
244 |
+ if use kernel_linux ; then |
245 |
+ # Linux specific drivers |
246 |
+ Kconfig_style_config DRIVER_ATMEL |
247 |
+ Kconfig_style_config DRIVER_HOSTAP |
248 |
+ Kconfig_style_config DRIVER_IPW |
249 |
+ Kconfig_style_config DRIVER_NL80211 |
250 |
+ Kconfig_style_config DRIVER_RALINK |
251 |
+ Kconfig_style_config DRIVER_WEXT |
252 |
+ Kconfig_style_config DRIVER_WIRED |
253 |
+ |
254 |
+ if use ps3 ; then |
255 |
+ Kconfig_style_config DRIVER_PS3 |
256 |
+ fi |
257 |
+ |
258 |
+ elif use kernel_FreeBSD ; then |
259 |
+ # FreeBSD specific driver |
260 |
+ Kconfig_style_config DRIVER_BSD |
261 |
+ fi |
262 |
+ |
263 |
+ # Wi-Fi Protected Setup (WPS) |
264 |
+ if use wps ; then |
265 |
+ Kconfig_style_config WPS |
266 |
+ Kconfig_style_config WPS2 |
267 |
+ # USB Flash Drive |
268 |
+ Kconfig_style_config WPS_UFD |
269 |
+ # External Registrar |
270 |
+ Kconfig_style_config WPS_ER |
271 |
+ # Universal Plug'n'Play |
272 |
+ Kconfig_style_config WPS_UPNP |
273 |
+ # Near Field Communication |
274 |
+ Kconfig_style_config WPS_NFC |
275 |
+ fi |
276 |
+ |
277 |
+ # Wi-Fi Direct (WiDi) |
278 |
+ if use p2p ; then |
279 |
+ Kconfig_style_config P2P |
280 |
+ Kconfig_style_config WIFI_DISPLAY |
281 |
+ fi |
282 |
+ |
283 |
+ # Access Point Mode |
284 |
+ if use ap ; then |
285 |
+ Kconfig_style_config AP |
286 |
+ fi |
287 |
+ |
288 |
+ # Enable mitigation against certain attacks against TKIP |
289 |
+ Kconfig_style_config DELAYED_MIC_ERROR_REPORT |
290 |
+ |
291 |
+ # If we are using libnl 2.0 and above, enable support for it |
292 |
+ # Bug 382159 |
293 |
+ # Removed for now, since the 3.2 version is broken, and we don't |
294 |
+ # support it. |
295 |
+ if has_version ">=dev-libs/libnl-3.2"; then |
296 |
+ Kconfig_style_config LIBNL32 |
297 |
+ fi |
298 |
+ |
299 |
+ if use qt5 ; then |
300 |
+ pushd "${S}"/wpa_gui-qt4 > /dev/null || die |
301 |
+ eqmake5 wpa_gui.pro |
302 |
+ popd > /dev/null || die |
303 |
+ fi |
304 |
+} |
305 |
+ |
306 |
+src_compile() { |
307 |
+ einfo "Building wpa_supplicant" |
308 |
+ emake V=1 BINDIR=/usr/sbin |
309 |
+ |
310 |
+ if use wimax; then |
311 |
+ emake -C ../src/eap_peer clean |
312 |
+ emake -C ../src/eap_peer |
313 |
+ fi |
314 |
+ |
315 |
+ if use qt5; then |
316 |
+ einfo "Building wpa_gui" |
317 |
+ emake -C "${S}"/wpa_gui-qt4 |
318 |
+ fi |
319 |
+} |
320 |
+ |
321 |
+src_install() { |
322 |
+ dosbin wpa_supplicant |
323 |
+ dobin wpa_cli wpa_passphrase |
324 |
+ |
325 |
+ # baselayout-1 compat |
326 |
+ if has_version "<sys-apps/baselayout-2.0.0"; then |
327 |
+ dodir /sbin |
328 |
+ dosym /usr/sbin/wpa_supplicant /sbin/wpa_supplicant |
329 |
+ dodir /bin |
330 |
+ dosym /usr/bin/wpa_cli /bin/wpa_cli |
331 |
+ fi |
332 |
+ |
333 |
+ if has_version ">=sys-apps/openrc-0.5.0"; then |
334 |
+ newinitd "${FILESDIR}/${PN}-init.d" wpa_supplicant |
335 |
+ newconfd "${FILESDIR}/${PN}-conf.d" wpa_supplicant |
336 |
+ fi |
337 |
+ |
338 |
+ exeinto /etc/wpa_supplicant/ |
339 |
+ newexe "${FILESDIR}/wpa_cli.sh" wpa_cli.sh |
340 |
+ |
341 |
+ dodoc ChangeLog {eap_testing,todo}.txt README{,-WPS} \ |
342 |
+ wpa_supplicant.conf |
343 |
+ |
344 |
+ newdoc .config build-config |
345 |
+ |
346 |
+ doman doc/docbook/*.{5,8} |
347 |
+ |
348 |
+ if use qt5 ; then |
349 |
+ into /usr |
350 |
+ dobin wpa_gui-qt4/wpa_gui |
351 |
+ doicon wpa_gui-qt4/icons/wpa_gui.svg |
352 |
+ make_desktop_entry wpa_gui "WPA Supplicant Administration GUI" "wpa_gui" "Qt;Network;" |
353 |
+ fi |
354 |
+ |
355 |
+ use wimax && emake DESTDIR="${D}" -C ../src/eap_peer install |
356 |
+ |
357 |
+ if use dbus ; then |
358 |
+ pushd "${S}"/dbus > /dev/null || die |
359 |
+ insinto /etc/dbus-1/system.d |
360 |
+ newins dbus-wpa_supplicant.conf wpa_supplicant.conf |
361 |
+ insinto /usr/share/dbus-1/system-services |
362 |
+ doins fi.epitest.hostap.WPASupplicant.service fi.w1.wpa_supplicant1.service |
363 |
+ popd > /dev/null || die |
364 |
+ |
365 |
+ # This unit relies on dbus support, bug 538600. |
366 |
+ systemd_dounit systemd/wpa_supplicant.service |
367 |
+ fi |
368 |
+ |
369 |
+ systemd_dounit "systemd/wpa_supplicant@.service" |
370 |
+ systemd_dounit "systemd/wpa_supplicant-nl80211@.service" |
371 |
+ systemd_dounit "systemd/wpa_supplicant-wired@.service" |
372 |
+} |
373 |
+ |
374 |
+pkg_postinst() { |
375 |
+ elog "If this is a clean installation of wpa_supplicant, you" |
376 |
+ elog "have to create a configuration file named" |
377 |
+ elog "${EROOT%/}/etc/wpa_supplicant/wpa_supplicant.conf" |
378 |
+ elog |
379 |
+ elog "An example configuration file is available for reference in" |
380 |
+ elog "${EROOT%/}/usr/share/doc/${PF}/" |
381 |
+ |
382 |
+ if [[ -e "${EROOT%/}"/etc/wpa_supplicant.conf ]] ; then |
383 |
+ echo |
384 |
+ ewarn "WARNING: your old configuration file ${EROOT%/}/etc/wpa_supplicant.conf" |
385 |
+ ewarn "needs to be moved to ${EROOT%/}/etc/wpa_supplicant/wpa_supplicant.conf" |
386 |
+ fi |
387 |
+ |
388 |
+ # Mea culpa, feel free to remove that after some time --mgorny. |
389 |
+ local fn |
390 |
+ for fn in wpa_supplicant{,@wlan0}.service; do |
391 |
+ if [[ -e "${EROOT%/}"/etc/systemd/system/network.target.wants/${fn} ]] |
392 |
+ then |
393 |
+ ebegin "Moving ${fn} to multi-user.target" |
394 |
+ mv "${EROOT%/}"/etc/systemd/system/network.target.wants/${fn} \ |
395 |
+ "${EROOT%/}"/etc/systemd/system/multi-user.target.wants/ || die |
396 |
+ eend ${?} \ |
397 |
+ "Please try to re-enable ${fn}" |
398 |
+ fi |
399 |
+ done |
400 |
+} |