1 |
commit: 2d51c6ab80708422dddd6ba7773f48e601c47238 |
2 |
Author: Huang Rui <vowstar <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Oct 20 03:48:09 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 1 17:27:06 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d51c6ab |
7 |
|
8 |
media-libs/codec2: fix freedv_callback_rx_sym typedef |
9 |
|
10 |
Fix net-wireless/gnuradio (USE=vocoder) |
11 |
Patch from https://github.com/drowe67/codec2/pull/235 |
12 |
Backport to codec2-1.0.1 |
13 |
|
14 |
Closes: https://bugs.gentoo.org/822966 |
15 |
Closes: https://bugs.gentoo.org/816453 |
16 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
17 |
Signed-off-by: Huang Rui <vowstar <AT> gmail.com> |
18 |
Closes: https://github.com/gentoo/gentoo/pull/22639 |
19 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
20 |
|
21 |
...{codec2-1.0.1.ebuild => codec2-1.0.1-r1.ebuild} | 3 +- |
22 |
.../files/codec2-1.0.1-fix-freedv-callback.patch | 48 ++++++++++++++++++++++ |
23 |
2 files changed, 50 insertions(+), 1 deletion(-) |
24 |
|
25 |
diff --git a/media-libs/codec2/codec2-1.0.1.ebuild b/media-libs/codec2/codec2-1.0.1-r1.ebuild |
26 |
similarity index 92% |
27 |
rename from media-libs/codec2/codec2-1.0.1.ebuild |
28 |
rename to media-libs/codec2/codec2-1.0.1-r1.ebuild |
29 |
index 6c5ac1bb8b37..07461c984992 100644 |
30 |
--- a/media-libs/codec2/codec2-1.0.1.ebuild |
31 |
+++ b/media-libs/codec2/codec2-1.0.1-r1.ebuild |
32 |
@@ -1,7 +1,7 @@ |
33 |
# Copyright 1999-2021 Gentoo Authors |
34 |
# Distributed under the terms of the GNU General Public License v2 |
35 |
|
36 |
-EAPI=7 |
37 |
+EAPI=8 |
38 |
|
39 |
CMAKE_ECLASS=cmake |
40 |
inherit cmake-multilib |
41 |
@@ -19,6 +19,7 @@ RESTRICT="test" |
42 |
|
43 |
PATCHES=( |
44 |
"${FILESDIR}/codec2-1.0.1-static-rx_filter_coh.patch" |
45 |
+ "${FILESDIR}/${P}-fix-freedv-callback.patch" # Bug 816453 |
46 |
) |
47 |
|
48 |
multilib_src_configure() { |
49 |
|
50 |
diff --git a/media-libs/codec2/files/codec2-1.0.1-fix-freedv-callback.patch b/media-libs/codec2/files/codec2-1.0.1-fix-freedv-callback.patch |
51 |
new file mode 100644 |
52 |
index 000000000000..595e71a139dc |
53 |
--- /dev/null |
54 |
+++ b/media-libs/codec2/files/codec2-1.0.1-fix-freedv-callback.patch |
55 |
@@ -0,0 +1,48 @@ |
56 |
+From 7a554bad2f28a4cf19cddf43c619fe5921ddaea3 Mon Sep 17 00:00:00 2001 |
57 |
+From: drowe67 <david@×××××××.com> |
58 |
+Date: Sat, 2 Oct 2021 15:48:09 +0930 |
59 |
+Subject: [PATCH] moved freedv_callback_rx_sym typedef and function into |
60 |
+ freedv_api_internal.h |
61 |
+ |
62 |
+Project-Bug-URL: https://github.com/drowe67/codec2/pull/235 |
63 |
+Gentoo-Bug-URL: https://bugs.gentoo.org/816453 |
64 |
+--- |
65 |
+ src/freedv_api.h | 2 -- |
66 |
+ src/freedv_api_internal.h | 4 ++++ |
67 |
+ 2 files changed, 4 insertions(+), 2 deletions(-) |
68 |
+ |
69 |
+diff --git a/src/freedv_api.h b/src/freedv_api.h |
70 |
+index 23c5fef8..9393bd80 100644 |
71 |
+--- a/src/freedv_api.h |
72 |
++++ b/src/freedv_api.h |
73 |
+@@ -145,7 +145,6 @@ struct freedv_advanced { |
74 |
+ |
75 |
+ // Called when text message char is decoded |
76 |
+ typedef void (*freedv_callback_rx)(void *, char); |
77 |
+-typedef void (*freedv_callback_rx_sym)(void *, _Complex float, float); |
78 |
+ // Called when new text message char is needed |
79 |
+ typedef char (*freedv_callback_tx)(void *); |
80 |
+ typedef void (*freedv_calback_error_pattern) |
81 |
+@@ -212,7 +211,6 @@ int freedv_check_crc16_unpacked(unsigned char *unpacked_bits, int nbits); |
82 |
+ // Set parameters ------------------------------------------------------------ |
83 |
+ |
84 |
+ void freedv_set_callback_txt (struct freedv *freedv, freedv_callback_rx rx, freedv_callback_tx tx, void *callback_state); |
85 |
+-void freedv_set_callback_txt_sym (struct freedv *freedv, freedv_callback_rx_sym rx, void *callback_state); |
86 |
+ void freedv_set_callback_protocol (struct freedv *freedv, freedv_callback_protorx rx, freedv_callback_prototx tx, void *callback_state); |
87 |
+ void freedv_set_callback_data (struct freedv *freedv, freedv_callback_datarx datarx, freedv_callback_datatx datatx, void *callback_state); |
88 |
+ void freedv_set_test_frames (struct freedv *freedv, int test_frames); |
89 |
+diff --git a/src/freedv_api_internal.h b/src/freedv_api_internal.h |
90 |
+index 0197e184..e7a9526c 100644 |
91 |
+--- a/src/freedv_api_internal.h |
92 |
++++ b/src/freedv_api_internal.h |
93 |
+@@ -230,6 +230,10 @@ int freedv_rx_fsk_ldpc_data(struct freedv *f, COMP demod_in[]); |
94 |
+ |
95 |
+ int freedv_bits_to_speech(struct freedv *f, short speech_out[], short demod_in[], int rx_status); |
96 |
+ |
97 |
++// for the reliable text protocol we need to pass symbols back rather than text |
98 |
++typedef void (*freedv_callback_rx_sym)(void *, _Complex float, float); |
99 |
++void freedv_set_callback_txt_sym (struct freedv *freedv, freedv_callback_rx_sym rx, void *callback_state); |
100 |
++ |
101 |
+ #ifdef __cplusplus |
102 |
+ } |
103 |
+ #endif |