Gentoo Archives: gentoo-commits

From: Ionen Wolkens <ionen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/wine-staging/
Date: Fri, 20 May 2022 20:02:06
Message-Id: 1653076906.22d035036df4ab21d5f724877c3709f4eff59b5b.ionen@gentoo
1 commit: 22d035036df4ab21d5f724877c3709f4eff59b5b
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 18 02:41:50 2022 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Fri May 20 20:01:46 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22d03503
7
8 app-emulation/wine-staging: support building with mingw64-toolchain
9
10 This allows USE=mingw to be usable without manually using crossdev
11 first to ease usage for users and automated testing.
12
13 Old behavior using crossdev still available with USE=crossdev-mingw,
14 albeit new one should offer better stability given mingw64-toolchain
15 is intended/tested especially to build wine+dxvk+vkd3d-proton.
16
17 Given wine is pushing PE conversions and some things work better with
18 PE files (e.g. Blizzard games, Proton also uses --with-mingw), it may
19 be useful for the prospect of making this a default at some point.
20
21 Note that mingw64-toolchain's ${MULTILIB_USEDEP} does belong in BDEPEND
22 (unless <EAPI-7), as it'll use cross libraries located in BROOT.
23
24 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
25
26 app-emulation/wine-staging/metadata.xml | 4 ++
27 .../wine-staging/wine-staging-7.5-r1.ebuild | 46 +++++++++-------------
28 .../wine-staging/wine-staging-7.6-r1.ebuild | 46 +++++++++-------------
29 app-emulation/wine-staging/wine-staging-7.7.ebuild | 46 +++++++++-------------
30 app-emulation/wine-staging/wine-staging-7.8.ebuild | 46 +++++++++-------------
31 .../wine-staging/wine-staging-9999.ebuild | 46 +++++++++-------------
32 6 files changed, 94 insertions(+), 140 deletions(-)
33
34 diff --git a/app-emulation/wine-staging/metadata.xml b/app-emulation/wine-staging/metadata.xml
35 index ee411faa12da..8811667ddc0b 100644
36 --- a/app-emulation/wine-staging/metadata.xml
37 +++ b/app-emulation/wine-staging/metadata.xml
38 @@ -18,6 +18,10 @@ This variant of the Wine packaging includes the Wine-Staging patchset.
39 </longdescription>
40 <use>
41 <flag name="capi">Enable ISDN support via CAPI</flag>
42 + <flag name="crossdev-mingw">
43 + Use <pkg>sys-devel/crossdev</pkg> for the toolchain rather than
44 + <pkg>dev-util/mingw64-toolchain</pkg> (requires manual setting up)
45 + </flag>
46 <flag name="custom-cflags">Bypass strip-flags; use at your own peril</flag>
47 <flag name="dos">Pull in <pkg>games-emulation/dosbox</pkg> to run DOS applications</flag>
48 <flag name="gecko">Add support for the Gecko engine when using iexplore</flag>
49
50 diff --git a/app-emulation/wine-staging/wine-staging-7.5-r1.ebuild b/app-emulation/wine-staging/wine-staging-7.5-r1.ebuild
51 index 178ae2fa6afe..5a8aa3f539f4 100644
52 --- a/app-emulation/wine-staging/wine-staging-7.5-r1.ebuild
53 +++ b/app-emulation/wine-staging/wine-staging-7.5-r1.ebuild
54 @@ -48,9 +48,10 @@ fi
55
56 LICENSE="LGPL-2.1"
57 SLOT="${MY_PV}"
58 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos +fontconfig +gecko gphoto2 gssapi gstreamer kerberos ldap mingw +mono mp3 netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl staging test +threads +truetype udev +udisks +unwind usb v4l vkd3d vulkan +X +xcomposite xinerama"
59 +IUSE="+abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups custom-cflags dos +fontconfig +gecko gphoto2 gssapi gstreamer kerberos ldap mingw +mono mp3 netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl staging test +threads +truetype udev +udisks +unwind usb v4l vkd3d vulkan +X +xcomposite xinerama"
60 REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
61 X? ( truetype )
62 + crossdev-mingw? ( mingw )
63 elibc_glibc? ( threads )
64 osmesa? ( opengl )
65 pipelight? ( staging )
66 @@ -63,7 +64,8 @@ RESTRICT="test"
67
68 BDEPEND="sys-devel/flex
69 virtual/yacc
70 - virtual/pkgconfig"
71 + virtual/pkgconfig
72 + !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] )"
73
74 COMMON_DEPEND="
75 X? (
76 @@ -217,32 +219,18 @@ pkg_pretend() {
77 fi
78 fi
79
80 - if use mingw && use abi_x86_32 && ! has_version "cross-i686-w64-mingw32/gcc"; then
81 - eerror
82 - eerror "USE=\"mingw\" is currently experimental, and requires the"
83 - eerror "'cross-i686-w64-mingw32' compiler and its runtime for 32-bit builds."
84 - eerror
85 - eerror "These can be installed by using 'sys-devel/crossdev':"
86 - eerror
87 - eerror "crossdev --target i686-w64-mingw32"
88 - eerror
89 - eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw"
90 - eerror
91 - die "MinGW build was enabled, but no compiler to support it was found."
92 - fi
93 -
94 - if use mingw && use abi_x86_64 && ! has_version "cross-x86_64-w64-mingw32/gcc"; then
95 - eerror
96 - eerror "USE=\"mingw\" is currently experimental, and requires the"
97 - eerror "'cross-x86_64-w64-mingw32' compiler and its runtime for 64-bit builds."
98 - eerror
99 - eerror "These can be installed by using 'sys-devel/crossdev':"
100 - eerror
101 - eerror "crossdev --target x86_64-w64-mingw32"
102 - eerror
103 - eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw"
104 - eerror
105 - die "MinGW build was enabled, but no compiler to support it was found."
106 + if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then
107 + local mingw=-w64-mingw32
108 + for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do
109 + type -P ${mingw}-gcc && continue
110 + eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain"
111 + eerror "yourself by installing sys-devel/crossdev then running:"
112 + eerror
113 + eerror " crossdev --target ${mingw}"
114 + eerror
115 + eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw"
116 + die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found"
117 + done
118 fi
119 fi
120 }
121 @@ -369,6 +357,8 @@ src_configure() {
122 export LDCONFIG=/bin/true
123 use custom-cflags || strip-flags
124 if use mingw; then
125 + use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}
126 +
127 export CROSSCFLAGS="${CFLAGS}"
128 fi
129
130
131 diff --git a/app-emulation/wine-staging/wine-staging-7.6-r1.ebuild b/app-emulation/wine-staging/wine-staging-7.6-r1.ebuild
132 index 2985fe9ef68e..c814bc62907c 100644
133 --- a/app-emulation/wine-staging/wine-staging-7.6-r1.ebuild
134 +++ b/app-emulation/wine-staging/wine-staging-7.6-r1.ebuild
135 @@ -48,9 +48,10 @@ fi
136
137 LICENSE="LGPL-2.1"
138 SLOT="${MY_PV}"
139 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos +fontconfig +gecko gphoto2 gssapi gstreamer kerberos ldap mingw +mono mp3 netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl staging test +threads +truetype udev +udisks +unwind usb v4l vkd3d vulkan +X +xcomposite xinerama"
140 +IUSE="+abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups custom-cflags dos +fontconfig +gecko gphoto2 gssapi gstreamer kerberos ldap mingw +mono mp3 netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl staging test +threads +truetype udev +udisks +unwind usb v4l vkd3d vulkan +X +xcomposite xinerama"
141 REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
142 X? ( truetype )
143 + crossdev-mingw? ( mingw )
144 elibc_glibc? ( threads )
145 osmesa? ( opengl )
146 pipelight? ( staging )
147 @@ -63,7 +64,8 @@ RESTRICT="test"
148
149 BDEPEND="sys-devel/flex
150 virtual/yacc
151 - virtual/pkgconfig"
152 + virtual/pkgconfig
153 + !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] )"
154
155 COMMON_DEPEND="
156 X? (
157 @@ -217,32 +219,18 @@ pkg_pretend() {
158 fi
159 fi
160
161 - if use mingw && use abi_x86_32 && ! has_version "cross-i686-w64-mingw32/gcc"; then
162 - eerror
163 - eerror "USE=\"mingw\" is currently experimental, and requires the"
164 - eerror "'cross-i686-w64-mingw32' compiler and its runtime for 32-bit builds."
165 - eerror
166 - eerror "These can be installed by using 'sys-devel/crossdev':"
167 - eerror
168 - eerror "crossdev --target i686-w64-mingw32"
169 - eerror
170 - eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw"
171 - eerror
172 - die "MinGW build was enabled, but no compiler to support it was found."
173 - fi
174 -
175 - if use mingw && use abi_x86_64 && ! has_version "cross-x86_64-w64-mingw32/gcc"; then
176 - eerror
177 - eerror "USE=\"mingw\" is currently experimental, and requires the"
178 - eerror "'cross-x86_64-w64-mingw32' compiler and its runtime for 64-bit builds."
179 - eerror
180 - eerror "These can be installed by using 'sys-devel/crossdev':"
181 - eerror
182 - eerror "crossdev --target x86_64-w64-mingw32"
183 - eerror
184 - eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw"
185 - eerror
186 - die "MinGW build was enabled, but no compiler to support it was found."
187 + if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then
188 + local mingw=-w64-mingw32
189 + for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do
190 + type -P ${mingw}-gcc && continue
191 + eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain"
192 + eerror "yourself by installing sys-devel/crossdev then running:"
193 + eerror
194 + eerror " crossdev --target ${mingw}"
195 + eerror
196 + eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw"
197 + die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found"
198 + done
199 fi
200 fi
201 }
202 @@ -369,6 +357,8 @@ src_configure() {
203 export LDCONFIG=/bin/true
204 use custom-cflags || strip-flags
205 if use mingw; then
206 + use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}
207 +
208 export CROSSCFLAGS="${CFLAGS}"
209 fi
210
211
212 diff --git a/app-emulation/wine-staging/wine-staging-7.7.ebuild b/app-emulation/wine-staging/wine-staging-7.7.ebuild
213 index 2985fe9ef68e..c814bc62907c 100644
214 --- a/app-emulation/wine-staging/wine-staging-7.7.ebuild
215 +++ b/app-emulation/wine-staging/wine-staging-7.7.ebuild
216 @@ -48,9 +48,10 @@ fi
217
218 LICENSE="LGPL-2.1"
219 SLOT="${MY_PV}"
220 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos +fontconfig +gecko gphoto2 gssapi gstreamer kerberos ldap mingw +mono mp3 netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl staging test +threads +truetype udev +udisks +unwind usb v4l vkd3d vulkan +X +xcomposite xinerama"
221 +IUSE="+abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups custom-cflags dos +fontconfig +gecko gphoto2 gssapi gstreamer kerberos ldap mingw +mono mp3 netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl staging test +threads +truetype udev +udisks +unwind usb v4l vkd3d vulkan +X +xcomposite xinerama"
222 REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
223 X? ( truetype )
224 + crossdev-mingw? ( mingw )
225 elibc_glibc? ( threads )
226 osmesa? ( opengl )
227 pipelight? ( staging )
228 @@ -63,7 +64,8 @@ RESTRICT="test"
229
230 BDEPEND="sys-devel/flex
231 virtual/yacc
232 - virtual/pkgconfig"
233 + virtual/pkgconfig
234 + !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] )"
235
236 COMMON_DEPEND="
237 X? (
238 @@ -217,32 +219,18 @@ pkg_pretend() {
239 fi
240 fi
241
242 - if use mingw && use abi_x86_32 && ! has_version "cross-i686-w64-mingw32/gcc"; then
243 - eerror
244 - eerror "USE=\"mingw\" is currently experimental, and requires the"
245 - eerror "'cross-i686-w64-mingw32' compiler and its runtime for 32-bit builds."
246 - eerror
247 - eerror "These can be installed by using 'sys-devel/crossdev':"
248 - eerror
249 - eerror "crossdev --target i686-w64-mingw32"
250 - eerror
251 - eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw"
252 - eerror
253 - die "MinGW build was enabled, but no compiler to support it was found."
254 - fi
255 -
256 - if use mingw && use abi_x86_64 && ! has_version "cross-x86_64-w64-mingw32/gcc"; then
257 - eerror
258 - eerror "USE=\"mingw\" is currently experimental, and requires the"
259 - eerror "'cross-x86_64-w64-mingw32' compiler and its runtime for 64-bit builds."
260 - eerror
261 - eerror "These can be installed by using 'sys-devel/crossdev':"
262 - eerror
263 - eerror "crossdev --target x86_64-w64-mingw32"
264 - eerror
265 - eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw"
266 - eerror
267 - die "MinGW build was enabled, but no compiler to support it was found."
268 + if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then
269 + local mingw=-w64-mingw32
270 + for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do
271 + type -P ${mingw}-gcc && continue
272 + eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain"
273 + eerror "yourself by installing sys-devel/crossdev then running:"
274 + eerror
275 + eerror " crossdev --target ${mingw}"
276 + eerror
277 + eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw"
278 + die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found"
279 + done
280 fi
281 fi
282 }
283 @@ -369,6 +357,8 @@ src_configure() {
284 export LDCONFIG=/bin/true
285 use custom-cflags || strip-flags
286 if use mingw; then
287 + use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}
288 +
289 export CROSSCFLAGS="${CFLAGS}"
290 fi
291
292
293 diff --git a/app-emulation/wine-staging/wine-staging-7.8.ebuild b/app-emulation/wine-staging/wine-staging-7.8.ebuild
294 index c612384db05e..a8f7b0e6ad1c 100644
295 --- a/app-emulation/wine-staging/wine-staging-7.8.ebuild
296 +++ b/app-emulation/wine-staging/wine-staging-7.8.ebuild
297 @@ -48,9 +48,10 @@ fi
298
299 LICENSE="LGPL-2.1"
300 SLOT="${MY_PV}"
301 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos +fontconfig +gecko gphoto2 gssapi gstreamer kerberos ldap mingw +mono mp3 netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl staging test +threads +truetype udev +udisks +unwind usb v4l vulkan +X +xcomposite xinerama"
302 +IUSE="+abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups custom-cflags dos +fontconfig +gecko gphoto2 gssapi gstreamer kerberos ldap mingw +mono mp3 netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl staging test +threads +truetype udev +udisks +unwind usb v4l vulkan +X +xcomposite xinerama"
303 REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
304 X? ( truetype )
305 + crossdev-mingw? ( mingw )
306 elibc_glibc? ( threads )
307 osmesa? ( opengl )
308 pipelight? ( staging )
309 @@ -62,7 +63,8 @@ RESTRICT="test"
310
311 BDEPEND="sys-devel/flex
312 virtual/yacc
313 - virtual/pkgconfig"
314 + virtual/pkgconfig
315 + !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] )"
316
317 COMMON_DEPEND="
318 X? (
319 @@ -215,32 +217,18 @@ pkg_pretend() {
320 fi
321 fi
322
323 - if use mingw && use abi_x86_32 && ! has_version "cross-i686-w64-mingw32/gcc"; then
324 - eerror
325 - eerror "USE=\"mingw\" is currently experimental, and requires the"
326 - eerror "'cross-i686-w64-mingw32' compiler and its runtime for 32-bit builds."
327 - eerror
328 - eerror "These can be installed by using 'sys-devel/crossdev':"
329 - eerror
330 - eerror "crossdev --target i686-w64-mingw32"
331 - eerror
332 - eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw"
333 - eerror
334 - die "MinGW build was enabled, but no compiler to support it was found."
335 - fi
336 -
337 - if use mingw && use abi_x86_64 && ! has_version "cross-x86_64-w64-mingw32/gcc"; then
338 - eerror
339 - eerror "USE=\"mingw\" is currently experimental, and requires the"
340 - eerror "'cross-x86_64-w64-mingw32' compiler and its runtime for 64-bit builds."
341 - eerror
342 - eerror "These can be installed by using 'sys-devel/crossdev':"
343 - eerror
344 - eerror "crossdev --target x86_64-w64-mingw32"
345 - eerror
346 - eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw"
347 - eerror
348 - die "MinGW build was enabled, but no compiler to support it was found."
349 + if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then
350 + local mingw=-w64-mingw32
351 + for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do
352 + type -P ${mingw}-gcc && continue
353 + eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain"
354 + eerror "yourself by installing sys-devel/crossdev then running:"
355 + eerror
356 + eerror " crossdev --target ${mingw}"
357 + eerror
358 + eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw"
359 + die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found"
360 + done
361 fi
362 fi
363 }
364 @@ -367,6 +355,8 @@ src_configure() {
365 export LDCONFIG=/bin/true
366 use custom-cflags || strip-flags
367 if use mingw; then
368 + use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}
369 +
370 export CROSSCFLAGS="${CFLAGS}"
371 fi
372
373
374 diff --git a/app-emulation/wine-staging/wine-staging-9999.ebuild b/app-emulation/wine-staging/wine-staging-9999.ebuild
375 index c612384db05e..a8f7b0e6ad1c 100644
376 --- a/app-emulation/wine-staging/wine-staging-9999.ebuild
377 +++ b/app-emulation/wine-staging/wine-staging-9999.ebuild
378 @@ -48,9 +48,10 @@ fi
379
380 LICENSE="LGPL-2.1"
381 SLOT="${MY_PV}"
382 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos +fontconfig +gecko gphoto2 gssapi gstreamer kerberos ldap mingw +mono mp3 netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl staging test +threads +truetype udev +udisks +unwind usb v4l vulkan +X +xcomposite xinerama"
383 +IUSE="+abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups custom-cflags dos +fontconfig +gecko gphoto2 gssapi gstreamer kerberos ldap mingw +mono mp3 netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl staging test +threads +truetype udev +udisks +unwind usb v4l vulkan +X +xcomposite xinerama"
384 REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
385 X? ( truetype )
386 + crossdev-mingw? ( mingw )
387 elibc_glibc? ( threads )
388 osmesa? ( opengl )
389 pipelight? ( staging )
390 @@ -62,7 +63,8 @@ RESTRICT="test"
391
392 BDEPEND="sys-devel/flex
393 virtual/yacc
394 - virtual/pkgconfig"
395 + virtual/pkgconfig
396 + !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] )"
397
398 COMMON_DEPEND="
399 X? (
400 @@ -215,32 +217,18 @@ pkg_pretend() {
401 fi
402 fi
403
404 - if use mingw && use abi_x86_32 && ! has_version "cross-i686-w64-mingw32/gcc"; then
405 - eerror
406 - eerror "USE=\"mingw\" is currently experimental, and requires the"
407 - eerror "'cross-i686-w64-mingw32' compiler and its runtime for 32-bit builds."
408 - eerror
409 - eerror "These can be installed by using 'sys-devel/crossdev':"
410 - eerror
411 - eerror "crossdev --target i686-w64-mingw32"
412 - eerror
413 - eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw"
414 - eerror
415 - die "MinGW build was enabled, but no compiler to support it was found."
416 - fi
417 -
418 - if use mingw && use abi_x86_64 && ! has_version "cross-x86_64-w64-mingw32/gcc"; then
419 - eerror
420 - eerror "USE=\"mingw\" is currently experimental, and requires the"
421 - eerror "'cross-x86_64-w64-mingw32' compiler and its runtime for 64-bit builds."
422 - eerror
423 - eerror "These can be installed by using 'sys-devel/crossdev':"
424 - eerror
425 - eerror "crossdev --target x86_64-w64-mingw32"
426 - eerror
427 - eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw"
428 - eerror
429 - die "MinGW build was enabled, but no compiler to support it was found."
430 + if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then
431 + local mingw=-w64-mingw32
432 + for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do
433 + type -P ${mingw}-gcc && continue
434 + eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain"
435 + eerror "yourself by installing sys-devel/crossdev then running:"
436 + eerror
437 + eerror " crossdev --target ${mingw}"
438 + eerror
439 + eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw"
440 + die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found"
441 + done
442 fi
443 fi
444 }
445 @@ -367,6 +355,8 @@ src_configure() {
446 export LDCONFIG=/bin/true
447 use custom-cflags || strip-flags
448 if use mingw; then
449 + use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}
450 +
451 export CROSSCFLAGS="${CFLAGS}"
452 fi