From 44f5608d6bdec64481cfb7fca52cd729beb3cd9f Mon Sep 17 00:00:00 2001
From: Kristof Robot <krirobo@gmail.com>
Date: Sat, 12 Apr 2014 13:58:41 +0200
Subject: [PATCH] festival: initial commit (resolves #241)

---
 recipes-extended/festival/festival_2.3.bb | 74 +++++++++++++++++++++++
 1 file changed, 74 insertions(+)
 create mode 100644 recipes-extended/festival/festival_2.3.bb

diff --git a/recipes-extended/festival/festival_2.3.bb b/recipes-extended/festival/festival_2.3.bb
new file mode 100644
index 0000000..f1d07cd
--- /dev/null
+++ b/recipes-extended/festival/festival_2.3.bb
@@ -0,0 +1,74 @@
+DESCRIPTION = "University of Edinburgh's Festival Speech Synthesis Systems is a free software \
+multi-lingual speech synthesis workbench that runs on multiple-platforms offering black box text to speech, \
+as well as an open architecture for research in speech synthesis. \
+It designed as a component of large speech technology systems."
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=566f852956cd542e6a0587df0354f673"
+
+DEPENDS = "speech-tools"
+
+SRC_URI = "http://tts.speech.cs.cmu.edu/awb/20130703/${PN}-${PV}-current.tar.gz;name=festival \
+	http://tts.speech.cs.cmu.edu/awb/20130703/festlex_CMU.tar.gz;name=CMU \
+	http://tts.speech.cs.cmu.edu/awb/20130703/festlex_POSLEX.tar.gz;name=POSLEX \
+	http://tts.speech.cs.cmu.edu/awb/20130703/festvox_kallpc16k.tar.gz;name=kallpc16k"
+SRC_URI[festival.md5sum] = "eddcce27b873048360aaf3ea51c0e9cf"
+SRC_URI[festival.sha256sum] = "8ea3a6f8ea301a37db5dbf4824e8e088adf4197f156a6c42e868af1b72d36488"
+SRC_URI[CMU.md5sum] = "6a2ee4fed7c3ebedf197a3b8524ccb87"
+SRC_URI[CMU.sha256sum] = "c19430919bca45d5368cd4c82af6153fbcc96a487ebd30b78b5f3c08718b7c07"
+SRC_URI[POSLEX.md5sum] = "aa80f9250065b318325f16fdad3a4484"
+SRC_URI[POSLEX.sha256sum] = "e7c6e3642dbd5b0d64942bc015a986fdd6244a79e51ec2e8309e63d569e49ea3"
+SRC_URI[kallpc16k.md5sum] = "3869af78f473b616601cac3fa83cc14e"
+SRC_URI[kallpc16k.sha256sum] = "7a357c34086fbba8b813f9750f6b5ba13e2a00478a0a2e78a97981cb76395578"
+
+S = "${WORKDIR}/${PN}"
+
+inherit autotools
+
+#disable parallel make (make -j), as festival cannot handle that
+PARALLEL_MAKE = ""
+
+FILES_${PN} += "/usr/lib/audsp"
+
+do_configure_prepend() { 
+    #point to speech-tools in sysroots
+    sed -i 's:EST=$(TOP)/../speech_tools:EST=${STAGING_DIR_TARGET}${datadir}/speech-tools:g' ${S}/config/config.in
+
+    #exclude experimental includes
+    sed -i 's:ALSO_INCLUDE:#ALSO_INCLUDE:g' ${S}/config/config.in
+
+    #fix hardcoded library path
+    sed -i 's:festival_libdir = FTLIBDIR:festival_libdir = "${datadir}/festival":g' ${S}/src/arch/festival/festival.cc
+}
+
+do_configure_append() { 
+    #suppress building of doc - generates error
+    sed -i 's:BUILD_DIRS = src lib examples bin doc:BUILD_DIRS = src lib examples bin:g' ${S}/Makefile 
+
+    #fix hardcoded bin path
+    sed -i 's:exec "$(FESTIVAL_HOME)/bin/festival:exec "${bindir}/festival:g' ${S}/examples/Makefile
+}
+
+do_install() {
+    install -m 0755 -d ${D}${bindir}
+    install -m 0755 ${S}/bin/festival ${D}${bindir} 
+    install -m 0755 ${S}/bin/festival_client ${D}${bindir}
+    install -m 0755 ${S}/bin/text2wave ${D}${bindir}
+
+    install -m 0755 -d ${D}${libdir} 
+    install -m 0644 ${S}/lib/etc/unknown_DebianGNULinux/audsp ${D}${libdir}
+
+    install -m 0755 -d ${D}${datadir}/festival
+    install -m 0644 ${S}/lib/*scm ${D}${datadir}/festival
+    install -m 0644 ${S}/lib/*gram ${D}${datadir}/festival
+    install -m 0644 ${S}/lib/*grambin ${D}${datadir}/festival
+    install -m 0644 ${S}/lib/*dtd ${D}${datadir}/festival
+    install -m 0644 ${S}/lib/sable-latin.ent ${D}${datadir}/festival
+    install -m 0644 ${S}/lib/festival.el ${D}${datadir}/festival
+    install -m 0644 ${S}/lib/speech.properties ${D}${datadir}/festival
+
+    install -m 0755 -d ${D}${datadir}/festival/multisyn
+    install -m 0644 ${S}/lib/multisyn/*scm ${D}${datadir}/festival/multisyn
+
+    cp -a ${S}/lib/dicts ${D}${datadir}/festival
+    cp -a ${S}/lib/voices ${D}${datadir}/festival
+}
-- 
GitLab