pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/speech-dispatcher Fix audio/speech-dispatcher on...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d8f918c56353
branches:  trunk
changeset: 443880:d8f918c56353
user:      js <js%pkgsrc.org@localhost>
date:      Thu Dec 31 00:34:36 2020 +0000

description:
Fix audio/speech-dispatcher on macOS

 * Disable weak alias, which is not supported by Mach-O
 * Disable espeak, which officially says it does not support macOS

diffstat:

 audio/speech-dispatcher/Makefile                        |  24 ++++++++++++----
 audio/speech-dispatcher/PLIST                           |   4 +-
 audio/speech-dispatcher/distinfo                        |   3 +-
 audio/speech-dispatcher/patches/patch-src-audio-libao.c |  15 ++++++++++
 4 files changed, 37 insertions(+), 9 deletions(-)

diffs (97 lines):

diff -r ce2cb9a406d8 -r d8f918c56353 audio/speech-dispatcher/Makefile
--- a/audio/speech-dispatcher/Makefile  Thu Dec 31 00:13:48 2020 +0000
+++ b/audio/speech-dispatcher/Makefile  Thu Dec 31 00:34:36 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.17 2020/12/04 20:44:59 nia Exp $
+# $NetBSD: Makefile,v 1.18 2020/12/31 00:34:36 js Exp $
 
 DISTNAME=      speech-dispatcher-0.10.2
 PKGREVISION=   1
@@ -52,18 +52,30 @@
 CONF_FILES+=   ${PREFIX}/share/examples/speech-dispatcher/speechd.conf \
                ${PKG_SYSCONFDIR}/speechd.conf
 
-.for module in baratinoo.conf cicero.conf dtk-generic.conf epos-generic.conf \
-    espeak-mbrola-generic.conf espeak-ng-mbrola-generic.conf espeak-ng.conf \
-    espeak.conf festival.conf flite.conf ibmtts.conf ivona.conf kali.conf \
-    llia_phon-generic.conf mary-generic-disabled.conf swift-generic.conf \
-    voxin.conf
+PLIST_VARS+=   espeak
+
+MODULES=       baratinoo.conf cicero.conf dtk-generic.conf epos-generic.conf \
+               festival.conf flite.conf ibmtts.conf ivona.conf kali.conf \
+               llia_phon-generic.conf mary-generic-disabled.conf \
+               swift-generic.conf voxin.conf
+.if ${OPSYS} != "Darwin"
+# espeak officially says it does not support macOS:
+# https://github.com/rhdunn/espeak/issues/78
+MODULES+=      espeak-mbrola-generic.conf espeak-ng-mbrola-generic.conf \
+               espeak-ng.conf espeak.conf
+PLIST.espeak=  yes
+.endif
+
+.for module in ${MODULES}
 CONF_FILES+=   ${PREFIX}/share/examples/speech-dispatcher/modules/${module} \
                ${PKG_SYSCONFDIR}/modules/${module}
 .endfor
 
 REPLACE_PYTHON+=       src/api/python/speechd_config/spd-conf
 
+.if ${OPSYS} != "Darwin"
 .include "../../audio/espeak/buildlink3.mk"
+.endif
 .include "../../audio/flite/buildlink3.mk"
 .include "../../audio/libao/buildlink3.mk"
 .include "../../audio/libsndfile/buildlink3.mk"
diff -r ce2cb9a406d8 -r d8f918c56353 audio/speech-dispatcher/PLIST
--- a/audio/speech-dispatcher/PLIST     Thu Dec 31 00:13:48 2020 +0000
+++ b/audio/speech-dispatcher/PLIST     Thu Dec 31 00:34:36 2020 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.5 2020/12/03 13:00:48 nia Exp $
+@comment $NetBSD: PLIST,v 1.6 2020/12/31 00:34:36 js Exp $
 bin/spd-conf
 bin/spd-say
 bin/spdsend
@@ -38,7 +38,7 @@
 lib/speech-dispatcher-modules/sd_baratinoo
 lib/speech-dispatcher-modules/sd_cicero
 lib/speech-dispatcher-modules/sd_dummy
-lib/speech-dispatcher-modules/sd_espeak
+${PLIST.espeak}lib/speech-dispatcher-modules/sd_espeak
 lib/speech-dispatcher-modules/sd_festival
 lib/speech-dispatcher-modules/sd_flite
 lib/speech-dispatcher-modules/sd_generic
diff -r ce2cb9a406d8 -r d8f918c56353 audio/speech-dispatcher/distinfo
--- a/audio/speech-dispatcher/distinfo  Thu Dec 31 00:13:48 2020 +0000
+++ b/audio/speech-dispatcher/distinfo  Thu Dec 31 00:34:36 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2020/12/03 13:00:48 nia Exp $
+$NetBSD: distinfo,v 1.5 2020/12/31 00:34:37 js Exp $
 
 SHA1 (speech-dispatcher-0.10.2.tar.gz) = 33da39cece3c3a502758eef6ac2147e065997a60
 RMD160 (speech-dispatcher-0.10.2.tar.gz) = 3517af73279ae0c610c2ed9d9d5c4764fd85a653
@@ -7,4 +7,5 @@
 SHA1 (patch-config_Makefile.in) = dd58a389bc9820d85e4fe912faff7e2cf969fa8e
 SHA1 (patch-config_clients_Makefile.in) = 4c172a7c33336343b88707ae17702c80c97c28f5
 SHA1 (patch-config_modules_Makefile.in) = 566c25934686d56c8e9a54cf520d121c9458bfae
+SHA1 (patch-src-audio-libao.c) = d974ecdb0653082ef39cdefb55b4c9b2f8ec1c68
 SHA1 (patch-src_modules_espeak.c) = e75d4269c393df15359b9574ca99643a9b87faf3
diff -r ce2cb9a406d8 -r d8f918c56353 audio/speech-dispatcher/patches/patch-src-audio-libao.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/speech-dispatcher/patches/patch-src-audio-libao.c   Thu Dec 31 00:34:36 2020 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src-audio-libao.c,v 1.1 2020/12/31 00:34:37 js Exp $
+
+--- src/audio/libao.c.orig     2020-09-08 21:07:47.000000000 +0000
++++ src/audio/libao.c
+@@ -253,6 +253,9 @@ spd_audio_plugin_t *libao_plugin_get(voi
+ }
+ 
+ spd_audio_plugin_t *SPD_AUDIO_PLUGIN_ENTRY(void)
+-    __attribute__ ((weak, alias("libao_plugin_get")));
++#ifndef __MACH__
++    __attribute__ ((weak, alias("libao_plugin_get")))
++#endif
++;
+ #undef MSG
+ #undef ERR



Home | Main Index | Thread Index | Old Index