commit:     567cb9242b182006a4b80f9266e3641f422472f0
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Sat May 11 06:41:45 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat May 11 06:44:32 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=567cb924

go-env.eclass: temporary EAPI guard for EAPI-6

 - there are still a handful of EAPI-6 ebuilds which don't support BDEPENDs.
   While the has_version check is imperfect without -b switch, this is better
   than nothing. I assume gcc[debug] isn't be that widely used either.

Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 eclass/go-env.eclass | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/eclass/go-env.eclass b/eclass/go-env.eclass
index e0987ec7dee7..1a2c9787a146 100644
--- a/eclass/go-env.eclass
+++ b/eclass/go-env.eclass
@@ -34,7 +34,14 @@ go-env_set_compile_environment() {
        use x86 && export GO386=$(go-env_go386)
 
        # XXX: Hack for checking ICE (bug #912152, gcc PR113204)
-       has_version -b "sys-devel/gcc[debug]" && filter-lto
+       case ${EAPI} in
+               6)
+                       has_version "sys-devel/gcc[debug]" && filter-lto
+                       ;;
+               *)
+                       has_version -b "sys-devel/gcc[debug]" && filter-lto
+                       ;;
+       esac
 
        export CGO_CFLAGS="${CGO_CFLAGS:-$CFLAGS}"
        export CGO_CPPFLAGS="${CGO_CPPFLAGS:-$CPPFLAGS}"

Reply via email to