espeak: fix package for gcc6

Signed-off-by: Derek Straka <derek@asterius.io>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
Derek Straka 2016-08-10 10:26:41 -04:00 committed by Martin Jansa
parent 42dd9f3f1b
commit f1dcff4448
3 changed files with 21 additions and 4 deletions

View File

@ -3,7 +3,8 @@ SECTION = "base"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://License.txt;md5=cb7a20edb4c9f5f478de6523dcd7362c"
SRC_URI = "${SOURCEFORGE_MIRROR}/espeak/espeak-${PV}-source.zip"
SRC_URI = "${SOURCEFORGE_MIRROR}/espeak/espeak-${PV}-source.zip \
file://fix-gcc6-errors.patch"
S = "${WORKDIR}/espeak-${PV}-source"

View File

@ -42,6 +42,3 @@ do_install() {
cp -prf ${S}/espeak-data/* ${D}${datadir}/espeak-data
chown -R root:root ${D}${datadir}/espeak-data
}
# http://errors.yoctoproject.org/Errors/Details/68663/
PNBLACKLIST[espeak] ?= "BROKEN: fails to build with gcc-6"

View File

@ -0,0 +1,19 @@
Fix gcc6 errors with narrowing
| tr_languages.cpp:462:73: error: narrowing conversion of '171' from 'int' to 'char' inside { } [-Wnarrowing]
| static const char ko_voiced[] = {0x02,0x05,0x06,0xab,0xaf,0xb7,0xbc,0}; // voiced consonants, l,m,n,N
Upstream-Status: Backport
Signed-off-by: Derek Straka <derek@asterius.io>
--- a/src/tr_languages.cpp
+++ b/src/tr_languages.cpp
@@ -459,7 +459,7 @@
case L('k','o'): // Korean, TEST
{
static const char ko_ivowels[] = {0x63,0x64,0x67,0x68,0x6d,0x72,0x74,0x75,0}; // y and i vowels
- static const char ko_voiced[] = {0x02,0x05,0x06,0xab,0xaf,0xb7,0xbc,0}; // voiced consonants, l,m,n,N
+ static const char ko_voiced[] = {0x02,0x05,0x06,(char)0xab,(char)0xaf,(char)0xb7,(char)0xbc,0}; // voiced consonants, l,m,n,N
tr = new Translator();
tr->letter_bits_offset = OFFSET_KOREAN;