diff options
5 files changed, 71 insertions, 61 deletions
diff --git a/meta-oe/recipes-support/espeak/espeak-data_1.48.04.bb b/meta-oe/recipes-support/espeak/espeak-data_1.48.04.bb deleted file mode 100644 index a4e5d14d17..0000000000 --- a/meta-oe/recipes-support/espeak/espeak-data_1.48.04.bb +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | require espeak.inc | ||
| 2 | |||
| 3 | inherit native | ||
| 4 | |||
| 5 | PACKAGES = "${PN}" | ||
| 6 | FILES_${PN} = "${layout_datadir}" | ||
| 7 | |||
| 8 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
| 9 | TARGET_ARCH = "${MACHINE_ARCH}" | ||
| 10 | |||
| 11 | do_compile() { | ||
| 12 | # Fixing byte order of phoneme data files | ||
| 13 | cd "${S}/platforms/big_endian" | ||
| 14 | sed -i '/^ *CC *=/d' Makefile | ||
| 15 | sed -i 's/\(.*BYTE_ORDER\)/#undef BYTE_ORDER\n#define BYTE_ORDER BIG_ENDIAN\n\1/' espeak-phoneme-data.c | ||
| 16 | oe_runmake | ||
| 17 | ./espeak-phoneme-data "${S}/espeak-data" "." "${S}/espeak-data/phondata-manifest" | ||
| 18 | cp -f phondata phonindex phontab "${S}/espeak-data" | ||
| 19 | } | ||
| 20 | |||
| 21 | do_install() { | ||
| 22 | install -d ${D}${layout_datadir}/espeak-data | ||
| 23 | install -m 0644 ${S}/espeak-data/phon* ${D}${layout_datadir}/espeak-data | ||
| 24 | } | ||
diff --git a/meta-oe/recipes-support/espeak/espeak.inc b/meta-oe/recipes-support/espeak/espeak.inc deleted file mode 100644 index f45455c7e1..0000000000 --- a/meta-oe/recipes-support/espeak/espeak.inc +++ /dev/null | |||
| @@ -1,15 +0,0 @@ | |||
| 1 | DESCRIPTION = "eSpeak is a compact open source software speech synthesizer" | ||
| 2 | SECTION = "base" | ||
| 3 | LICENSE = "GPLv3" | ||
| 4 | LIC_FILES_CHKSUM = "file://License.txt;md5=cb7a20edb4c9f5f478de6523dcd7362c" | ||
| 5 | |||
| 6 | SRC_URI = "http://downloads.sourceforge.net/espeak/espeak-1.48.04-source.zip \ | ||
| 7 | file://0001-Fix-build-of-shared-library-on-architectures-needing.patch \ | ||
| 8 | file://espeak-1.48-gcc-6-fix.patch \ | ||
| 9 | " | ||
| 10 | SRC_URI[md5sum] = "cadd7482eaafe9239546bdc09fa244c3" | ||
| 11 | SRC_URI[sha256sum] = "bf9a17673adffcc28ff7ea18764f06136547e97bbd9edf2ec612f09b207f0659" | ||
| 12 | |||
| 13 | S = "${WORKDIR}/espeak-${PV}-source" | ||
| 14 | |||
| 15 | DEPENDS = "portaudio-v19" | ||
diff --git a/meta-oe/recipes-support/espeak/espeak_1.48.04.bb b/meta-oe/recipes-support/espeak/espeak_1.48.04.bb index 57e30f0710..78f8f85c96 100644 --- a/meta-oe/recipes-support/espeak/espeak_1.48.04.bb +++ b/meta-oe/recipes-support/espeak/espeak_1.48.04.bb | |||
| @@ -1,8 +1,20 @@ | |||
| 1 | require espeak.inc | 1 | DESCRIPTION = "eSpeak is a compact open source software speech synthesizer" |
| 2 | inherit siteinfo | 2 | SECTION = "base" |
| 3 | LICENSE = "GPLv3" | ||
| 4 | LIC_FILES_CHKSUM = "file://License.txt;md5=cb7a20edb4c9f5f478de6523dcd7362c" | ||
| 5 | |||
| 6 | SRC_URI = "http://downloads.sourceforge.net/espeak/espeak-1.48.04-source.zip \ | ||
| 7 | file://0001-Fix-build-of-shared-library-on-architectures-needing.patch \ | ||
| 8 | file://0002-tr_languages-cast-string_ordinal-init-values.patch \ | ||
| 9 | " | ||
| 10 | SRC_URI[md5sum] = "cadd7482eaafe9239546bdc09fa244c3" | ||
| 11 | SRC_URI[sha256sum] = "bf9a17673adffcc28ff7ea18764f06136547e97bbd9edf2ec612f09b207f0659" | ||
| 12 | |||
| 13 | S = "${WORKDIR}/espeak-${PV}-source" | ||
| 14 | |||
| 15 | DEPENDS = "portaudio-v19 qemu-helper-native" | ||
| 16 | inherit siteinfo qemu | ||
| 3 | 17 | ||
| 4 | EXTRA_PHONEMES = '${@bb.utils.contains("SITEINFO_ENDIANNESS", "be", "espeak-data (= ${PV})", "", d)}' | ||
| 5 | RDEPENDS_${PN} = "portaudio-v19 ${EXTRA_PHONEMES}" | ||
| 6 | 18 | ||
| 7 | CXXFLAGS += "-DUSE_PORTAUDIO" | 19 | CXXFLAGS += "-DUSE_PORTAUDIO" |
| 8 | TARGET_CC_ARCH += "${LDFLAGS}" | 20 | TARGET_CC_ARCH += "${LDFLAGS}" |
| @@ -11,12 +23,30 @@ FILES_${PN} += "${datadir}/espeak-data" | |||
| 11 | 23 | ||
| 12 | do_configure() { | 24 | do_configure() { |
| 13 | # "speak" binary, a TTS engine, uses portaudio in either APIs V18 or V19, use V19 | 25 | # "speak" binary, a TTS engine, uses portaudio in either APIs V18 or V19, use V19 |
| 14 | cp "${S}/src/portaudio19.h" "${S}/src/portaudio.h" | 26 | install -m 0644 "${S}/src/portaudio19.h" "${S}/src/portaudio.h" |
| 15 | } | 27 | } |
| 16 | 28 | ||
| 17 | do_compile() { | 29 | do_compile() { |
| 18 | cd src | 30 | cd src |
| 19 | oe_runmake | 31 | oe_runmake |
| 32 | |||
| 33 | cd "${S}/platforms/big_endian" | ||
| 34 | qemu_binary="${@qemu_wrapper_cmdline(d, '${STAGING_DIR_TARGET}', ['${S}/platforms/big_endian', '${STAGING_DIR_TARGET}${base_libdir}'])}" | ||
| 35 | cat >qemuwrapper <<EOF | ||
| 36 | #!/bin/sh | ||
| 37 | $qemu_binary "\$@" | ||
| 38 | EOF | ||
| 39 | chmod +x qemuwrapper | ||
| 40 | sed -i '/^ *CC *=/d' Makefile | ||
| 41 | # Fixing byte order of phoneme data files | ||
| 42 | if [ "${SITEINFO_ENDIANNESS}" = "be" ]; then | ||
| 43 | sed -i 's/\(.*BYTE_ORDER\)/#undef BYTE_ORDER\n#define BYTE_ORDER BIG_ENDIAN\n\1/' espeak-phoneme-data.c | ||
| 44 | else | ||
| 45 | sed -i 's/\(.*BYTE_ORDER\)/#undef BYTE_ORDER\n#define BYTE_ORDER LITTLE_ENDIAN\n\1/' espeak-phoneme-data.c | ||
| 46 | fi | ||
| 47 | oe_runmake | ||
| 48 | ./qemuwrapper ./espeak-phoneme-data "${S}/espeak-data" "." "${S}/espeak-data/phondata-manifest" | ||
| 49 | cp -f phondata phonindex phontab "${S}/espeak-data" | ||
| 20 | } | 50 | } |
| 21 | 51 | ||
| 22 | do_install() { | 52 | do_install() { |
| @@ -31,10 +61,7 @@ do_install() { | |||
| 31 | ln -sf espeak/espeak.h ${D}${includedir}/ | 61 | ln -sf espeak/espeak.h ${D}${includedir}/ |
| 32 | oe_libinstall -so -C src libespeak ${D}${libdir} | 62 | oe_libinstall -so -C src libespeak ${D}${libdir} |
| 33 | 63 | ||
| 34 | if [ "${SITEINFO_ENDIANNESS}" = "be" ] ; then | ||
| 35 | # the big-endian phon* files are provided by the package espeak-data | ||
| 36 | rm -f ${S}/espeak-data/phon* | ||
| 37 | fi | ||
| 38 | |||
| 39 | cp -R --no-dereference --preserve=mode,links ${S}/espeak-data/* ${D}${datadir}/espeak-data | 64 | cp -R --no-dereference --preserve=mode,links ${S}/espeak-data/* ${D}${datadir}/espeak-data |
| 40 | } | 65 | } |
| 66 | |||
| 67 | RDEPENDS_${PN} = "portaudio-v19" | ||
diff --git a/meta-oe/recipes-support/espeak/files/0002-tr_languages-cast-string_ordinal-init-values.patch b/meta-oe/recipes-support/espeak/files/0002-tr_languages-cast-string_ordinal-init-values.patch new file mode 100644 index 0000000000..cef360eaef --- /dev/null +++ b/meta-oe/recipes-support/espeak/files/0002-tr_languages-cast-string_ordinal-init-values.patch | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | From 451330d09a6a3500b40bc4f5896ba790ab46cd6c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Romain Naour <romain.naour@gmail.com> | ||
| 3 | Date: Sun, 15 Jan 2017 19:37:31 +0100 | ||
| 4 | Subject: [PATCH 2/2] tr_languages: cast string_ordinal init values | ||
| 5 | |||
| 6 | On some architecture, "char" is signed (x86_64, nios2...) so the | ||
| 7 | compiler try to convert int 0xc2 and 0xba to a signed char. | ||
| 8 | This is an error since gcc6 (Wnarrowing). | ||
| 9 | |||
| 10 | Fixes: | ||
| 11 | http://autobuild.buildroot.net/results/bae/baef9888b1979d18171668a675985e3f3b45fda6 | ||
| 12 | |||
| 13 | Upstream-Status: Pending [imported from BR] | ||
| 14 | Signed-off-by: Romain Naour <romain.naour@gmail.com> | ||
| 15 | --- | ||
| 16 | src/tr_languages.cpp | 2 +- | ||
| 17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 18 | |||
| 19 | diff --git a/src/tr_languages.cpp b/src/tr_languages.cpp | ||
| 20 | index 5c80286..dbc6e36 100644 | ||
| 21 | --- a/src/tr_languages.cpp | ||
| 22 | +++ b/src/tr_languages.cpp | ||
| 23 | @@ -200,7 +200,7 @@ static const unsigned short chars_ignore_zwnj_hyphen[] = { | ||
| 24 | 0x200d, 1, // zero width joiner | ||
| 25 | 0, 0 }; | ||
| 26 | |||
| 27 | -const char string_ordinal[] = {0xc2,0xba,0}; // masculine ordinal character, UTF-8 | ||
| 28 | +const char string_ordinal[] = {(char)0xc2,(char)0xba,0}; // masculine ordinal character, UTF-8 | ||
| 29 | |||
| 30 | |||
| 31 | static Translator* NewTranslator(void) | ||
| 32 | -- | ||
| 33 | 2.9.3 | ||
| 34 | |||
diff --git a/meta-oe/recipes-support/espeak/files/espeak-1.48-gcc-6-fix.patch b/meta-oe/recipes-support/espeak/files/espeak-1.48-gcc-6-fix.patch deleted file mode 100644 index 6e59c7892f..0000000000 --- a/meta-oe/recipes-support/espeak/files/espeak-1.48-gcc-6-fix.patch +++ /dev/null | |||
| @@ -1,12 +0,0 @@ | |||
| 1 | diff --git a/src/tr_languages.cpp b/src/tr_languages.cpp | ||
| 2 | --- a/src/tr_languages.cpp | ||
| 3 | +++ b/src/tr_languages.cpp | ||
| 4 | @@ -198,7 +198,7 @@ static const unsigned short chars_ignore_zwnj_hyphen[] = { | ||
| 5 | 0x200d, 1, // zero width joiner | ||
| 6 | 0, 0 }; | ||
| 7 | |||
| 8 | -const char string_ordinal[] = {0xc2,0xba,0}; // masculine ordinal character, UTF-8 | ||
| 9 | +const char string_ordinal[] = {'\xc2','\xba',0}; // masculine ordinal character, UTF-8 | ||
| 10 | |||
| 11 | |||
| 12 | static Translator* NewTranslator(void) | ||
