commit:     ffae1305e0a3fb9720cae5936b42e237db7c0fbb
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 13 18:50:18 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Feb 13 18:50:18 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ffae1305

sci-libs/fftw: Sync live ebuild

Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sci-libs/fftw/fftw-9999.ebuild | 35 ++++++++---------------------------
 1 file changed, 8 insertions(+), 27 deletions(-)

diff --git a/sci-libs/fftw/fftw-9999.ebuild b/sci-libs/fftw/fftw-9999.ebuild
index b0c692bdeac..23c52fd7f3d 100644
--- a/sci-libs/fftw/fftw-9999.ebuild
+++ b/sci-libs/fftw/fftw-9999.ebuild
@@ -22,14 +22,13 @@ fi
 
 LICENSE="GPL-2+"
 SLOT="3.0/3"
-IUSE="cpu_flags_arm_neon cpu_flags_ppc_altivec cpu_flags_x86_avx 
cpu_flags_x86_avx2 cpu_flags_x86_fma3 cpu_flags_x86_fma4 cpu_flags_x86_sse 
cpu_flags_x86_sse2 doc fortran mpi openmp quad test threads zbus"
+IUSE="cpu_flags_arm_neon cpu_flags_ppc_altivec cpu_flags_x86_avx 
cpu_flags_x86_avx2 cpu_flags_x86_fma3 cpu_flags_x86_fma4 cpu_flags_x86_sse 
cpu_flags_x86_sse2 doc fortran mpi openmp test threads zbus"
 RESTRICT="!test? ( test )"
 
 RDEPEND="
        mpi? ( >=virtual/mpi-2.0-r4[${MULTILIB_USEDEP}] )"
 DEPEND="${RDEPEND}"
 BDEPEND="
-       quad? ( sys-devel/gcc[fortran] )
        test? ( dev-lang/perl )"
 
 S="${WORKDIR}/${MY_P}"
@@ -46,15 +45,7 @@ pkg_setup() {
        fi
 
        fortran-2_pkg_setup
-
        MULTIBUILD_VARIANTS=( single double longdouble )
-       if use quad; then
-               if ! tc-is-gcc; then
-                       ewarn "quad precision only available for gcc >= 4.6"
-                       die "need quad precision capable gcc"
-               fi
-               MULTIBUILD_VARIANTS+=( quad )
-       fi
 }
 
 src_prepare() {
@@ -65,16 +56,6 @@ src_prepare() {
 }
 
 multilib_src_configure() {
-       # jlec reported USE=quad on abi_x86_32 has too few registers
-       # stub Makefiles
-       if [[ ${MULTILIB_ABI_FLAG} == abi_x86_32 && ${MULTIBUILD_ID} == quad-* 
]]; then
-               mkdir -p "${BUILD_DIR}/tests" || die
-               echo "all: ;" > "${BUILD_DIR}/Makefile" || die
-               echo "install: ;" >> "${BUILD_DIR}/Makefile" || die
-               echo "smallcheck: ;" > "${BUILD_DIR}/tests/Makefile" || die
-               return 0
-       fi
-
        local myconf=(
                --enable-shared
                --disable-static
@@ -86,6 +67,9 @@ multilib_src_configure() {
        )
        [[ ${PV} == *9999 ]] && myconf+=( --enable-maintainer-mode )
 
+       # --enable-quad-precision is a brittle feature that requires
+       # __float128 support from the toolchain, which is lacking on
+       # most niche architectures. Bug #770346
        case "${MULTIBUILD_ID}" in
                single-*)
                        # altivec, sse, single-paired only work for single
@@ -117,13 +101,6 @@ multilib_src_configure() {
                        )
                        ;;
 
-               quad-*)
-                       # quad does not support mpi
-                       myconf+=(
-                               --enable-quad-precision
-                       )
-                       ;;
-
                *)
                        die "${MULTIBUILD_ID%-*} precision not implemented in 
this ebuild"
                        ;;
@@ -133,6 +110,10 @@ multilib_src_configure() {
 }
 
 src_configure() {
+       # upstream does not append proper -m flags
+       # https://bugs.gentoo.org/698572
+       use cpu_flags_x86_avx2 && append-flags -mavx2
+
        multibuild_foreach_variant multilib-minimal_src_configure
 }
 

Reply via email to