[oe] [meta-oe][PATCH 15/16] espeak: import from OE rev d4f0211e2078d5033ae0dee74664de5520d8392d

Martin Jansa martin.jansa at gmail.com
Sun May 29 19:17:25 UTC 2011


Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
 meta-oe/recipes-support/espeak/espeak-data_1.37.bb |   27 +++++++++++++
 meta-oe/recipes-support/espeak/espeak.inc          |   10 +++++
 meta-oe/recipes-support/espeak/espeak_1.37.bb      |   42 ++++++++++++++++++++
 3 files changed, 79 insertions(+), 0 deletions(-)
 create mode 100644 meta-oe/recipes-support/espeak/espeak-data_1.37.bb
 create mode 100644 meta-oe/recipes-support/espeak/espeak.inc
 create mode 100644 meta-oe/recipes-support/espeak/espeak_1.37.bb

diff --git a/meta-oe/recipes-support/espeak/espeak-data_1.37.bb b/meta-oe/recipes-support/espeak/espeak-data_1.37.bb
new file mode 100644
index 0000000..d15d496
--- /dev/null
+++ b/meta-oe/recipes-support/espeak/espeak-data_1.37.bb
@@ -0,0 +1,27 @@
+require espeak.inc
+
+inherit native
+
+PACKAGES = "${PN}"
+FILES_${PN} = "${layout_datadir}"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+TARGET_ARCH = "${MACHINE_ARCH}"
+
+do_compile() {
+        # Fixing byte order of phoneme data files
+        cd "${S}/platforms/big_endian"
+        sed -i '/^ *CC *=/d' Makefile
+        sed -i 's/\(.*BYTE_ORDER\)/#undef BYTE_ORDER\n#define BYTE_ORDER BIG_ENDIAN\n\1/' espeak-phoneme-data.c
+        oe_runmake
+        ./espeak-phoneme-data "${S}/espeak-data"
+        cp -f phondata phonindex phontab "${S}/espeak-data"
+}
+
+do_install() {
+        install -d ${D}${layout_datadir}/espeak-data
+        install -m 0644 ${S}/espeak-data/phon* ${D}${layout_datadir}/espeak-data
+}
+
+SRC_URI[md5sum] = "5c7b292d0537232868b4ac1317d76c02"
+SRC_URI[sha256sum] = "77f406c345362185ec4f362bf49f61d202e01ac9b9cd5c14f803195a544ce6d3"
diff --git a/meta-oe/recipes-support/espeak/espeak.inc b/meta-oe/recipes-support/espeak/espeak.inc
new file mode 100644
index 0000000..98a1765
--- /dev/null
+++ b/meta-oe/recipes-support/espeak/espeak.inc
@@ -0,0 +1,10 @@
+DESCRIPTION = "eSpeak is a compact open source software speech synthesizer"
+SECTION = "base"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://License.txt;md5=cb7a20edb4c9f5f478de6523dcd7362c"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/espeak/espeak-${PV}-source.zip"
+
+S = "${WORKDIR}/espeak-${PV}-source"
+
+DEPENDS = "portaudio-v19"
diff --git a/meta-oe/recipes-support/espeak/espeak_1.37.bb b/meta-oe/recipes-support/espeak/espeak_1.37.bb
new file mode 100644
index 0000000..6cc4cd4
--- /dev/null
+++ b/meta-oe/recipes-support/espeak/espeak_1.37.bb
@@ -0,0 +1,42 @@
+require espeak.inc
+inherit siteinfo
+
+EXTRA_PHONEMES = '${@base_contains("SITEINFO_ENDIANNESS", "be",  "espeak-data (= ${PV})", "", d)}'
+RDEPENDS_${PN} = "portaudio-v19 ${EXTRA_PHONEMES}"
+
+SRC_URI[md5sum] = "5c7b292d0537232868b4ac1317d76c02"
+SRC_URI[sha256sum] = "77f406c345362185ec4f362bf49f61d202e01ac9b9cd5c14f803195a544ce6d3"
+
+CXXFLAGS += "-DUSE_PORTAUDIO"
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+FILES_${PN} += "${datadir}/espeak-data"
+
+do_configure() {
+       #  "speak" binary, a TTS engine, uses portaudio in either APIs V18 or V19, use V19
+       cp "${S}/src/portaudio19.h" "${S}/src/portaudio.h"
+}
+
+do_compile() {
+       cd src
+       oe_runmake
+}
+
+do_install() {
+        install -d ${D}${bindir}
+        install -d ${D}${libdir}
+        install -d ${D}${includedir}
+        install -d ${D}${datadir}/espeak-data
+
+        # we do not ship "speak" binary though.
+        install -m 0755 ${S}/src/espeak ${D}${bindir}
+        install -m 0644 ${S}/src/speak_lib.h ${D}${includedir}
+        oe_libinstall -so -C src libespeak ${D}${libdir}
+
+	if [ "${SITEINFO_ENDIANNESS}" = "be" ] ; then
+		# the big-endian phon* files are provided by the package espeak-data
+		rm -f ${S}/espeak-data/phon*
+	fi
+
+        cp -prf ${S}/espeak-data/* ${D}${datadir}/espeak-data
+}
-- 
1.7.5.rc3





More information about the Openembedded-devel mailing list