commit:     7e7deaf82dd94cbce99e1afd93cda54013b5393b
Author:     Alexander Tsoy <alexander <AT> tsoy <DOT> me>
AuthorDate: Tue Dec 19 15:00:57 2023 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Wed Jan 31 13:10:34 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e7deaf8

media-libs/zita-resampler: backport SSE2 checks to 1.10.1

Closes: https://bugs.gentoo.org/920262
Signed-off-by: Alexander Tsoy <alexander <AT> tsoy.me>
Closes: https://github.com/gentoo/gentoo/pull/34341
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 media-libs/zita-resampler/zita-resampler-1.10.1.ebuild | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/media-libs/zita-resampler/zita-resampler-1.10.1.ebuild 
b/media-libs/zita-resampler/zita-resampler-1.10.1.ebuild
index 2e8977814e6c..7e35d5a6f7bb 100644
--- a/media-libs/zita-resampler/zita-resampler-1.10.1.ebuild
+++ b/media-libs/zita-resampler/zita-resampler-1.10.1.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
@@ -16,7 +16,6 @@ IUSE="cpu_flags_x86_sse2 tools"
 
 RDEPEND="tools? ( media-libs/libsndfile )"
 DEPEND="${RDEPEND}"
-BDEPEND=""
 
 HTML_DOCS="docs/."
 
@@ -24,8 +23,14 @@ PATCHES=( "${FILESDIR}"/${PN}-1.10.1-makefile.patch )
 
 src_compile() {
        tc-export CXX
+       # Code paths that uses intrinsics are not properly guarded by symbol 
checks
        if use cpu_flags_x86_sse2 ; then
-               append-cppflags "-DENABLE_SSE2"
+               if tc-cpp-is-true "defined(__SSE2__)" ${CFLAGS} ${CXXFLAGS} ; 
then
+                       append-cppflags "-DENABLE_SSE2"
+               else
+                       ewarn "SSE2 support has been disabled automatically 
because the"
+                       ewarn "compiler does not support corresponding 
intrinsics"
+               fi
        fi
 
        emake -C source

Reply via email to