summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-08-23 10:15:59 -0700
committerKhem Raj <raj.khem@gmail.com>2018-08-24 08:58:13 -0700
commit62489d5a61124625809f7eeb1210ac1e1f51815d (patch)
treedf84cdc16fe8c421b48dacd59886da3ddba9f70c /meta-oe/recipes-support
parent093ab607cae3dc0cbed92ca07d603a79d14d1403 (diff)
downloadmeta-openembedded-62489d5a61124625809f7eeb1210ac1e1f51815d.tar.gz
espeak: Add -fPIC to CFLAGS needed on some arches with security flags on
Update the narrowing fix patches from Fedora Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support')
-rw-r--r--meta-oe/recipes-support/espeak/espeak-data_1.48.04.bb2
-rw-r--r--meta-oe/recipes-support/espeak/espeak.inc3
-rw-r--r--meta-oe/recipes-support/espeak/files/0001-Fix-build-of-shared-library-on-architectures-needing.patch31
-rw-r--r--meta-oe/recipes-support/espeak/files/espeak-1.48-gcc-6-fix.patch12
-rw-r--r--meta-oe/recipes-support/espeak/files/gcc-narrowing-warning-fix.patch56
5 files changed, 46 insertions, 58 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
index 79b2cc1f4..a4e5d14d1 100644
--- a/meta-oe/recipes-support/espeak/espeak-data_1.48.04.bb
+++ b/meta-oe/recipes-support/espeak/espeak-data_1.48.04.bb
@@ -14,7 +14,7 @@ do_compile() {
14 sed -i '/^ *CC *=/d' Makefile 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 15 sed -i 's/\(.*BYTE_ORDER\)/#undef BYTE_ORDER\n#define BYTE_ORDER BIG_ENDIAN\n\1/' espeak-phoneme-data.c
16 oe_runmake 16 oe_runmake
17 ./espeak-phoneme-data "${S}/espeak-data" 17 ./espeak-phoneme-data "${S}/espeak-data" "." "${S}/espeak-data/phondata-manifest"
18 cp -f phondata phonindex phontab "${S}/espeak-data" 18 cp -f phondata phonindex phontab "${S}/espeak-data"
19} 19}
20 20
diff --git a/meta-oe/recipes-support/espeak/espeak.inc b/meta-oe/recipes-support/espeak/espeak.inc
index 60b3f73c8..f45455c7e 100644
--- a/meta-oe/recipes-support/espeak/espeak.inc
+++ b/meta-oe/recipes-support/espeak/espeak.inc
@@ -4,7 +4,8 @@ LICENSE = "GPLv3"
4LIC_FILES_CHKSUM = "file://License.txt;md5=cb7a20edb4c9f5f478de6523dcd7362c" 4LIC_FILES_CHKSUM = "file://License.txt;md5=cb7a20edb4c9f5f478de6523dcd7362c"
5 5
6SRC_URI = "http://downloads.sourceforge.net/espeak/espeak-1.48.04-source.zip \ 6SRC_URI = "http://downloads.sourceforge.net/espeak/espeak-1.48.04-source.zip \
7 file://gcc-narrowing-warning-fix.patch \ 7 file://0001-Fix-build-of-shared-library-on-architectures-needing.patch \
8 file://espeak-1.48-gcc-6-fix.patch \
8" 9"
9SRC_URI[md5sum] = "cadd7482eaafe9239546bdc09fa244c3" 10SRC_URI[md5sum] = "cadd7482eaafe9239546bdc09fa244c3"
10SRC_URI[sha256sum] = "bf9a17673adffcc28ff7ea18764f06136547e97bbd9edf2ec612f09b207f0659" 11SRC_URI[sha256sum] = "bf9a17673adffcc28ff7ea18764f06136547e97bbd9edf2ec612f09b207f0659"
diff --git a/meta-oe/recipes-support/espeak/files/0001-Fix-build-of-shared-library-on-architectures-needing.patch b/meta-oe/recipes-support/espeak/files/0001-Fix-build-of-shared-library-on-architectures-needing.patch
new file mode 100644
index 000000000..2590e1584
--- /dev/null
+++ b/meta-oe/recipes-support/espeak/files/0001-Fix-build-of-shared-library-on-architectures-needing.patch
@@ -0,0 +1,31 @@
1From 08a464e2b6bd31bb2bf4e258ebfa9b9d65805abf Mon Sep 17 00:00:00 2001
2From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3Date: Fri, 27 Nov 2015 15:17:02 +0100
4Subject: [PATCH] Fix build of shared library on architectures needing -fPIC
5
6Certain architectures, like Sparc and Sparc64 require objects to be
7built with -fPIC (and not just -fpic) to be usable in shared
8libraries. On other architectures, -fPIC is the same as -fpic so this
9patch doesn't affect such architectures.
10
11Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
12---
13 src/Makefile | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/src/Makefile b/src/Makefile
17index 95fe549..c293611 100755
18--- a/src/Makefile
19+++ b/src/Makefile
20@@ -110,7 +110,7 @@ $(BIN2_NAME): $(OBJS3) $(LIB_NAME)
21
22
23 x_%.o: %.cpp
24- $(CXX) $(CXXFLAGS) $(USE_AUDIO) -D PATH_ESPEAK_DATA=\"$(DATADIR)\" -Wall -fpic -fvisibility=hidden -pedantic \
25+ $(CXX) $(CXXFLAGS) $(USE_AUDIO) -D PATH_ESPEAK_DATA=\"$(DATADIR)\" -Wall -fPIC -fvisibility=hidden -pedantic \
26 -I. -D LIBRARY -c -fno-exceptions $< -o x_$*.o
27
28 $(LIB_NAME): $(OBJS2)
29--
302.6.3
31
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
new file mode 100644
index 000000000..6e59c7892
--- /dev/null
+++ b/meta-oe/recipes-support/espeak/files/espeak-1.48-gcc-6-fix.patch
@@ -0,0 +1,12 @@
1diff --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)
diff --git a/meta-oe/recipes-support/espeak/files/gcc-narrowing-warning-fix.patch b/meta-oe/recipes-support/espeak/files/gcc-narrowing-warning-fix.patch
deleted file mode 100644
index 2a9b4607d..000000000
--- a/meta-oe/recipes-support/espeak/files/gcc-narrowing-warning-fix.patch
+++ /dev/null
@@ -1,56 +0,0 @@
1From f09c83640b9173552fd9277c3a48619b903fa436 Mon Sep 17 00:00:00 2001
2From: "Reece H. Dunn" <msclrhd@gmail.com>
3Date: Wed, 20 Jan 2016 20:48:29 +0000
4Subject: [PATCH] Fix GCC -Wnarrowing warnings.
5
6---
7 src/tr_languages.cpp | 7 ++++---
8 src/translate.h | 2 +-
9 2 files changed, 5 insertions(+), 4 deletions(-)
10
11Index: espeak-1.48.04-source/src/tr_languages.cpp
12===================================================================
13--- espeak-1.48.04-source.orig/src/tr_languages.cpp
14+++ espeak-1.48.04-source/src/tr_languages.cpp
15@@ -198,8 +198,8 @@ static const unsigned short chars_ignore
16 0x200d, 1, // zero width joiner
17 0, 0 };
18
19-const char string_ordinal[] = {0xc2,0xba,0}; // masculine ordinal character, UTF-8
20-
21+const unsigned char string_ordinal[] = {0xc2,0xba,0}; // masculine ordinal character, UTF-8
22+const unsigned char utf8_null[] = { 0 }; // null string, UTF-8
23
24 static Translator* NewTranslator(void)
25 {//===================================
26@@ -296,7 +296,7 @@ static const char transpose_map_latin[]
27 tr->langopts.replace_chars = NULL;
28 tr->langopts.ascii_language[0] = 0; // Non-Latin alphabet languages, use this language to speak Latin words, default is English
29 tr->langopts.alt_alphabet_lang = L('e','n');
30- tr->langopts.roman_suffix = "";
31+ tr->langopts.roman_suffix = utf8_null;
32
33 SetLengthMods(tr,201);
34 // tr->langopts.length_mods = length_mods_en;
35@@ -758,7 +758,7 @@ Translator *SelectTranslator(const char
36 tr->langopts.stress_flags = S_FINAL_SPANISH | S_FINAL_DIM_ONLY | S_FINAL_NO_2;
37 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;
38 tr->langopts.numbers2 = NUM2_ORDINAL_NO_AND;
39- tr->langopts.roman_suffix = string_ordinal;
40+ tr->langopts.roman_suffix = utf8_null;
41 }
42 else
43 if(name2 == L_pap)
44Index: espeak-1.48.04-source/src/translate.h
45===================================================================
46--- espeak-1.48.04-source.orig/src/translate.h
47+++ espeak-1.48.04-source/src/translate.h
48@@ -545,7 +545,7 @@ typedef struct {
49 int decimal_sep;
50 int max_digits; // max number of digits which can be spoken as an integer number (rather than individual digits)
51 const char *ordinal_indicator; // UTF-8 string
52- const char *roman_suffix; // add this (ordinal) suffix to Roman numbers (LANG=an)
53+ const unsigned char *roman_suffix; // add this (ordinal) suffix to Roman numbers (LANG=an)
54
55 // bit 0, accent name before the letter name, bit 1 "capital" after letter name
56 int accents;