commit:     26512e9ccdcce4f77440d4118061da9fff236caf
Author:     Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 26 04:42:40 2015 +0000
Commit:     Alexandre Rostovtsev <tetromino <AT> gentoo <DOT> org>
CommitDate: Wed Aug 26 04:43:16 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26512e9c

app-emulation/wine: restrict gcc-5 only for 64-bit wine

Also, improve error message a bit.

Gentoo-Bug: 549768
Thanks-to: xpue
Package-Manager: portage-2.2.20.1

 app-emulation/wine/wine-1.6.2-r1.ebuild  | 6 ++++--
 app-emulation/wine/wine-1.6.2.ebuild     | 9 +++++++++
 app-emulation/wine/wine-1.7.10-r1.ebuild | 6 ++++--
 app-emulation/wine/wine-1.7.11-r1.ebuild | 6 ++++--
 app-emulation/wine/wine-1.7.12-r1.ebuild | 6 ++++--
 app-emulation/wine/wine-1.7.13-r1.ebuild | 6 ++++--
 app-emulation/wine/wine-1.7.14-r1.ebuild | 6 ++++--
 app-emulation/wine/wine-1.7.15-r1.ebuild | 6 ++++--
 app-emulation/wine/wine-1.7.16-r1.ebuild | 6 ++++--
 app-emulation/wine/wine-1.7.17-r1.ebuild | 6 ++++--
 app-emulation/wine/wine-1.7.18-r1.ebuild | 6 ++++--
 app-emulation/wine/wine-1.7.19-r2.ebuild | 6 ++++--
 app-emulation/wine/wine-1.7.20-r1.ebuild | 6 ++++--
 app-emulation/wine/wine-1.7.21-r1.ebuild | 6 ++++--
 app-emulation/wine/wine-1.7.22-r1.ebuild | 6 ++++--
 app-emulation/wine/wine-1.7.28-r1.ebuild | 6 ++++--
 app-emulation/wine/wine-1.7.29-r1.ebuild | 6 ++++--
 app-emulation/wine/wine-1.7.3-r1.ebuild  | 6 ++++--
 app-emulation/wine/wine-1.7.33-r1.ebuild | 6 ++++--
 app-emulation/wine/wine-1.7.34.ebuild    | 6 ++++--
 app-emulation/wine/wine-1.7.35.ebuild    | 6 ++++--
 app-emulation/wine/wine-1.7.36.ebuild    | 6 ++++--
 app-emulation/wine/wine-1.7.37.ebuild    | 6 ++++--
 app-emulation/wine/wine-1.7.38-r1.ebuild | 6 ++++--
 app-emulation/wine/wine-1.7.39-r1.ebuild | 6 ++++--
 app-emulation/wine/wine-1.7.4-r1.ebuild  | 6 ++++--
 app-emulation/wine/wine-1.7.40-r1.ebuild | 6 ++++--
 app-emulation/wine/wine-1.7.41.ebuild    | 6 ++++--
 app-emulation/wine/wine-1.7.42.ebuild    | 6 ++++--
 app-emulation/wine/wine-1.7.43.ebuild    | 6 ++++--
 app-emulation/wine/wine-1.7.44.ebuild    | 6 ++++--
 app-emulation/wine/wine-1.7.45.ebuild    | 9 +++++++++
 app-emulation/wine/wine-1.7.46.ebuild    | 6 ++++--
 app-emulation/wine/wine-1.7.47.ebuild    | 6 ++++--
 app-emulation/wine/wine-1.7.50.ebuild    | 6 ++++--
 app-emulation/wine/wine-1.7.8-r1.ebuild  | 6 ++++--
 app-emulation/wine/wine-1.7.9-r1.ebuild  | 6 ++++--
 app-emulation/wine/wine-9999.ebuild      | 6 ++++--
 38 files changed, 162 insertions(+), 72 deletions(-)

diff --git a/app-emulation/wine/wine-1.6.2-r1.ebuild 
b/app-emulation/wine/wine-1.6.2-r1.ebuild
index 2534935..9ba13a7 100644
--- a/app-emulation/wine/wine-1.6.2-r1.ebuild
+++ b/app-emulation/wine/wine-1.6.2-r1.ebuild
@@ -145,8 +145,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.6.2.ebuild 
b/app-emulation/wine/wine-1.6.2.ebuild
index 3e554f5..0deb2a3 100644
--- a/app-emulation/wine/wine-1.6.2.ebuild
+++ b/app-emulation/wine/wine-1.6.2.ebuild
@@ -173,6 +173,15 @@ usr/share/applications/wine-winecfg.desktop"
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       # bug #549768
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
+               eerror
+               return 1
+       fi
+
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + 
$(gcc-minor-version) )) -lt 404 ]]; then
                eerror "You need gcc-4.4+ to build 64-bit wine"
                eerror

diff --git a/app-emulation/wine/wine-1.7.10-r1.ebuild 
b/app-emulation/wine/wine-1.7.10-r1.ebuild
index 8ba3c78..2b90cd4 100644
--- a/app-emulation/wine/wine-1.7.10-r1.ebuild
+++ b/app-emulation/wine/wine-1.7.10-r1.ebuild
@@ -146,8 +146,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.11-r1.ebuild 
b/app-emulation/wine/wine-1.7.11-r1.ebuild
index 8ba3c78..2b90cd4 100644
--- a/app-emulation/wine/wine-1.7.11-r1.ebuild
+++ b/app-emulation/wine/wine-1.7.11-r1.ebuild
@@ -146,8 +146,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.12-r1.ebuild 
b/app-emulation/wine/wine-1.7.12-r1.ebuild
index 8f14487..23dbb34 100644
--- a/app-emulation/wine/wine-1.7.12-r1.ebuild
+++ b/app-emulation/wine/wine-1.7.12-r1.ebuild
@@ -146,8 +146,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.13-r1.ebuild 
b/app-emulation/wine/wine-1.7.13-r1.ebuild
index 8f14487..23dbb34 100644
--- a/app-emulation/wine/wine-1.7.13-r1.ebuild
+++ b/app-emulation/wine/wine-1.7.13-r1.ebuild
@@ -146,8 +146,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.14-r1.ebuild 
b/app-emulation/wine/wine-1.7.14-r1.ebuild
index 8f14487..23dbb34 100644
--- a/app-emulation/wine/wine-1.7.14-r1.ebuild
+++ b/app-emulation/wine/wine-1.7.14-r1.ebuild
@@ -146,8 +146,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.15-r1.ebuild 
b/app-emulation/wine/wine-1.7.15-r1.ebuild
index 8f14487..23dbb34 100644
--- a/app-emulation/wine/wine-1.7.15-r1.ebuild
+++ b/app-emulation/wine/wine-1.7.15-r1.ebuild
@@ -146,8 +146,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.16-r1.ebuild 
b/app-emulation/wine/wine-1.7.16-r1.ebuild
index 8f14487..23dbb34 100644
--- a/app-emulation/wine/wine-1.7.16-r1.ebuild
+++ b/app-emulation/wine/wine-1.7.16-r1.ebuild
@@ -146,8 +146,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.17-r1.ebuild 
b/app-emulation/wine/wine-1.7.17-r1.ebuild
index 8f14487..23dbb34 100644
--- a/app-emulation/wine/wine-1.7.17-r1.ebuild
+++ b/app-emulation/wine/wine-1.7.17-r1.ebuild
@@ -146,8 +146,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.18-r1.ebuild 
b/app-emulation/wine/wine-1.7.18-r1.ebuild
index 8f14487..23dbb34 100644
--- a/app-emulation/wine/wine-1.7.18-r1.ebuild
+++ b/app-emulation/wine/wine-1.7.18-r1.ebuild
@@ -146,8 +146,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.19-r2.ebuild 
b/app-emulation/wine/wine-1.7.19-r2.ebuild
index 3cd7518..c4fa942 100644
--- a/app-emulation/wine/wine-1.7.19-r2.ebuild
+++ b/app-emulation/wine/wine-1.7.19-r2.ebuild
@@ -159,8 +159,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.20-r1.ebuild 
b/app-emulation/wine/wine-1.7.20-r1.ebuild
index 3a7937d..faab672 100644
--- a/app-emulation/wine/wine-1.7.20-r1.ebuild
+++ b/app-emulation/wine/wine-1.7.20-r1.ebuild
@@ -161,8 +161,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.21-r1.ebuild 
b/app-emulation/wine/wine-1.7.21-r1.ebuild
index cf6c955..6c288da 100644
--- a/app-emulation/wine/wine-1.7.21-r1.ebuild
+++ b/app-emulation/wine/wine-1.7.21-r1.ebuild
@@ -161,8 +161,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.22-r1.ebuild 
b/app-emulation/wine/wine-1.7.22-r1.ebuild
index cf6c955..6c288da 100644
--- a/app-emulation/wine/wine-1.7.22-r1.ebuild
+++ b/app-emulation/wine/wine-1.7.22-r1.ebuild
@@ -161,8 +161,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.28-r1.ebuild 
b/app-emulation/wine/wine-1.7.28-r1.ebuild
index af9de82..9ba7ab1 100644
--- a/app-emulation/wine/wine-1.7.28-r1.ebuild
+++ b/app-emulation/wine/wine-1.7.28-r1.ebuild
@@ -161,8 +161,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.29-r1.ebuild 
b/app-emulation/wine/wine-1.7.29-r1.ebuild
index af9de82..9ba7ab1 100644
--- a/app-emulation/wine/wine-1.7.29-r1.ebuild
+++ b/app-emulation/wine/wine-1.7.29-r1.ebuild
@@ -161,8 +161,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.3-r1.ebuild 
b/app-emulation/wine/wine-1.7.3-r1.ebuild
index d76d1c6..355136d 100644
--- a/app-emulation/wine/wine-1.7.3-r1.ebuild
+++ b/app-emulation/wine/wine-1.7.3-r1.ebuild
@@ -145,8 +145,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.33-r1.ebuild 
b/app-emulation/wine/wine-1.7.33-r1.ebuild
index 2b995ea..3d4fb39 100644
--- a/app-emulation/wine/wine-1.7.33-r1.ebuild
+++ b/app-emulation/wine/wine-1.7.33-r1.ebuild
@@ -163,8 +163,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.34.ebuild 
b/app-emulation/wine/wine-1.7.34.ebuild
index d2d3d5c..274c72f 100644
--- a/app-emulation/wine/wine-1.7.34.ebuild
+++ b/app-emulation/wine/wine-1.7.34.ebuild
@@ -163,8 +163,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.35.ebuild 
b/app-emulation/wine/wine-1.7.35.ebuild
index b403d11..1f3d4d5 100644
--- a/app-emulation/wine/wine-1.7.35.ebuild
+++ b/app-emulation/wine/wine-1.7.35.ebuild
@@ -163,8 +163,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.36.ebuild 
b/app-emulation/wine/wine-1.7.36.ebuild
index aba14f5..ca3cc7f 100644
--- a/app-emulation/wine/wine-1.7.36.ebuild
+++ b/app-emulation/wine/wine-1.7.36.ebuild
@@ -162,8 +162,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.37.ebuild 
b/app-emulation/wine/wine-1.7.37.ebuild
index 51022bb..ccc7bba 100644
--- a/app-emulation/wine/wine-1.7.37.ebuild
+++ b/app-emulation/wine/wine-1.7.37.ebuild
@@ -165,8 +165,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.38-r1.ebuild 
b/app-emulation/wine/wine-1.7.38-r1.ebuild
index 6f742e8..2f45dc3 100644
--- a/app-emulation/wine/wine-1.7.38-r1.ebuild
+++ b/app-emulation/wine/wine-1.7.38-r1.ebuild
@@ -165,8 +165,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.39-r1.ebuild 
b/app-emulation/wine/wine-1.7.39-r1.ebuild
index 43f7f49..b8e596c 100644
--- a/app-emulation/wine/wine-1.7.39-r1.ebuild
+++ b/app-emulation/wine/wine-1.7.39-r1.ebuild
@@ -165,8 +165,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.4-r1.ebuild 
b/app-emulation/wine/wine-1.7.4-r1.ebuild
index 2ebc7b8..5566fa8 100644
--- a/app-emulation/wine/wine-1.7.4-r1.ebuild
+++ b/app-emulation/wine/wine-1.7.4-r1.ebuild
@@ -145,8 +145,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.40-r1.ebuild 
b/app-emulation/wine/wine-1.7.40-r1.ebuild
index 43f7f49..b8e596c 100644
--- a/app-emulation/wine/wine-1.7.40-r1.ebuild
+++ b/app-emulation/wine/wine-1.7.40-r1.ebuild
@@ -165,8 +165,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.41.ebuild 
b/app-emulation/wine/wine-1.7.41.ebuild
index 43f7f49..b8e596c 100644
--- a/app-emulation/wine/wine-1.7.41.ebuild
+++ b/app-emulation/wine/wine-1.7.41.ebuild
@@ -165,8 +165,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.42.ebuild 
b/app-emulation/wine/wine-1.7.42.ebuild
index 43f7f49..b8e596c 100644
--- a/app-emulation/wine/wine-1.7.42.ebuild
+++ b/app-emulation/wine/wine-1.7.42.ebuild
@@ -165,8 +165,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.43.ebuild 
b/app-emulation/wine/wine-1.7.43.ebuild
index 43f7f49..b8e596c 100644
--- a/app-emulation/wine/wine-1.7.43.ebuild
+++ b/app-emulation/wine/wine-1.7.43.ebuild
@@ -165,8 +165,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.44.ebuild 
b/app-emulation/wine/wine-1.7.44.ebuild
index 43f7f49..b8e596c 100644
--- a/app-emulation/wine/wine-1.7.44.ebuild
+++ b/app-emulation/wine/wine-1.7.44.ebuild
@@ -165,8 +165,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.45.ebuild 
b/app-emulation/wine/wine-1.7.45.ebuild
index b297c85..cce623f 100644
--- a/app-emulation/wine/wine-1.7.45.ebuild
+++ b/app-emulation/wine/wine-1.7.45.ebuild
@@ -164,6 +164,15 @@ usr/share/applications/wine-winecfg.desktop"
 wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
+       # bug #549768
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
+               eerror
+               return 1
+       fi
+
        if use abi_x86_64 && [[ $(( $(gcc-major-version) * 100 + 
$(gcc-minor-version) )) -lt 404 ]]; then
                eerror "You need gcc-4.4+ to build 64-bit wine"
                eerror

diff --git a/app-emulation/wine/wine-1.7.46.ebuild 
b/app-emulation/wine/wine-1.7.46.ebuild
index 43f7f49..b8e596c 100644
--- a/app-emulation/wine/wine-1.7.46.ebuild
+++ b/app-emulation/wine/wine-1.7.46.ebuild
@@ -165,8 +165,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.47.ebuild 
b/app-emulation/wine/wine-1.7.47.ebuild
index f2093eb..6f861f8 100644
--- a/app-emulation/wine/wine-1.7.47.ebuild
+++ b/app-emulation/wine/wine-1.7.47.ebuild
@@ -165,8 +165,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.50.ebuild 
b/app-emulation/wine/wine-1.7.50.ebuild
index c344150..12cfb04 100644
--- a/app-emulation/wine/wine-1.7.50.ebuild
+++ b/app-emulation/wine/wine-1.7.50.ebuild
@@ -166,8 +166,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.8-r1.ebuild 
b/app-emulation/wine/wine-1.7.8-r1.ebuild
index 905985c..49d1850 100644
--- a/app-emulation/wine/wine-1.7.8-r1.ebuild
+++ b/app-emulation/wine/wine-1.7.8-r1.ebuild
@@ -146,8 +146,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-1.7.9-r1.ebuild 
b/app-emulation/wine/wine-1.7.9-r1.ebuild
index 905985c..49d1850 100644
--- a/app-emulation/wine/wine-1.7.9-r1.ebuild
+++ b/app-emulation/wine/wine-1.7.9-r1.ebuild
@@ -146,8 +146,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

diff --git a/app-emulation/wine/wine-9999.ebuild 
b/app-emulation/wine/wine-9999.ebuild
index c344150..12cfb04 100644
--- a/app-emulation/wine/wine-9999.ebuild
+++ b/app-emulation/wine/wine-9999.ebuild
@@ -166,8 +166,10 @@ wine_build_environment_check() {
        [[ ${MERGE_TYPE} = "binary" ]] && return 0
 
        # bug #549768
-       if [[ $(gcc-major-version) = 5 ]]; then
-               eerror "You need gcc-4.x to build wine; see 
https://bugs.gentoo.org/549768";
+       if use abi_x86_64 && [[ $(gcc-major-version) = 5 ]]; then
+               eerror "64-bit wine cannot be built with gcc-5.1 or 5.2 due to 
compiler bugs;"
+               eerror "you may use gcc-config to select an older compiler 
version."
+               eerror "See https://bugs.gentoo.org/549768";
                eerror
                return 1
        fi

Reply via email to