diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 20:05:37 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 04:26:31 +0300 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /meta-openembedded/meta-oe/recipes-support/espeak | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-support/espeak')
4 files changed, 135 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-support/espeak/espeak-data_1.48.04.bb b/meta-openembedded/meta-oe/recipes-support/espeak/espeak-data_1.48.04.bb new file mode 100644 index 000000000..79b2cc1f4 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/espeak/espeak-data_1.48.04.bb @@ -0,0 +1,24 @@ +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 +} diff --git a/meta-openembedded/meta-oe/recipes-support/espeak/espeak.inc b/meta-openembedded/meta-oe/recipes-support/espeak/espeak.inc new file mode 100644 index 000000000..60b3f73c8 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/espeak/espeak.inc @@ -0,0 +1,14 @@ +DESCRIPTION = "eSpeak is a compact open source software speech synthesizer" +SECTION = "base" +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://License.txt;md5=cb7a20edb4c9f5f478de6523dcd7362c" + +SRC_URI = "http://downloads.sourceforge.net/espeak/espeak-1.48.04-source.zip \ + file://gcc-narrowing-warning-fix.patch \ +" +SRC_URI[md5sum] = "cadd7482eaafe9239546bdc09fa244c3" +SRC_URI[sha256sum] = "bf9a17673adffcc28ff7ea18764f06136547e97bbd9edf2ec612f09b207f0659" + +S = "${WORKDIR}/espeak-${PV}-source" + +DEPENDS = "portaudio-v19" diff --git a/meta-openembedded/meta-oe/recipes-support/espeak/espeak_1.48.04.bb b/meta-openembedded/meta-oe/recipes-support/espeak/espeak_1.48.04.bb new file mode 100644 index 000000000..552f40413 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/espeak/espeak_1.48.04.bb @@ -0,0 +1,41 @@ +require espeak.inc +inherit siteinfo + +EXTRA_PHONEMES = '${@bb.utils.contains("SITEINFO_ENDIANNESS", "be", "espeak-data (= ${PV})", "", d)}' +RDEPENDS_${PN} = "portaudio-v19 ${EXTRA_PHONEMES}" + +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}/espeak + 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}/espeak/ + ln -sf espeak/espeak.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 + chown -R root:root ${D}${datadir}/espeak-data +} diff --git a/meta-openembedded/meta-oe/recipes-support/espeak/files/gcc-narrowing-warning-fix.patch b/meta-openembedded/meta-oe/recipes-support/espeak/files/gcc-narrowing-warning-fix.patch new file mode 100644 index 000000000..2a9b4607d --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-support/espeak/files/gcc-narrowing-warning-fix.patch @@ -0,0 +1,56 @@ +From f09c83640b9173552fd9277c3a48619b903fa436 Mon Sep 17 00:00:00 2001 +From: "Reece H. Dunn" <msclrhd@gmail.com> +Date: Wed, 20 Jan 2016 20:48:29 +0000 +Subject: [PATCH] Fix GCC -Wnarrowing warnings. + +--- + src/tr_languages.cpp | 7 ++++--- + src/translate.h | 2 +- + 2 files changed, 5 insertions(+), 4 deletions(-) + +Index: espeak-1.48.04-source/src/tr_languages.cpp +=================================================================== +--- espeak-1.48.04-source.orig/src/tr_languages.cpp ++++ espeak-1.48.04-source/src/tr_languages.cpp +@@ -198,8 +198,8 @@ static const unsigned short chars_ignore + 0x200d, 1, // zero width joiner + 0, 0 }; + +-const char string_ordinal[] = {0xc2,0xba,0}; // masculine ordinal character, UTF-8 +- ++const unsigned char string_ordinal[] = {0xc2,0xba,0}; // masculine ordinal character, UTF-8 ++const unsigned char utf8_null[] = { 0 }; // null string, UTF-8 + + static Translator* NewTranslator(void) + {//=================================== +@@ -296,7 +296,7 @@ static const char transpose_map_latin[] + tr->langopts.replace_chars = NULL; + tr->langopts.ascii_language[0] = 0; // Non-Latin alphabet languages, use this language to speak Latin words, default is English + tr->langopts.alt_alphabet_lang = L('e','n'); +- tr->langopts.roman_suffix = ""; ++ tr->langopts.roman_suffix = utf8_null; + + SetLengthMods(tr,201); + // tr->langopts.length_mods = length_mods_en; +@@ -758,7 +758,7 @@ Translator *SelectTranslator(const char + tr->langopts.stress_flags = S_FINAL_SPANISH | S_FINAL_DIM_ONLY | S_FINAL_NO_2; + tr->langopts.numbers = NUM_SINGLE_STRESS | NUM_DECIMAL_COMMA | NUM_AND_UNITS | NUM_OMIT_1_HUNDRED | NUM_OMIT_1_THOUSAND | NUM_ROMAN | NUM_ROMAN_ORDINAL; + tr->langopts.numbers2 = NUM2_ORDINAL_NO_AND; +- tr->langopts.roman_suffix = string_ordinal; ++ tr->langopts.roman_suffix = utf8_null; + } + else + if(name2 == L_pap) +Index: espeak-1.48.04-source/src/translate.h +=================================================================== +--- espeak-1.48.04-source.orig/src/translate.h ++++ espeak-1.48.04-source/src/translate.h +@@ -545,7 +545,7 @@ typedef struct { + int decimal_sep; + int max_digits; // max number of digits which can be spoken as an integer number (rather than individual digits) + const char *ordinal_indicator; // UTF-8 string +- const char *roman_suffix; // add this (ordinal) suffix to Roman numbers (LANG=an) ++ const unsigned char *roman_suffix; // add this (ordinal) suffix to Roman numbers (LANG=an) + + // bit 0, accent name before the letter name, bit 1 "capital" after letter name + int accents; |