1 |
commit: 1c407b27db37ea8baaca6f6a40ff28358a01ac6c |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 31 18:37:37 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 31 18:37:43 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c407b27 |
7 |
|
8 |
app-accessibility/speech-dispatcher: add 0.11.4 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/878873 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
app-accessibility/speech-dispatcher/Manifest | 1 + |
14 |
.../speech-dispatcher-0.11.4-GNU_SOURCE.patch | 103 ++++++++++++++++ |
15 |
.../speech-dispatcher-0.11.4.ebuild | 129 +++++++++++++++++++++ |
16 |
3 files changed, 233 insertions(+) |
17 |
|
18 |
diff --git a/app-accessibility/speech-dispatcher/Manifest b/app-accessibility/speech-dispatcher/Manifest |
19 |
index e25886e18059..6fb24297eea4 100644 |
20 |
--- a/app-accessibility/speech-dispatcher/Manifest |
21 |
+++ b/app-accessibility/speech-dispatcher/Manifest |
22 |
@@ -1,2 +1,3 @@ |
23 |
DIST speech-dispatcher-0.11.2.tar.gz 7147526 BLAKE2B 6b11949736275d900e5e1d3909fab51fc04fbb45baf470a4c98aed19f61b7adb8cedf6b11f1a1aa69d9625383627beab4122c74ec78d9c07a5d0ddf4646669d6 SHA512 038ecaa5b9d56e3f915ec49fe7768cb4eebe1c8be79b95635f09fb3f6067e4c0ade13d2dd355e0b326579dcdf509dd180889b27282410b6bb252a2f642f028d4 |
24 |
DIST speech-dispatcher-0.11.3.tar.gz 7150632 BLAKE2B 92bad589e453a243362a9e0142d2897b9651fa648012f2bd7ef00bc1ded389fd2c01b6f38f19002289357f7aa6361a6e7fa3ee35ec2ad7c044f34d87e7f2c409 SHA512 e9f5b862066c0292230fda32f16782f9a2d66e8d0c0e3aa0ccdb4628c1182661d2f40894f480ae5206af7fbbc49338189312afe02092f5d472095b053afd75c7 |
25 |
+DIST speech-dispatcher-0.11.4.tar.gz 7127323 BLAKE2B 651a20ec403c6158756ab6ff7fbedb38ce1cec413be49367128274c8d20ccc7080a2dccd68cb7ebbec6bab05599f06a4aafc561e4e5e53cf52d19fa1b94fa286 SHA512 d0ebe832e2586abdb1284be36f8427cfbbd94f1a2dead1b74526b151e9529f9e61679339274b73afab5f829d184337372ba0aad93d880c42d2a6a1bcb2b7afef |
26 |
|
27 |
diff --git a/app-accessibility/speech-dispatcher/files/speech-dispatcher-0.11.4-GNU_SOURCE.patch b/app-accessibility/speech-dispatcher/files/speech-dispatcher-0.11.4-GNU_SOURCE.patch |
28 |
new file mode 100644 |
29 |
index 000000000000..9f08e5a863a4 |
30 |
--- /dev/null |
31 |
+++ b/app-accessibility/speech-dispatcher/files/speech-dispatcher-0.11.4-GNU_SOURCE.patch |
32 |
@@ -0,0 +1,103 @@ |
33 |
+https://github.com/brailcom/speechd/pull/789 |
34 |
+ |
35 |
+From da19d096901466e5ff395846405547d422c90b4c Mon Sep 17 00:00:00 2001 |
36 |
+From: Sam James <sam@g.o> |
37 |
+Date: Mon, 31 Oct 2022 18:33:17 +0000 |
38 |
+Subject: [PATCH] Use AC_USE_SYSTEM_EXTENSIONS |
39 |
+MIME-Version: 1.0 |
40 |
+Content-Type: text/plain; charset=UTF-8 |
41 |
+Content-Transfer-Encoding: 8bit |
42 |
+ |
43 |
+We already set _GNU_SOURCE in various places but not consistently. Let's |
44 |
+just use autoconf's AC_USE_SYSTEM_EXTENSIONS to ensure it's always set. |
45 |
+ |
46 |
+Fixes failure when building tests: |
47 |
+``` |
48 |
+x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -I../../include -I../../src/api/c -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -Wreturn-type -ggdb3 -Werror=format-security -Werror=implicit-function-declaration -Wimplicit-int -Wformat -c -o run_test.o run_test.c |
49 |
+run_test.c: In function ‘wait_for’: |
50 |
+run_test.c:93:21: error: implicit declaration of function ‘strcasestr’; did you mean ‘strcasecmp’? [-Werror=implicit-function-declaration] |
51 |
+ 93 | while (0 == strcasestr(reply, event)) { |
52 |
+ | ^~~~~~~~~~ |
53 |
+ | strcasecmp |
54 |
+cc1: some warnings being treated as errors |
55 |
+``` |
56 |
+ |
57 |
+Signed-off-by: Sam James <sam@g.o> |
58 |
+--- a/configure.ac |
59 |
++++ b/configure.ac |
60 |
+@@ -68,6 +68,8 @@ AC_PROG_LN_S |
61 |
+ AC_CHECK_PROGS([HELP2MAN], [help2man]) |
62 |
+ AM_CONDITIONAL([HAVE_HELP2MAN], [test "x$HELP2MAN" != "x"]) |
63 |
+ |
64 |
++AC_USE_SYSTEM_EXTENSIONS |
65 |
++ |
66 |
+ # Checks for libraries. |
67 |
+ AC_SEARCH_LIBS([sqrt], [m], [], |
68 |
+ [AC_MSG_FAILURE([Math library missing])]) |
69 |
+--- a/src/api/c/Makefile.am |
70 |
++++ b/src/api/c/Makefile.am |
71 |
+@@ -24,7 +24,7 @@ BUILT_SOURCES = libspeechd_version.h |
72 |
+ lib_LTLIBRARIES = libspeechd.la |
73 |
+ libspeechd_la_SOURCES = libspeechd.c |
74 |
+ libspeechd_la_CFLAGS = $(ERROR_CFLAGS) |
75 |
+-libspeechd_la_CPPFLAGS = $(inc_local) -D_GNU_SOURCE $(GLIB_CFLAGS) -DSPD_SPAWN_CMD=\""$(prefix)/bin/speech-dispatcher"\" |
76 |
++libspeechd_la_CPPFLAGS = $(inc_local) $(GLIB_CFLAGS) -DSPD_SPAWN_CMD=\""$(prefix)/bin/speech-dispatcher"\" |
77 |
+ libspeechd_la_LDFLAGS = -version-info $(LIB_SPD_CURRENT):$(LIB_SPD_REVISION):$(LIB_SPD_AGE) |
78 |
+ libspeechd_la_LIBADD = $(GLIB_LIBS) |
79 |
+ |
80 |
+--- a/src/api/guile/gssip.c |
81 |
++++ b/src/api/guile/gssip.c |
82 |
+@@ -24,8 +24,6 @@ |
83 |
+ #include <config.h> |
84 |
+ #endif |
85 |
+ |
86 |
+-#define _GNU_SOURCE |
87 |
+- |
88 |
+ #include <stdio.h> |
89 |
+ #include <string.h> |
90 |
+ |
91 |
+--- a/src/audio/pulse.c |
92 |
++++ b/src/audio/pulse.c |
93 |
+@@ -34,8 +34,6 @@ |
94 |
+ * |
95 |
+ */ |
96 |
+ |
97 |
+-#define _GNU_SOURCE |
98 |
+- |
99 |
+ #ifdef HAVE_CONFIG_H |
100 |
+ #include <config.h> |
101 |
+ #endif |
102 |
+--- a/src/clients/spdsend/spdsend.h |
103 |
++++ b/src/clients/spdsend/spdsend.h |
104 |
+@@ -24,8 +24,6 @@ |
105 |
+ |
106 |
+ #define __SPDSEND_H |
107 |
+ |
108 |
+-#define _GNU_SOURCE |
109 |
+- |
110 |
+ #include <stddef.h> |
111 |
+ |
112 |
+ /* Configuration */ |
113 |
+--- a/src/modules/Makefile.am |
114 |
++++ b/src/modules/Makefile.am |
115 |
+@@ -32,7 +32,7 @@ common_LDADD = $(DOTCONF_LIBS) $(GLIB_LIBS) $(audio_dlopen) -lpthread |
116 |
+ |
117 |
+ AM_CFLAGS = $(ERROR_CFLAGS) |
118 |
+ AM_CXXFLAGS = $(ERROR_CFLAGS) |
119 |
+-AM_CPPFLAGS = $(inc_local) -DDATADIR=\"$(snddatadir)\" -D_GNU_SOURCE $(GLIB_CFLAGS) |
120 |
++AM_CPPFLAGS = $(inc_local) -DDATADIR=\"$(snddatadir)\" $(GLIB_CFLAGS) |
121 |
+ |
122 |
+ module_utils_CPPFLAGS = $(AM_CPPFLAGS) \ |
123 |
+ $(DOTCONF_CFLAGS) |
124 |
+--- a/src/server/Makefile.am |
125 |
++++ b/src/server/Makefile.am |
126 |
+@@ -35,7 +35,7 @@ speech_dispatcher_CPPFLAGS = $(inc_local) $(DOTCONF_CFLAGS) $(GLIB_CFLAGS) \ |
127 |
+ -DMODULEBINDIR=\"$(modulebindir)\" \ |
128 |
+ -DOLDMODULEBINDIR=\"$(oldmodulebindir)\" \ |
129 |
+ -DLOCALE_DATA=\"$(localedatadir)\" \ |
130 |
+- -D_GNU_SOURCE -DDEFAULT_AUDIO_METHOD=\"$(default_audio_method)\" |
131 |
++ -DDEFAULT_AUDIO_METHOD=\"$(default_audio_method)\" |
132 |
+ speech_dispatcher_LDFLAGS = $(RDYNAMIC) |
133 |
+ speech_dispatcher_LDADD = $(lib_common) $(DOTCONF_LIBS) $(GLIB_LIBS) \ |
134 |
+ $(SNDFILE_LIBS) $(GMODULE_LIBS) $(GTHREAD_LIBS) $(EXTRA_SOCKET_LIBS) \ |
135 |
+ |
136 |
|
137 |
diff --git a/app-accessibility/speech-dispatcher/speech-dispatcher-0.11.4.ebuild b/app-accessibility/speech-dispatcher/speech-dispatcher-0.11.4.ebuild |
138 |
new file mode 100644 |
139 |
index 000000000000..aa87c946a7c6 |
140 |
--- /dev/null |
141 |
+++ b/app-accessibility/speech-dispatcher/speech-dispatcher-0.11.4.ebuild |
142 |
@@ -0,0 +1,129 @@ |
143 |
+# Copyright 1999-2022 Gentoo Authors |
144 |
+# Distributed under the terms of the GNU General Public License v2 |
145 |
+ |
146 |
+EAPI=8 |
147 |
+ |
148 |
+PYTHON_COMPAT=( python3_{8..11} ) |
149 |
+# TODO: drop autotools + eautoreconf after 0.11.4 |
150 |
+inherit autotools python-r1 systemd |
151 |
+ |
152 |
+DESCRIPTION="Speech synthesis interface" |
153 |
+HOMEPAGE="https://freebsoft.org/speechd" |
154 |
+SRC_URI="https://github.com/brailcom/speechd/releases/download/${PV}/${P}.tar.gz" |
155 |
+ |
156 |
+LICENSE="GPL-2" |
157 |
+SLOT="0" |
158 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" |
159 |
+IUSE="alsa ao espeak +espeak-ng flite nas pulseaudio python" |
160 |
+ |
161 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
162 |
+ |
163 |
+DEPEND="python? ( ${PYTHON_DEPS} ) |
164 |
+ >=dev-libs/dotconf-1.3 |
165 |
+ >=dev-libs/glib-2.36:2 |
166 |
+ >=media-libs/libsndfile-1.0.2 |
167 |
+ alsa? ( media-libs/alsa-lib ) |
168 |
+ ao? ( media-libs/libao ) |
169 |
+ espeak? ( app-accessibility/espeak ) |
170 |
+ espeak-ng? ( app-accessibility/espeak-ng ) |
171 |
+ flite? ( app-accessibility/flite ) |
172 |
+ nas? ( media-libs/nas ) |
173 |
+ pulseaudio? ( media-sound/pulseaudio )" |
174 |
+RDEPEND="${DEPEND} |
175 |
+ python? ( dev-python/pyxdg[${PYTHON_USEDEP}] )" |
176 |
+BDEPEND=" |
177 |
+ sys-apps/help2man |
178 |
+ >=sys-devel/gettext-0.19.8 |
179 |
+ virtual/pkgconfig" |
180 |
+ |
181 |
+PATCHES=( |
182 |
+ "${FILESDIR}"/${PN}-0.11.4-GNU_SOURCE.patch |
183 |
+) |
184 |
+ |
185 |
+src_prepare() { |
186 |
+ default |
187 |
+ |
188 |
+ eautoreconf |
189 |
+} |
190 |
+ |
191 |
+src_configure() { |
192 |
+ # bug 573732 |
193 |
+ export GIT_CEILING_DIRECTORIES="${WORKDIR}" |
194 |
+ |
195 |
+ local myeconfargs=( |
196 |
+ --disable-ltdl |
197 |
+ --disable-python |
198 |
+ --disable-static |
199 |
+ --with-baratinoo=no |
200 |
+ --with-ibmtts=no |
201 |
+ --with-kali=no |
202 |
+ --with-pico=no |
203 |
+ --with-voxin=no |
204 |
+ $(use_with alsa) |
205 |
+ $(use_with ao libao) |
206 |
+ $(use_with espeak) |
207 |
+ $(use_with espeak-ng) |
208 |
+ $(use_with flite) |
209 |
+ $(use_with nas) |
210 |
+ $(use_with pulseaudio pulse) |
211 |
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" |
212 |
+ ) |
213 |
+ econf "${myeconfargs[@]}" |
214 |
+} |
215 |
+ |
216 |
+src_compile() { |
217 |
+ use python && python_copy_sources |
218 |
+ |
219 |
+ emake |
220 |
+ |
221 |
+ if use python; then |
222 |
+ building() { |
223 |
+ cd src/api/python || die |
224 |
+ emake \ |
225 |
+ pyexecdir="$(python_get_sitedir)" \ |
226 |
+ pythondir="$(python_get_sitedir)" |
227 |
+ } |
228 |
+ python_foreach_impl run_in_build_dir building |
229 |
+ fi |
230 |
+} |
231 |
+ |
232 |
+src_install() { |
233 |
+ default |
234 |
+ |
235 |
+ if use python; then |
236 |
+ installation() { |
237 |
+ cd src/api/python || die |
238 |
+ emake \ |
239 |
+ DESTDIR="${D}" \ |
240 |
+ pyexecdir="$(python_get_sitedir)" \ |
241 |
+ pythondir="$(python_get_sitedir)" \ |
242 |
+ install |
243 |
+ } |
244 |
+ python_foreach_impl run_in_build_dir installation |
245 |
+ python_replicate_script "${ED}"/usr/bin/spd-conf |
246 |
+ python_foreach_impl python_optimize |
247 |
+ fi |
248 |
+ |
249 |
+ find "${D}" -name '*.la' -type f -delete || die |
250 |
+} |
251 |
+ |
252 |
+pkg_postinst() { |
253 |
+ local editconfig="n" |
254 |
+ if ! use espeak-ng; then |
255 |
+ ewarn "You have disabled espeak-ng, which is speech-dispatcher's" |
256 |
+ ewarn "default speech synthesizer." |
257 |
+ ewarn |
258 |
+ editconfig="y" |
259 |
+ fi |
260 |
+ if ! use pulseaudio; then |
261 |
+ ewarn "You have disabled pulseaudio support." |
262 |
+ ewarn "pulseaudio is speech-dispatcher's default audio subsystem." |
263 |
+ ewarn |
264 |
+ editconfig="y" |
265 |
+ fi |
266 |
+ if [[ "${editconfig}" == "y" ]]; then |
267 |
+ ewarn "You must edit ${EROOT}/etc/speech-dispatcher/speechd.conf" |
268 |
+ ewarn "and make sure the settings there match your system." |
269 |
+ ewarn |
270 |
+ fi |
271 |
+} |