commit:     4551df6ec5cae19486cb63698e294a3f62015600
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 24 01:13:55 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jun 24 01:15:21 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4551df6e

dev-libs/nettle: disable altivec for <P7

Thanks to awilfox for the help with ppc cpp.

Closes: https://bugs.gentoo.org/920234
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/nettle/{nettle-3.9.ebuild => nettle-3.9-r1.ebuild}     | 9 ++++++++-
 dev-libs/nettle/{nettle-3.9.1.ebuild => nettle-3.9.1-r1.ebuild} | 9 ++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/dev-libs/nettle/nettle-3.9.ebuild 
b/dev-libs/nettle/nettle-3.9-r1.ebuild
similarity index 87%
rename from dev-libs/nettle/nettle-3.9.ebuild
rename to dev-libs/nettle/nettle-3.9-r1.ebuild
index 2d307d66cb40..5d30e5ae404d 100644
--- a/dev-libs/nettle/nettle-3.9.ebuild
+++ b/dev-libs/nettle/nettle-3.9-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -85,5 +85,12 @@ multilib_src_configure() {
                --disable-openssl
        )
 
+       # https://git.lysator.liu.se/nettle/nettle/-/issues/7
+       if use cpu_flags_ppc_altivec && ! tc-cpp-is-true "defined(__VSX__) && 
__VSX__ == 1" "${CPPFLAGS}" "${CFLAGS}" ; then
+               ewarn "cpu_flags_ppc_altivec is enabled, but nettle's asm 
requires >=P7."
+               ewarn "Disabling, sorry! See bug #920234."
+               myeconfargs+=( --disable-power-altivec )
+       fi
+
        ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
 }

diff --git a/dev-libs/nettle/nettle-3.9.1.ebuild 
b/dev-libs/nettle/nettle-3.9.1-r1.ebuild
similarity index 87%
rename from dev-libs/nettle/nettle-3.9.1.ebuild
rename to dev-libs/nettle/nettle-3.9.1-r1.ebuild
index f2e77b0432af..5f20798db8f1 100644
--- a/dev-libs/nettle/nettle-3.9.1.ebuild
+++ b/dev-libs/nettle/nettle-3.9.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -83,5 +83,12 @@ multilib_src_configure() {
                --disable-openssl
        )
 
+       # https://git.lysator.liu.se/nettle/nettle/-/issues/7
+       if use cpu_flags_ppc_altivec && ! tc-cpp-is-true "defined(__VSX__) && 
__VSX__ == 1" "${CPPFLAGS}" "${CFLAGS}" ; then
+               ewarn "cpu_flags_ppc_altivec is enabled, but nettle's asm 
requires >=P7."
+               ewarn "Disabling, sorry! See bug #920234."
+               myeconfargs+=( --disable-power-altivec )
+       fi
+
        ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
 }

Reply via email to