Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/codec2/, media-libs/codec2/files/
Date: Mon, 07 Feb 2022 04:33:58
Message-Id: 1644208417.350cf9e5ff41a6a589a8ed40b69154eed7adbed7.sam@gentoo
1 commit: 350cf9e5ff41a6a589a8ed40b69154eed7adbed7
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 7 04:32:24 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 7 04:33:37 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=350cf9e5
7
8 media-libs/codec2: add upstream -Os patch
9
10 Bug: https://bugs.gentoo.org/817437
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 media-libs/codec2/codec2-1.0.3.ebuild | 9 +++++----
14 .../codec2/files/codec2-1.0.3-fix-build-with-Os.patch | 19 +++++++++++++++++++
15 2 files changed, 24 insertions(+), 4 deletions(-)
16
17 diff --git a/media-libs/codec2/codec2-1.0.3.ebuild b/media-libs/codec2/codec2-1.0.3.ebuild
18 index 3f50389d58e9..e9d3f48e1237 100644
19 --- a/media-libs/codec2/codec2-1.0.3.ebuild
20 +++ b/media-libs/codec2/codec2-1.0.3.ebuild
21 @@ -4,7 +4,7 @@
22 EAPI=8
23
24 CMAKE_ECLASS=cmake
25 -inherit cmake-multilib flag-o-matic
26 +inherit cmake-multilib
27
28 MY_PV="${PV%.*}${PV##*.}"
29 DESCRIPTION="Low bit rate speech codec"
30 @@ -24,10 +24,11 @@ RESTRICT="test"
31
32 #BDEPEND="test? ( sci-mathematics/octave )"
33
34 -multilib_src_configure() {
35 - # bug #817437
36 - replace-flags -Os -O2
37 +PATCHES=(
38 + "${FILESDIR}"/${P}-fix-build-with-Os.patch
39 +)
40
41 +multilib_src_configure() {
42 local mycmakeargs=(
43 -DUNITTEST=$(usex test)
44 -DINSTALL_EXAMPLES=$(usex examples)
45
46 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
47 new file mode 100644
48 index 000000000000..4f3f30661421
49 --- /dev/null
50 +++ b/media-libs/codec2/files/codec2-1.0.3-fix-build-with-Os.patch
51 @@ -0,0 +1,19 @@
52 +https://github.com/drowe67/codec2/commit/a8d4226859548ceb050619160af562e0b43bb05c
53 +https://github.com/drowe67/codec2/issues/293#issuecomment-1025665342
54 +
55 +From: drowe67 <david@×××××××.com>
56 +Date: Tue, 1 Feb 2022 07:20:50 +1030
57 +Subject: [PATCH] change required to build with -Os
58 +
59 +--- a/src/cohpsk.c
60 ++++ b/src/cohpsk.c
61 +@@ -816,7 +816,7 @@ typedef float float4 __attribute__ ((vector_size (16)));
62 +
63 + \*---------------------------------------------------------------------------*/
64 +
65 +-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)
66 ++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)
67 + {
68 + int c,i,j,k,l;
69 + int n=COHPSK_M/P;
70 +