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

Closes: https://bugs.gentoo.org/920262
Signed-off-by: Alexander Tsoy <alexander@tsoy.me>
Closes: https://github.com/gentoo/gentoo/pull/34341
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
This commit is contained in:
Alexander Tsoy
2024-01-31 15:10:34 +02:00
committed by Joonas Niilola
parent d8b7c10e20
commit 7e7deaf82d
@@ -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