From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1C2A2158090 for ; Fri, 20 May 2022 20:02:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 54DBFE09D9; Fri, 20 May 2022 20:02:05 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BE9C6E09D9 for ; Fri, 20 May 2022 20:02:04 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E6D6A34165A for ; Fri, 20 May 2022 20:02:03 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 839AB477 for ; Fri, 20 May 2022 20:02:02 +0000 (UTC) From: "Ionen Wolkens" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ionen Wolkens" Message-ID: <1653076906.22d035036df4ab21d5f724877c3709f4eff59b5b.ionen@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/wine-staging/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-emulation/wine-staging/metadata.xml app-emulation/wine-staging/wine-staging-7.5-r1.ebuild app-emulation/wine-staging/wine-staging-7.6-r1.ebuild app-emulation/wine-staging/wine-staging-7.7.ebuild app-emulation/wine-staging/wine-staging-7.8.ebuild app-emulation/wine-staging/wine-staging-9999.ebuild X-VCS-Directories: app-emulation/wine-staging/ X-VCS-Committer: ionen X-VCS-Committer-Name: Ionen Wolkens X-VCS-Revision: 22d035036df4ab21d5f724877c3709f4eff59b5b X-VCS-Branch: master Date: Fri, 20 May 2022 20:02:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: fa50719b-6613-4902-8661-dd6a19286713 X-Archives-Hash: ccf1df96add463361e356d806ac3b7a7 commit: 22d035036df4ab21d5f724877c3709f4eff59b5b Author: Ionen Wolkens gentoo org> AuthorDate: Wed May 18 02:41:50 2022 +0000 Commit: Ionen Wolkens gentoo org> CommitDate: Fri May 20 20:01:46 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22d03503 app-emulation/wine-staging: support building with mingw64-toolchain This allows USE=mingw to be usable without manually using crossdev first to ease usage for users and automated testing. Old behavior using crossdev still available with USE=crossdev-mingw, albeit new one should offer better stability given mingw64-toolchain is intended/tested especially to build wine+dxvk+vkd3d-proton. Given wine is pushing PE conversions and some things work better with PE files (e.g. Blizzard games, Proton also uses --with-mingw), it may be useful for the prospect of making this a default at some point. Note that mingw64-toolchain's ${MULTILIB_USEDEP} does belong in BDEPEND (unless gentoo.org> app-emulation/wine-staging/metadata.xml | 4 ++ .../wine-staging/wine-staging-7.5-r1.ebuild | 46 +++++++++------------- .../wine-staging/wine-staging-7.6-r1.ebuild | 46 +++++++++------------- app-emulation/wine-staging/wine-staging-7.7.ebuild | 46 +++++++++------------- app-emulation/wine-staging/wine-staging-7.8.ebuild | 46 +++++++++------------- .../wine-staging/wine-staging-9999.ebuild | 46 +++++++++------------- 6 files changed, 94 insertions(+), 140 deletions(-) diff --git a/app-emulation/wine-staging/metadata.xml b/app-emulation/wine-staging/metadata.xml index ee411faa12da..8811667ddc0b 100644 --- a/app-emulation/wine-staging/metadata.xml +++ b/app-emulation/wine-staging/metadata.xml @@ -18,6 +18,10 @@ This variant of the Wine packaging includes the Wine-Staging patchset. Enable ISDN support via CAPI + + Use sys-devel/crossdev for the toolchain rather than + dev-util/mingw64-toolchain (requires manual setting up) + Bypass strip-flags; use at your own peril Pull in games-emulation/dosbox to run DOS applications Add support for the Gecko engine when using iexplore diff --git a/app-emulation/wine-staging/wine-staging-7.5-r1.ebuild b/app-emulation/wine-staging/wine-staging-7.5-r1.ebuild index 178ae2fa6afe..5a8aa3f539f4 100644 --- a/app-emulation/wine-staging/wine-staging-7.5-r1.ebuild +++ b/app-emulation/wine-staging/wine-staging-7.5-r1.ebuild @@ -48,9 +48,10 @@ fi LICENSE="LGPL-2.1" SLOT="${MY_PV}" -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" +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" REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) X? ( truetype ) + crossdev-mingw? ( mingw ) elibc_glibc? ( threads ) osmesa? ( opengl ) pipelight? ( staging ) @@ -63,7 +64,8 @@ RESTRICT="test" BDEPEND="sys-devel/flex virtual/yacc - virtual/pkgconfig" + virtual/pkgconfig + !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] )" COMMON_DEPEND=" X? ( @@ -217,32 +219,18 @@ pkg_pretend() { fi fi - if use mingw && use abi_x86_32 && ! has_version "cross-i686-w64-mingw32/gcc"; then - eerror - eerror "USE=\"mingw\" is currently experimental, and requires the" - eerror "'cross-i686-w64-mingw32' compiler and its runtime for 32-bit builds." - eerror - eerror "These can be installed by using 'sys-devel/crossdev':" - eerror - eerror "crossdev --target i686-w64-mingw32" - eerror - eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw" - eerror - die "MinGW build was enabled, but no compiler to support it was found." - fi - - if use mingw && use abi_x86_64 && ! has_version "cross-x86_64-w64-mingw32/gcc"; then - eerror - eerror "USE=\"mingw\" is currently experimental, and requires the" - eerror "'cross-x86_64-w64-mingw32' compiler and its runtime for 64-bit builds." - eerror - eerror "These can be installed by using 'sys-devel/crossdev':" - eerror - eerror "crossdev --target x86_64-w64-mingw32" - eerror - eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw" - eerror - die "MinGW build was enabled, but no compiler to support it was found." + if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then + local mingw=-w64-mingw32 + for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do + type -P ${mingw}-gcc && continue + eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain" + eerror "yourself by installing sys-devel/crossdev then running:" + eerror + eerror " crossdev --target ${mingw}" + eerror + eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw" + die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found" + done fi fi } @@ -369,6 +357,8 @@ src_configure() { export LDCONFIG=/bin/true use custom-cflags || strip-flags if use mingw; then + use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} + export CROSSCFLAGS="${CFLAGS}" fi diff --git a/app-emulation/wine-staging/wine-staging-7.6-r1.ebuild b/app-emulation/wine-staging/wine-staging-7.6-r1.ebuild index 2985fe9ef68e..c814bc62907c 100644 --- a/app-emulation/wine-staging/wine-staging-7.6-r1.ebuild +++ b/app-emulation/wine-staging/wine-staging-7.6-r1.ebuild @@ -48,9 +48,10 @@ fi LICENSE="LGPL-2.1" SLOT="${MY_PV}" -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" +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" REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) X? ( truetype ) + crossdev-mingw? ( mingw ) elibc_glibc? ( threads ) osmesa? ( opengl ) pipelight? ( staging ) @@ -63,7 +64,8 @@ RESTRICT="test" BDEPEND="sys-devel/flex virtual/yacc - virtual/pkgconfig" + virtual/pkgconfig + !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] )" COMMON_DEPEND=" X? ( @@ -217,32 +219,18 @@ pkg_pretend() { fi fi - if use mingw && use abi_x86_32 && ! has_version "cross-i686-w64-mingw32/gcc"; then - eerror - eerror "USE=\"mingw\" is currently experimental, and requires the" - eerror "'cross-i686-w64-mingw32' compiler and its runtime for 32-bit builds." - eerror - eerror "These can be installed by using 'sys-devel/crossdev':" - eerror - eerror "crossdev --target i686-w64-mingw32" - eerror - eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw" - eerror - die "MinGW build was enabled, but no compiler to support it was found." - fi - - if use mingw && use abi_x86_64 && ! has_version "cross-x86_64-w64-mingw32/gcc"; then - eerror - eerror "USE=\"mingw\" is currently experimental, and requires the" - eerror "'cross-x86_64-w64-mingw32' compiler and its runtime for 64-bit builds." - eerror - eerror "These can be installed by using 'sys-devel/crossdev':" - eerror - eerror "crossdev --target x86_64-w64-mingw32" - eerror - eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw" - eerror - die "MinGW build was enabled, but no compiler to support it was found." + if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then + local mingw=-w64-mingw32 + for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do + type -P ${mingw}-gcc && continue + eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain" + eerror "yourself by installing sys-devel/crossdev then running:" + eerror + eerror " crossdev --target ${mingw}" + eerror + eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw" + die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found" + done fi fi } @@ -369,6 +357,8 @@ src_configure() { export LDCONFIG=/bin/true use custom-cflags || strip-flags if use mingw; then + use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} + export CROSSCFLAGS="${CFLAGS}" fi diff --git a/app-emulation/wine-staging/wine-staging-7.7.ebuild b/app-emulation/wine-staging/wine-staging-7.7.ebuild index 2985fe9ef68e..c814bc62907c 100644 --- a/app-emulation/wine-staging/wine-staging-7.7.ebuild +++ b/app-emulation/wine-staging/wine-staging-7.7.ebuild @@ -48,9 +48,10 @@ fi LICENSE="LGPL-2.1" SLOT="${MY_PV}" -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" +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" REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) X? ( truetype ) + crossdev-mingw? ( mingw ) elibc_glibc? ( threads ) osmesa? ( opengl ) pipelight? ( staging ) @@ -63,7 +64,8 @@ RESTRICT="test" BDEPEND="sys-devel/flex virtual/yacc - virtual/pkgconfig" + virtual/pkgconfig + !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] )" COMMON_DEPEND=" X? ( @@ -217,32 +219,18 @@ pkg_pretend() { fi fi - if use mingw && use abi_x86_32 && ! has_version "cross-i686-w64-mingw32/gcc"; then - eerror - eerror "USE=\"mingw\" is currently experimental, and requires the" - eerror "'cross-i686-w64-mingw32' compiler and its runtime for 32-bit builds." - eerror - eerror "These can be installed by using 'sys-devel/crossdev':" - eerror - eerror "crossdev --target i686-w64-mingw32" - eerror - eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw" - eerror - die "MinGW build was enabled, but no compiler to support it was found." - fi - - if use mingw && use abi_x86_64 && ! has_version "cross-x86_64-w64-mingw32/gcc"; then - eerror - eerror "USE=\"mingw\" is currently experimental, and requires the" - eerror "'cross-x86_64-w64-mingw32' compiler and its runtime for 64-bit builds." - eerror - eerror "These can be installed by using 'sys-devel/crossdev':" - eerror - eerror "crossdev --target x86_64-w64-mingw32" - eerror - eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw" - eerror - die "MinGW build was enabled, but no compiler to support it was found." + if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then + local mingw=-w64-mingw32 + for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do + type -P ${mingw}-gcc && continue + eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain" + eerror "yourself by installing sys-devel/crossdev then running:" + eerror + eerror " crossdev --target ${mingw}" + eerror + eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw" + die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found" + done fi fi } @@ -369,6 +357,8 @@ src_configure() { export LDCONFIG=/bin/true use custom-cflags || strip-flags if use mingw; then + use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} + export CROSSCFLAGS="${CFLAGS}" fi diff --git a/app-emulation/wine-staging/wine-staging-7.8.ebuild b/app-emulation/wine-staging/wine-staging-7.8.ebuild index c612384db05e..a8f7b0e6ad1c 100644 --- a/app-emulation/wine-staging/wine-staging-7.8.ebuild +++ b/app-emulation/wine-staging/wine-staging-7.8.ebuild @@ -48,9 +48,10 @@ fi LICENSE="LGPL-2.1" SLOT="${MY_PV}" -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" +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" REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) X? ( truetype ) + crossdev-mingw? ( mingw ) elibc_glibc? ( threads ) osmesa? ( opengl ) pipelight? ( staging ) @@ -62,7 +63,8 @@ RESTRICT="test" BDEPEND="sys-devel/flex virtual/yacc - virtual/pkgconfig" + virtual/pkgconfig + !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] )" COMMON_DEPEND=" X? ( @@ -215,32 +217,18 @@ pkg_pretend() { fi fi - if use mingw && use abi_x86_32 && ! has_version "cross-i686-w64-mingw32/gcc"; then - eerror - eerror "USE=\"mingw\" is currently experimental, and requires the" - eerror "'cross-i686-w64-mingw32' compiler and its runtime for 32-bit builds." - eerror - eerror "These can be installed by using 'sys-devel/crossdev':" - eerror - eerror "crossdev --target i686-w64-mingw32" - eerror - eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw" - eerror - die "MinGW build was enabled, but no compiler to support it was found." - fi - - if use mingw && use abi_x86_64 && ! has_version "cross-x86_64-w64-mingw32/gcc"; then - eerror - eerror "USE=\"mingw\" is currently experimental, and requires the" - eerror "'cross-x86_64-w64-mingw32' compiler and its runtime for 64-bit builds." - eerror - eerror "These can be installed by using 'sys-devel/crossdev':" - eerror - eerror "crossdev --target x86_64-w64-mingw32" - eerror - eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw" - eerror - die "MinGW build was enabled, but no compiler to support it was found." + if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then + local mingw=-w64-mingw32 + for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do + type -P ${mingw}-gcc && continue + eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain" + eerror "yourself by installing sys-devel/crossdev then running:" + eerror + eerror " crossdev --target ${mingw}" + eerror + eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw" + die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found" + done fi fi } @@ -367,6 +355,8 @@ src_configure() { export LDCONFIG=/bin/true use custom-cflags || strip-flags if use mingw; then + use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} + export CROSSCFLAGS="${CFLAGS}" fi diff --git a/app-emulation/wine-staging/wine-staging-9999.ebuild b/app-emulation/wine-staging/wine-staging-9999.ebuild index c612384db05e..a8f7b0e6ad1c 100644 --- a/app-emulation/wine-staging/wine-staging-9999.ebuild +++ b/app-emulation/wine-staging/wine-staging-9999.ebuild @@ -48,9 +48,10 @@ fi LICENSE="LGPL-2.1" SLOT="${MY_PV}" -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" +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" REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) X? ( truetype ) + crossdev-mingw? ( mingw ) elibc_glibc? ( threads ) osmesa? ( opengl ) pipelight? ( staging ) @@ -62,7 +63,8 @@ RESTRICT="test" BDEPEND="sys-devel/flex virtual/yacc - virtual/pkgconfig" + virtual/pkgconfig + !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] )" COMMON_DEPEND=" X? ( @@ -215,32 +217,18 @@ pkg_pretend() { fi fi - if use mingw && use abi_x86_32 && ! has_version "cross-i686-w64-mingw32/gcc"; then - eerror - eerror "USE=\"mingw\" is currently experimental, and requires the" - eerror "'cross-i686-w64-mingw32' compiler and its runtime for 32-bit builds." - eerror - eerror "These can be installed by using 'sys-devel/crossdev':" - eerror - eerror "crossdev --target i686-w64-mingw32" - eerror - eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw" - eerror - die "MinGW build was enabled, but no compiler to support it was found." - fi - - if use mingw && use abi_x86_64 && ! has_version "cross-x86_64-w64-mingw32/gcc"; then - eerror - eerror "USE=\"mingw\" is currently experimental, and requires the" - eerror "'cross-x86_64-w64-mingw32' compiler and its runtime for 64-bit builds." - eerror - eerror "These can be installed by using 'sys-devel/crossdev':" - eerror - eerror "crossdev --target x86_64-w64-mingw32" - eerror - eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw" - eerror - die "MinGW build was enabled, but no compiler to support it was found." + if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then + local mingw=-w64-mingw32 + for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do + type -P ${mingw}-gcc && continue + eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain" + eerror "yourself by installing sys-devel/crossdev then running:" + eerror + eerror " crossdev --target ${mingw}" + eerror + eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw" + die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found" + done fi fi } @@ -367,6 +355,8 @@ src_configure() { export LDCONFIG=/bin/true use custom-cflags || strip-flags if use mingw; then + use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} + export CROSSCFLAGS="${CFLAGS}" fi