From 5bdff1dfb5cdf6d3c34be3108c514cbdd00eb2e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20S=C5=82omi=C5=84ski?= Date: Thu, 28 Mar 2024 04:50:11 +0100 Subject: [PATCH] media-libs/noise-suppression-for-voice: Fix build with Clang MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://bugs.gentoo.org/925672 Signed-off-by: Kacper Słomiński Closes: https://github.com/gentoo/gentoo/pull/35957 Signed-off-by: Sam James --- .../noise-suppression-for-voice-1.03.ebuild | 11 ++++++++++- .../noise-suppression-for-voice-9999.ebuild | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/media-libs/noise-suppression-for-voice/noise-suppression-for-voice-1.03.ebuild b/media-libs/noise-suppression-for-voice/noise-suppression-for-voice-1.03.ebuild index 78ff0308a9d33..0fd3b8452a21a 100644 --- a/media-libs/noise-suppression-for-voice/noise-suppression-for-voice-1.03.ebuild +++ b/media-libs/noise-suppression-for-voice/noise-suppression-for-voice-1.03.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit cmake +inherit cmake flag-o-matic DESCRIPTION="A real-time noise suppression plugin for voice" HOMEPAGE="https://github.com/werman/noise-suppression-for-voice" @@ -44,6 +44,15 @@ DEPEND=" RDEPEND="${DEPEND}" src_configure() { + # Bug #925672 + # append-atomic-flags does not work for us in this case, as it can + # only test for single integers of given sizes, meanwhile + # noise-suppression-for-voice does std::atomic, where + # RnNoiseStats is a struct with 4 uint32_t members. + if test-flags-CCLD "-latomic" &>/dev/null; then + append-flags -Wl,--push-state,--as-needed,-latomic,--pop-state + fi + local mycmakeargs=( -DBUILD_LADSPA_PLUGIN=$(usex ladspa ON OFF) -DBUILD_LV2_PLUGIN=$(usex lv2 ON OFF) diff --git a/media-libs/noise-suppression-for-voice/noise-suppression-for-voice-9999.ebuild b/media-libs/noise-suppression-for-voice/noise-suppression-for-voice-9999.ebuild index 78ff0308a9d33..0fd3b8452a21a 100644 --- a/media-libs/noise-suppression-for-voice/noise-suppression-for-voice-9999.ebuild +++ b/media-libs/noise-suppression-for-voice/noise-suppression-for-voice-9999.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit cmake +inherit cmake flag-o-matic DESCRIPTION="A real-time noise suppression plugin for voice" HOMEPAGE="https://github.com/werman/noise-suppression-for-voice" @@ -44,6 +44,15 @@ DEPEND=" RDEPEND="${DEPEND}" src_configure() { + # Bug #925672 + # append-atomic-flags does not work for us in this case, as it can + # only test for single integers of given sizes, meanwhile + # noise-suppression-for-voice does std::atomic, where + # RnNoiseStats is a struct with 4 uint32_t members. + if test-flags-CCLD "-latomic" &>/dev/null; then + append-flags -Wl,--push-state,--as-needed,-latomic,--pop-state + fi + local mycmakeargs=( -DBUILD_LADSPA_PLUGIN=$(usex ladspa ON OFF) -DBUILD_LV2_PLUGIN=$(usex lv2 ON OFF)