commit:     5829502de752852949c11138e6a472a7a043ee58
Author:     NP-Hardass <NP-Hardass <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 12 21:26:04 2017 +0000
Commit:     NP Hardass <np-hardass <AT> gentoo <DOT> org>
CommitDate: Sun Mar 12 21:26:33 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5829502d

app-emulation/wine: move compilation checks to src_configure, #610752

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 app-emulation/wine/wine-1.8-r3.ebuild    | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.8.1-r3.ebuild  | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.8.2-r2.ebuild  | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.8.3-r1.ebuild  | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.8.4.ebuild     | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.8.5.ebuild     | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.8.6.ebuild     | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.9.10-r3.ebuild | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.9.11-r3.ebuild | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.9.12-r2.ebuild | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.9.13-r2.ebuild | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.9.14-r2.ebuild | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.9.15-r1.ebuild | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.9.16.ebuild    | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.9.17.ebuild    | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.9.18.ebuild    | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.9.19-r1.ebuild | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.9.20.ebuild    | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.9.21.ebuild    | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.9.22.ebuild    | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.9.23.ebuild    | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.9.4-r3.ebuild  | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.9.5-r3.ebuild  | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.9.6-r3.ebuild  | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.9.7-r3.ebuild  | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.9.8-r2.ebuild  | 18 +++++++++++++++++-
 app-emulation/wine/wine-1.9.9-r3.ebuild  | 18 +++++++++++++++++-
 app-emulation/wine/wine-2.0.ebuild       | 18 +++++++++++++++++-
 app-emulation/wine/wine-9999.ebuild      | 18 +++++++++++++++++-
 29 files changed, 493 insertions(+), 29 deletions(-)

diff --git a/app-emulation/wine/wine-1.8-r3.ebuild 
b/app-emulation/wine/wine-1.8-r3.ebuild
index adddb01d828..84c02fd07a0 100644
--- a/app-emulation/wine/wine-1.8-r3.ebuild
+++ b/app-emulation/wine/wine-1.8-r3.ebuild
@@ -237,6 +237,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -267,7 +282,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -368,6 +382,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.8.1-r3.ebuild 
b/app-emulation/wine/wine-1.8.1-r3.ebuild
index ee88d61ac55..1890e53d58e 100644
--- a/app-emulation/wine/wine-1.8.1-r3.ebuild
+++ b/app-emulation/wine/wine-1.8.1-r3.ebuild
@@ -238,6 +238,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -268,7 +283,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -374,6 +388,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.8.2-r2.ebuild 
b/app-emulation/wine/wine-1.8.2-r2.ebuild
index c98ce9ec4ed..439357f4824 100644
--- a/app-emulation/wine/wine-1.8.2-r2.ebuild
+++ b/app-emulation/wine/wine-1.8.2-r2.ebuild
@@ -238,6 +238,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -268,7 +283,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -374,6 +388,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.8.3-r1.ebuild 
b/app-emulation/wine/wine-1.8.3-r1.ebuild
index 2e8cc42575e..36ff7973f9e 100644
--- a/app-emulation/wine/wine-1.8.3-r1.ebuild
+++ b/app-emulation/wine/wine-1.8.3-r1.ebuild
@@ -238,6 +238,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -268,7 +283,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -373,6 +387,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.8.4.ebuild 
b/app-emulation/wine/wine-1.8.4.ebuild
index 6b20bb4b203..dfe2d26d2af 100644
--- a/app-emulation/wine/wine-1.8.4.ebuild
+++ b/app-emulation/wine/wine-1.8.4.ebuild
@@ -238,6 +238,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -268,7 +283,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -372,6 +386,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.8.5.ebuild 
b/app-emulation/wine/wine-1.8.5.ebuild
index 6b20bb4b203..dfe2d26d2af 100644
--- a/app-emulation/wine/wine-1.8.5.ebuild
+++ b/app-emulation/wine/wine-1.8.5.ebuild
@@ -238,6 +238,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -268,7 +283,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -372,6 +386,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.8.6.ebuild 
b/app-emulation/wine/wine-1.8.6.ebuild
index 6b20bb4b203..dfe2d26d2af 100644
--- a/app-emulation/wine/wine-1.8.6.ebuild
+++ b/app-emulation/wine/wine-1.8.6.ebuild
@@ -238,6 +238,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -268,7 +283,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -372,6 +386,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.9.10-r3.ebuild 
b/app-emulation/wine/wine-1.9.10-r3.ebuild
index 334cfd5730a..793bd05e09a 100644
--- a/app-emulation/wine/wine-1.9.10-r3.ebuild
+++ b/app-emulation/wine/wine-1.9.10-r3.ebuild
@@ -245,6 +245,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -275,7 +290,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -391,6 +405,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.9.11-r3.ebuild 
b/app-emulation/wine/wine-1.9.11-r3.ebuild
index 334cfd5730a..793bd05e09a 100644
--- a/app-emulation/wine/wine-1.9.11-r3.ebuild
+++ b/app-emulation/wine/wine-1.9.11-r3.ebuild
@@ -245,6 +245,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -275,7 +290,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -391,6 +405,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.9.12-r2.ebuild 
b/app-emulation/wine/wine-1.9.12-r2.ebuild
index 2ab196a6fd7..79f97032617 100644
--- a/app-emulation/wine/wine-1.9.12-r2.ebuild
+++ b/app-emulation/wine/wine-1.9.12-r2.ebuild
@@ -245,6 +245,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -275,7 +290,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -391,6 +405,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.9.13-r2.ebuild 
b/app-emulation/wine/wine-1.9.13-r2.ebuild
index ebe150c8d86..2b842b75ab8 100644
--- a/app-emulation/wine/wine-1.9.13-r2.ebuild
+++ b/app-emulation/wine/wine-1.9.13-r2.ebuild
@@ -245,6 +245,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -275,7 +290,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -390,6 +404,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.9.14-r2.ebuild 
b/app-emulation/wine/wine-1.9.14-r2.ebuild
index ebe150c8d86..2b842b75ab8 100644
--- a/app-emulation/wine/wine-1.9.14-r2.ebuild
+++ b/app-emulation/wine/wine-1.9.14-r2.ebuild
@@ -245,6 +245,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -275,7 +290,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -390,6 +404,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.9.15-r1.ebuild 
b/app-emulation/wine/wine-1.9.15-r1.ebuild
index ebe150c8d86..2b842b75ab8 100644
--- a/app-emulation/wine/wine-1.9.15-r1.ebuild
+++ b/app-emulation/wine/wine-1.9.15-r1.ebuild
@@ -245,6 +245,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -275,7 +290,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -390,6 +404,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.9.16.ebuild 
b/app-emulation/wine/wine-1.9.16.ebuild
index ebe150c8d86..2b842b75ab8 100644
--- a/app-emulation/wine/wine-1.9.16.ebuild
+++ b/app-emulation/wine/wine-1.9.16.ebuild
@@ -245,6 +245,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -275,7 +290,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -390,6 +404,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.9.17.ebuild 
b/app-emulation/wine/wine-1.9.17.ebuild
index c8b84c8e194..9c7d5a204ee 100644
--- a/app-emulation/wine/wine-1.9.17.ebuild
+++ b/app-emulation/wine/wine-1.9.17.ebuild
@@ -245,6 +245,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -275,7 +290,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -390,6 +404,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.9.18.ebuild 
b/app-emulation/wine/wine-1.9.18.ebuild
index c557311c9b9..9cb4e1c37d7 100644
--- a/app-emulation/wine/wine-1.9.18.ebuild
+++ b/app-emulation/wine/wine-1.9.18.ebuild
@@ -245,6 +245,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -275,7 +290,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -390,6 +404,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.9.19-r1.ebuild 
b/app-emulation/wine/wine-1.9.19-r1.ebuild
index 223d8d23678..38e05484dbf 100644
--- a/app-emulation/wine/wine-1.9.19-r1.ebuild
+++ b/app-emulation/wine/wine-1.9.19-r1.ebuild
@@ -246,6 +246,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -276,7 +291,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -391,6 +405,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.9.20.ebuild 
b/app-emulation/wine/wine-1.9.20.ebuild
index 223d8d23678..38e05484dbf 100644
--- a/app-emulation/wine/wine-1.9.20.ebuild
+++ b/app-emulation/wine/wine-1.9.20.ebuild
@@ -246,6 +246,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -276,7 +291,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -391,6 +405,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.9.21.ebuild 
b/app-emulation/wine/wine-1.9.21.ebuild
index 223d8d23678..38e05484dbf 100644
--- a/app-emulation/wine/wine-1.9.21.ebuild
+++ b/app-emulation/wine/wine-1.9.21.ebuild
@@ -246,6 +246,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -276,7 +291,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -391,6 +405,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.9.22.ebuild 
b/app-emulation/wine/wine-1.9.22.ebuild
index 223d8d23678..38e05484dbf 100644
--- a/app-emulation/wine/wine-1.9.22.ebuild
+++ b/app-emulation/wine/wine-1.9.22.ebuild
@@ -246,6 +246,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -276,7 +291,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -391,6 +405,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.9.23.ebuild 
b/app-emulation/wine/wine-1.9.23.ebuild
index 223d8d23678..38e05484dbf 100644
--- a/app-emulation/wine/wine-1.9.23.ebuild
+++ b/app-emulation/wine/wine-1.9.23.ebuild
@@ -246,6 +246,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -276,7 +291,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -391,6 +405,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.9.4-r3.ebuild 
b/app-emulation/wine/wine-1.9.4-r3.ebuild
index ae588db33d1..9b7e4922de6 100644
--- a/app-emulation/wine/wine-1.9.4-r3.ebuild
+++ b/app-emulation/wine/wine-1.9.4-r3.ebuild
@@ -236,6 +236,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -266,7 +281,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -371,6 +385,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.9.5-r3.ebuild 
b/app-emulation/wine/wine-1.9.5-r3.ebuild
index fbbcf25a79c..5cf8714a80b 100644
--- a/app-emulation/wine/wine-1.9.5-r3.ebuild
+++ b/app-emulation/wine/wine-1.9.5-r3.ebuild
@@ -235,6 +235,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -265,7 +280,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -373,6 +387,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.9.6-r3.ebuild 
b/app-emulation/wine/wine-1.9.6-r3.ebuild
index f7eabfb28ad..3107acebf17 100644
--- a/app-emulation/wine/wine-1.9.6-r3.ebuild
+++ b/app-emulation/wine/wine-1.9.6-r3.ebuild
@@ -235,6 +235,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -265,7 +280,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -370,6 +384,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.9.7-r3.ebuild 
b/app-emulation/wine/wine-1.9.7-r3.ebuild
index f7eabfb28ad..3107acebf17 100644
--- a/app-emulation/wine/wine-1.9.7-r3.ebuild
+++ b/app-emulation/wine/wine-1.9.7-r3.ebuild
@@ -235,6 +235,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -265,7 +280,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -370,6 +384,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.9.8-r2.ebuild 
b/app-emulation/wine/wine-1.9.8-r2.ebuild
index cf70abfc84c..bc6aca23377 100644
--- a/app-emulation/wine/wine-1.9.8-r2.ebuild
+++ b/app-emulation/wine/wine-1.9.8-r2.ebuild
@@ -235,6 +235,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -265,7 +280,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -370,6 +384,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-1.9.9-r3.ebuild 
b/app-emulation/wine/wine-1.9.9-r3.ebuild
index 4708e4a5553..31c8c34c66c 100644
--- a/app-emulation/wine/wine-1.9.9-r3.ebuild
+++ b/app-emulation/wine/wine-1.9.9-r3.ebuild
@@ -245,6 +245,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -275,7 +290,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -391,6 +405,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-2.0.ebuild 
b/app-emulation/wine/wine-2.0.ebuild
index a5e69c16bff..e037d416acf 100644
--- a/app-emulation/wine/wine-2.0.ebuild
+++ b/app-emulation/wine/wine-2.0.ebuild
@@ -199,6 +199,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -208,7 +223,6 @@ wine_build_environment_check() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -270,6 +284,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

diff --git a/app-emulation/wine/wine-9999.ebuild 
b/app-emulation/wine/wine-9999.ebuild
index dde1b9ec0f9..d17608967fe 100644
--- a/app-emulation/wine/wine-9999.ebuild
+++ b/app-emulation/wine/wine-9999.ebuild
@@ -246,6 +246,21 @@ wine_compiler_check() {
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       if use abi_x86_64; then
+               if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( 
$(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
+                       eerror "You need gcc-4.4+ to compile 64-bit wine"
+                       die
+               elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( 
$(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
+                       eerror "You need clang-3.8+ to compile 64-bit wine"
+                       die
+               fi
+       fi
+       if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) 
-le 3 ]]; then
+               ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no 
longer supported by"
+               ewarn "Gentoo's Toolchain Team. If your ebuild fails the 
compiler checks in"
+               ewarn "the configure phase, either update your compiler or 
switch to <5.0 || >=5.4"
+       fi
+
        if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> 
/dev/null)" == "intel" ]]; then
                eerror "You cannot build wine with USE=opencl because 
intel-ocl-sdk is 64-bit only."
                eerror "See https://bugs.gentoo.org/487864 for more details."
@@ -276,7 +291,6 @@ wine_env_vcs_vars() {
 }
 
 pkg_pretend() {
-       wine_compiler_check || die
        wine_build_environment_check || die
 
        # Verify OSS support
@@ -392,6 +406,8 @@ src_prepare() {
 }
 
 src_configure() {
+       wine_compiler_check || die
+
        export LDCONFIG=/bin/true
        use custom-cflags || strip-flags
 

Reply via email to