Date: Monday, December 13, 2021 @ 09:28:07 Author: svenstaro Revision: 1071400
archrelease: copy trunk to community-x86_64 Added: speech-dispatcher/repos/community-x86_64/ speech-dispatcher/repos/community-x86_64/PKGBUILD (from rev 1071399, speech-dispatcher/trunk/PKGBUILD) speech-dispatcher/repos/community-x86_64/glib2.68.patch (from rev 1071399, speech-dispatcher/trunk/glib2.68.patch) speech-dispatcher/repos/community-x86_64/speech-dispatcherd.service (from rev 1071399, speech-dispatcher/trunk/speech-dispatcherd.service) ----------------------------+ PKGBUILD | 82 ++++++++++++++++++++++++++++++++++ glib2.68.patch | 102 +++++++++++++++++++++++++++++++++++++++++++ speech-dispatcherd.service | 10 ++++ 3 files changed, 194 insertions(+) Copied: speech-dispatcher/repos/community-x86_64/PKGBUILD (from rev 1071399, speech-dispatcher/trunk/PKGBUILD) =================================================================== --- community-x86_64/PKGBUILD (rev 0) +++ community-x86_64/PKGBUILD 2021-12-13 09:28:07 UTC (rev 1071400) @@ -0,0 +1,82 @@ +# Maintainer: Sven-Hendrik Haase <svenst...@gmail.com> +pkgbase=speech-dispatcher +pkgname=(speech-dispatcher libspeechd) +pkgver=0.10.2 +pkgrel=3 +arch=('x86_64') +pkgdesc="High-level device independent layer for speech synthesis interface" +url="http://www.freebsoft.org/speechd" +license=('GPL2' 'FDL') +makedepends=('intltool' 'espeak-ng' 'libltdl' 'python-xdg' 'dotconf' 'libpulse' 'libao') +source=("https://github.com/brailcom/speechd/releases/download/${pkgver}/speech-dispatcher-${pkgver}.tar.gz" + 'glib2.68.patch' + 'speech-dispatcherd.service') +sha512sums=('9af240d9a15062489c170440911e9d148d0d113a0f22211f1496e9754345a5d079e160962d666801322dc2efa1134f8b5e209c0183d93a1f0896705dc6011122' + '098efb310446ebf25b80dac2a321bb1f5d74905d92a5f8a49838df687f5ef1e3bdae513f3b65451b8befcbaa485069730555c522ff96517adb74fcf41b2df85b' + '73eb563003b03f4836b17af66335664050d1dc3bd8434be368cd09ff8933aa2adc4bd17c4ce5c1bbbd406a0b0880191426a679fa05eac0a30f4005eaeeb47340') + +prepare() { + cd ${pkgname}-${pkgver} + + # https://github.com/brailcom/speechd/issues/616 + patch -Np1 -i ../glib2.68.patch + + # Disabled due to bug: https://bugs.archlinux.org/task/35700 + sed -i "s/cicero //g" configure.ac + sed -i "s/sd_cicero//g" src/modules/Makefile.am +} + +build() { + cd ${pkgname}-${pkgver} + + CFLAGS+=' -fcommon' # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common + + ./configure --prefix=/usr \ + --enable-shared \ + --sysconfdir=/etc \ + --without-flite + make +} + +package_speech-dispatcher() { + depends=("libspeechd=$pkgver-$pkgrel" 'libltdl' 'python-xdg' 'dotconf' 'libpulse' 'libao') + optdepends=('festival: Speech output using Festival' + 'espeak-ng: Speech output using ESpeak-ng' + 'pulseaudio: PulseAudio support') + backup=(etc/speech-dispatcher/clients/emacs.conf + etc/speech-dispatcher/modules/ibmtts.conf + etc/speech-dispatcher/modules/espeak-generic.conf + etc/speech-dispatcher/modules/espeak.conf + etc/speech-dispatcher/modules/espeak-ng.conf + etc/speech-dispatcher/modules/swift-generic.conf + etc/speech-dispatcher/modules/festival.conf + etc/speech-dispatcher/modules/cicero.conf + etc/speech-dispatcher/modules/espeak-mbrola-generic.conf + etc/speech-dispatcher/modules/espeak-ng-mbrola-generic.conf + etc/speech-dispatcher/modules/dtk-generic.conf + etc/speech-dispatcher/modules/llia_phon-generic.conf + etc/speech-dispatcher/modules/ivona.conf + etc/speech-dispatcher/modules/epos-generic.conf + etc/speech-dispatcher/modules/flite.conf + etc/speech-dispatcher/modules/pico-generic.conf + etc/speech-dispatcher/speechd.conf) + + cd ${pkgname}-${pkgver} + make DESTDIR="${pkgdir}" install + + install -Dm644 "${srcdir}"/speech-dispatcherd.service "${pkgdir}/usr/lib/systemd/system/speech-dispatcherd.service" + install -d "${pkgdir}/var/log/speech-dispatcher" + + sed -i 's|includedir=.*|includedir=${prefix}/include/speech-dispatcher|g' "${pkgdir}/usr/lib/pkgconfig/speech-dispatcher.pc" + + mkdir -p "${srcdir}"/libspeechd/usr/lib + mv "${pkgdir}"/usr/include "${srcdir}"/libspeechd/usr + mv "${pkgdir}"/usr/lib/libspeechd*so* "${srcdir}"/libspeechd/usr/lib +} + +package_libspeechd() { + mkdir -p "${pkgdir}"/usr/lib + + mv "${srcdir}"/libspeechd/usr/include "${pkgdir}"/usr + mv "${srcdir}"/libspeechd/usr/lib/* "${pkgdir}"/usr/lib +} Copied: speech-dispatcher/repos/community-x86_64/glib2.68.patch (from rev 1071399, speech-dispatcher/trunk/glib2.68.patch) =================================================================== --- community-x86_64/glib2.68.patch (rev 0) +++ community-x86_64/glib2.68.patch 2021-12-13 09:28:07 UTC (rev 1071400) @@ -0,0 +1,102 @@ +From a2faab416e42cbdf3d73f98578a89eb7a235e25a Mon Sep 17 00:00:00 2001 +From: Michael Catanzaro <mcatanz...@gnome.org> +Date: Tue, 2 Feb 2021 14:50:23 -0600 +Subject: [PATCH] Fix build after glib e38982df + +glib.h now includes <type_traits> when building as C++. But kali.cpp +includes it (via module_utils.h) inside an extern "C" block. This is +illegal. + +Best practice is to use extern "C" in project header files, not around +include statements. So let's do that. module_utils.h already includes +glib.h, so we can use G_BEGIN_DECLS/G_END_DECLS there. spd_audio.h does +not, so I decided to write out the usual boilerplate, as including all +of glib.h just for G_BEGIN_DECLS/G_END_DECLS seemed like overkill. +Finally, I'll move config.h at the very top of kali.cpp, since I'm +touching this code anyway and that is the usual place to put it. + +This is the minimum viable change required for speech-dispatcher to +build with glib master. As long as speech-dispatcher is combining C and +C++, it would be advisible to use extern "C" in all headers that declare +C functions and might be included from C++. +--- + src/modules/kali.cpp | 10 +++++----- + src/modules/module_utils.h | 4 ++++ + src/modules/spd_audio.h | 8 ++++++++ + 3 files changed, 17 insertions(+), 5 deletions(-) + +diff --git a/src/modules/kali.cpp b/src/modules/kali.cpp +index 193975d8..7b497626 100644 +--- a/src/modules/kali.cpp ++++ b/src/modules/kali.cpp +@@ -21,21 +21,21 @@ + * $Id: kali.c,v 1.59 2008-06-09 10:38:02 hanke Exp $ + */ + ++#ifdef HAVE_CONFIG_H ++#include <config.h> ++#endif ++ + #include <stdio.h> + #include <string.h> + #include <unistd.h> + #include <kali/Kali/kali.h> +-extern "C" { +-#ifdef HAVE_CONFIG_H +-#include <config.h> +-#endif ++ + #include <semaphore.h> + #include "spd_audio.h" + + #include <speechd_types.h> + + #include "module_utils.h" +-} + #define MODULE_NAME "kali" + #define MODULE_VERSION "0.0" + #define DEBUG_MODULE 1 +diff --git a/src/modules/module_utils.h b/src/modules/module_utils.h +index 6081e7e1..e82850b2 100644 +--- a/src/modules/module_utils.h ++++ b/src/modules/module_utils.h +@@ -41,6 +41,8 @@ + #include <speechd_types.h> + #include "spd_audio.h" + ++G_BEGIN_DECLS ++ + typedef struct SPDMarks { + unsigned num; + unsigned allocated; +@@ -420,4 +422,6 @@ char *module_getvoice(char *language, SPDVoiceType voice); + gboolean module_existsvoice(char *voicename); + char *module_getdefaultvoice(void); + ++G_END_DECLS ++ + #endif /* #ifndef __MODULE_UTILS_H */ +diff --git a/src/modules/spd_audio.h b/src/modules/spd_audio.h +index 25045e2f..b9de3cd5 100644 +--- a/src/modules/spd_audio.h ++++ b/src/modules/spd_audio.h +@@ -28,6 +28,10 @@ + + #define SPD_AUDIO_LIB_PREFIX "spd_" + ++#ifdef __cplusplus ++extern "C" { ++#endif ++ + AudioID *spd_audio_open(char *name, void **pars, char **error); + + int spd_audio_play(AudioID * id, AudioTrack track, AudioFormat format); +@@ -47,4 +51,8 @@ void spd_audio_set_loglevel(AudioID * id, int level); + + char const *spd_audio_get_playcmd(AudioID * id); + ++#ifdef __cplusplus ++} ++#endif ++ + #endif /* ifndef #__SPD_AUDIO_H */ Copied: speech-dispatcher/repos/community-x86_64/speech-dispatcherd.service (from rev 1071399, speech-dispatcher/trunk/speech-dispatcherd.service) =================================================================== --- community-x86_64/speech-dispatcherd.service (rev 0) +++ community-x86_64/speech-dispatcherd.service 2021-12-13 09:28:07 UTC (rev 1071400) @@ -0,0 +1,10 @@ +[Unit] +Description=Speech-Dispatcher an high-level device independent layer for speech synthesis. +After=syslog.target + +[Service] +Type=forking +ExecStart=/usr/bin/speech-dispatcher -d + +[Install] +WantedBy=multi-user.target