commit:     9905d05f9b9851c11bd2e0922b79df6f5db3033d
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sat May 14 02:04:43 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sat May 14 02:21:57 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9905d05f

app-emulation/dxvk: add bypass for crossdev checks / unset

Unset is needed given CC is not expected to be a cross-compiler
but, if users know what they are doing, leave a way (MINGW_BYPASS=1).

If e.g. llvm-mingw is ever officially supported, may need a mingw
eclass to juggle toolchains properly and instruct about them.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 app-emulation/dxvk/dxvk-1.10.1.ebuild | 6 +++---
 app-emulation/dxvk/dxvk-9999.ebuild   | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app-emulation/dxvk/dxvk-1.10.1.ebuild 
b/app-emulation/dxvk/dxvk-1.10.1.ebuild
index d48b3cc7cc2a..7d293dd8f8ea 100644
--- a/app-emulation/dxvk/dxvk-1.10.1.ebuild
+++ b/app-emulation/dxvk/dxvk-1.10.1.ebuild
@@ -32,7 +32,7 @@ BDEPEND="
 pkg_pretend() {
        [[ ${MERGE_TYPE} == binary ]] && return
 
-       if use crossdev-mingw; then
+       if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then
                local tool=-w64-mingw32-g++
                for tool in $(usev abi_x86_64 x86_64${tool}) $(usev abi_x86_32 
i686${tool}); do
                        if ! type -P ${tool} >/dev/null; then
@@ -64,7 +64,7 @@ src_configure() {
        append-flags -mno-avx
 
        if [[ ${CHOST} != *-mingw* ]]; then
-               unset AR CC CXX RC STRIP # likely unusable unless CHOST is mingw
+               [[ ! -v MINGW_BYPASS ]] && unset AR CC CXX RC STRIP
 
                CHOST_amd64=x86_64-w64-mingw32
                CHOST_x86=i686-w64-mingw32
@@ -79,7 +79,7 @@ src_configure() {
 multilib_src_configure() {
        # multilib's ${CHOST_amd64}-gcc -m32 is unusable with crossdev,
        # unset again so meson eclass will set ${CHOST}-gcc + others
-       use crossdev-mingw && unset AR CC CXX RC STRIP
+       use crossdev-mingw && [[ ! -v MINGW_BYPASS ]] && unset AR CC CXX RC 
STRIP
 
        local emesonargs=(
                --prefix="${EPREFIX}"/usr/lib/${PN}

diff --git a/app-emulation/dxvk/dxvk-9999.ebuild 
b/app-emulation/dxvk/dxvk-9999.ebuild
index d48b3cc7cc2a..7d293dd8f8ea 100644
--- a/app-emulation/dxvk/dxvk-9999.ebuild
+++ b/app-emulation/dxvk/dxvk-9999.ebuild
@@ -32,7 +32,7 @@ BDEPEND="
 pkg_pretend() {
        [[ ${MERGE_TYPE} == binary ]] && return
 
-       if use crossdev-mingw; then
+       if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then
                local tool=-w64-mingw32-g++
                for tool in $(usev abi_x86_64 x86_64${tool}) $(usev abi_x86_32 
i686${tool}); do
                        if ! type -P ${tool} >/dev/null; then
@@ -64,7 +64,7 @@ src_configure() {
        append-flags -mno-avx
 
        if [[ ${CHOST} != *-mingw* ]]; then
-               unset AR CC CXX RC STRIP # likely unusable unless CHOST is mingw
+               [[ ! -v MINGW_BYPASS ]] && unset AR CC CXX RC STRIP
 
                CHOST_amd64=x86_64-w64-mingw32
                CHOST_x86=i686-w64-mingw32
@@ -79,7 +79,7 @@ src_configure() {
 multilib_src_configure() {
        # multilib's ${CHOST_amd64}-gcc -m32 is unusable with crossdev,
        # unset again so meson eclass will set ${CHOST}-gcc + others
-       use crossdev-mingw && unset AR CC CXX RC STRIP
+       use crossdev-mingw && [[ ! -v MINGW_BYPASS ]] && unset AR CC CXX RC 
STRIP
 
        local emesonargs=(
                --prefix="${EPREFIX}"/usr/lib/${PN}

Reply via email to