summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-02-07 04:32:24 +0000
committerSam James <sam@gentoo.org>2022-02-07 04:33:37 +0000
commit350cf9e5ff41a6a589a8ed40b69154eed7adbed7 (patch)
tree814f972eae0e7a835b3f8ed530d4fc030a2fcec6 /media-libs/codec2
parentgames-strategy/0ad: fix build with newer setuptools (diff)
downloadgentoo-350cf9e5ff41a6a589a8ed40b69154eed7adbed7.tar.gz
gentoo-350cf9e5ff41a6a589a8ed40b69154eed7adbed7.tar.bz2
gentoo-350cf9e5ff41a6a589a8ed40b69154eed7adbed7.zip
media-libs/codec2: add upstream -Os patch
Bug: https://bugs.gentoo.org/817437 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-libs/codec2')
-rw-r--r--media-libs/codec2/codec2-1.0.3.ebuild9
-rw-r--r--media-libs/codec2/files/codec2-1.0.3-fix-build-with-Os.patch19
2 files changed, 24 insertions, 4 deletions
diff --git a/media-libs/codec2/codec2-1.0.3.ebuild b/media-libs/codec2/codec2-1.0.3.ebuild
index 3f50389d58e9..e9d3f48e1237 100644
--- a/media-libs/codec2/codec2-1.0.3.ebuild
+++ b/media-libs/codec2/codec2-1.0.3.ebuild
@@ -4,7 +4,7 @@
EAPI=8
CMAKE_ECLASS=cmake
-inherit cmake-multilib flag-o-matic
+inherit cmake-multilib
MY_PV="${PV%.*}${PV##*.}"
DESCRIPTION="Low bit rate speech codec"
@@ -24,10 +24,11 @@ RESTRICT="test"
#BDEPEND="test? ( sci-mathematics/octave )"
-multilib_src_configure() {
- # bug #817437
- replace-flags -Os -O2
+PATCHES=(
+ "${FILESDIR}"/${P}-fix-build-with-Os.patch
+)
+multilib_src_configure() {
local mycmakeargs=(
-DUNITTEST=$(usex test)
-DINSTALL_EXAMPLES=$(usex examples)
diff --git a/media-libs/codec2/files/codec2-1.0.3-fix-build-with-Os.patch b/media-libs/codec2/files/codec2-1.0.3-fix-build-with-Os.patch
new file mode 100644
index 000000000000..4f3f30661421
--- /dev/null
+++ b/media-libs/codec2/files/codec2-1.0.3-fix-build-with-Os.patch
@@ -0,0 +1,19 @@
+https://github.com/drowe67/codec2/commit/a8d4226859548ceb050619160af562e0b43bb05c
+https://github.com/drowe67/codec2/issues/293#issuecomment-1025665342
+
+From: drowe67 <david@rowetel.com>
+Date: Tue, 1 Feb 2022 07:20:50 +1030
+Subject: [PATCH] change required to build with -Os
+
+--- a/src/cohpsk.c
++++ b/src/cohpsk.c
+@@ -816,7 +816,7 @@ typedef float float4 __attribute__ ((vector_size (16)));
+
+ \*---------------------------------------------------------------------------*/
+
+-inline void rx_filter_coh(COMP rx_filt[COHPSK_NC*COHPSK_ND][P+1], int Nc, COMP rx_baseband[COHPSK_NC*COHPSK_ND][COHPSK_M+COHPSK_M/P], COMP rx_filter_memory[COHPSK_NC*COHPSK_ND][COHPSK_NFILTER], int nin)
++inline extern void rx_filter_coh(COMP rx_filt[COHPSK_NC*COHPSK_ND][P+1], int Nc, COMP rx_baseband[COHPSK_NC*COHPSK_ND][COHPSK_M+COHPSK_M/P], COMP rx_filter_memory[COHPSK_NC*COHPSK_ND][COHPSK_NFILTER], int nin)
+ {
+ int c,i,j,k,l;
+ int n=COHPSK_M/P;
+