From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-accessibility/speech-dispatcher/files/, app-accessibility/speech-dispatcher/
Date: Sun, 17 Jul 2022 20:31:43 +0000 (UTC) [thread overview]
Message-ID: <1658089778.89dc6b8ba24f258f5426b3b07d8cdba1f75d37e7.sam@gentoo> (raw)
commit: 89dc6b8ba24f258f5426b3b07d8cdba1f75d37e7
Author: Alfred Persson Forsberg <cat <AT> catcream <DOT> org>
AuthorDate: Wed Jul 6 23:20:31 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jul 17 20:29:38 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89dc6b8b
app-accessibility/speech-dispatcher: Fix build for musl
pthread_mutex_t and stat are undefined, including pthread.h and
removing the unused stat variable fixes these errors.
Closes: https://bugs.gentoo.org/833347
Signed-off-by: Alfred Persson Forsberg <cat <AT> catcream.org>
Closes: https://github.com/gentoo/gentoo/pull/26250
Signed-off-by: Sam James <sam <AT> gentoo.org>
...peech-dispatcher-0.11.1-include-pthread_h.patch | 22 ++++++++++++++
...atcher-0.11.1-remove-unused-variable-musl.patch | 35 ++++++++++++++++++++++
.../speech-dispatcher-0.11.1.ebuild | 5 ++++
3 files changed, 62 insertions(+)
diff --git a/app-accessibility/speech-dispatcher/files/speech-dispatcher-0.11.1-include-pthread_h.patch b/app-accessibility/speech-dispatcher/files/speech-dispatcher-0.11.1-include-pthread_h.patch
new file mode 100644
index 000000000000..c8ece83fd350
--- /dev/null
+++ b/app-accessibility/speech-dispatcher/files/speech-dispatcher-0.11.1-include-pthread_h.patch
@@ -0,0 +1,22 @@
+This fixes pthread_mutex_t being undefined on musl libc.
+
+https://bugs.gentoo.org/833347
+---
+ src/modules/module_main.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/modules/module_main.h b/src/modules/module_main.h
+index 7d9ed6d..f1d4c65 100644
+--- a/src/modules/module_main.h
++++ b/src/modules/module_main.h
+@@ -31,6 +31,7 @@
+
+ #include <speechd_types.h>
+ #include <spd_audio.h>
++#include <pthread.h>
+
+ #ifdef __cplusplus
+ extern "C" {
+--
+2.35.1
+
diff --git a/app-accessibility/speech-dispatcher/files/speech-dispatcher-0.11.1-remove-unused-variable-musl.patch b/app-accessibility/speech-dispatcher/files/speech-dispatcher-0.11.1-remove-unused-variable-musl.patch
new file mode 100644
index 000000000000..3264bdff489b
--- /dev/null
+++ b/app-accessibility/speech-dispatcher/files/speech-dispatcher-0.11.1-remove-unused-variable-musl.patch
@@ -0,0 +1,35 @@
+https://github.com/brailcom/speechd/commit/57e2c131f03ae8244b0478e449d86dea7d5724d8
+
+musl additionally requires explicitly including sys/stat.h header for stat.
+Including that would've been the proper patch if 'st' was actually used.
+
+From 57e2c131f03ae8244b0478e449d86dea7d5724d8 Mon Sep 17 00:00:00 2001
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Sun, 13 Mar 2022 18:35:59 +0100
+Subject: [PATCH] Drop unused variable
+
+---
+ src/modules/espeak.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/modules/espeak.c b/src/modules/espeak.c
+index 94a01197..1a47bb09 100644
+--- a/src/modules/espeak.c
++++ b/src/modules/espeak.c
+@@ -3,7 +3,7 @@
+ * espeak.c - Speech Dispatcher backend for espeak
+ *
+ * Copyright (C) 2007 Brailcom, o.p.s.
+- * Copyright (C) 2019-2021 Samuel Thibault <samuel.thibault@ens-lyon.org>
++ * Copyright (C) 2019-2022 Samuel Thibault <samuel.thibault@ens-lyon.org>
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+@@ -880,7 +880,6 @@ static SPDVoice **espeak_list_synthesis_voices()
+ {
+ const char *identifier = espeak_mbrola[j]->identifier;
+ char *voicename, *dash, *path;
+- struct stat st;
+
+ totnummbrola++;
+
diff --git a/app-accessibility/speech-dispatcher/speech-dispatcher-0.11.1.ebuild b/app-accessibility/speech-dispatcher/speech-dispatcher-0.11.1.ebuild
index 9a9936c3845c..97cb9ea2d96a 100644
--- a/app-accessibility/speech-dispatcher/speech-dispatcher-0.11.1.ebuild
+++ b/app-accessibility/speech-dispatcher/speech-dispatcher-0.11.1.ebuild
@@ -35,6 +35,11 @@ BDEPEND="
>=sys-devel/gettext-0.19.8
virtual/pkgconfig"
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.11.1-include-pthread_h.patch
+ "${FILESDIR}"/${PN}-0.11.1-remove-unused-variable-musl.patch
+)
+
src_configure() {
# bug 573732
export GIT_CEILING_DIRECTORIES="${WORKDIR}"
next reply other threads:[~2022-07-17 20:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-17 20:31 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-10-29 9:53 [gentoo-commits] repo/gentoo:master commit in: app-accessibility/speech-dispatcher/files/, app-accessibility/speech-dispatcher/ Sam James
2022-10-31 18:37 Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1658089778.89dc6b8ba24f258f5426b3b07d8cdba1f75d37e7.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox