git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #28853 from disassembler/espeak

Espeak gcc6 build fixes

commit6443915b07e347baeb3d6953a18204a2406cd9b6 authorJörg Thalheim <Mic92@users.noreply.github.com> dateFri 1 Sep 2017, 16:14 (9 years ago) parent101ccc0b2fd2a8
4 files changed+77−1
pkgs/applications/audio/espeak/default.nix+5−1 pkgs/applications/audio/espeak/edit.nix+2 pkgs/applications/audio/espeak/espeakedit-gcc6.patch+57 pkgs/applications/audio/espeak/gcc6.patch+13
pkgs/applications/audio/espeak/default.nix+5−1
@@ -10,7 +10,11 @@ stdenv.mkDerivation rec {
1010
1111 buildInputs = [ unzip portaudio ];
1212
13− patchPhase = ''
13+ patches = [
14+ ./gcc6.patch
15+ ];
16+
17+ prePatch = ''
1418 sed -e s,/bin/ln,ln,g -i src/Makefile
1519 sed -e 's,^CXXFLAGS=-O2,CXXFLAGS=-O2 -D PATH_ESPEAK_DATA=\\\"$(DATADIR)\\\",' -i src/Makefile
1620 '' + (if portaudio.api_version == 19 then ''
pkgs/applications/audio/espeak/edit.nix+2
@@ -20,9 +20,11 @@ stdenv.mkDerivation rec {
2020 # chmod +w ~/espeak-data
2121
2222 patches = [
23+ ./gcc6.patch
2324 ./espeakedit-fix-makefile.patch
2425 ./espeakedit-configurable-sox-path.patch
2526 ./espeakedit-configurable-path-espeak-data.patch
27+ ./espeakedit-gcc6.patch
2628 ];
2729
2830 postPatch = ''
pkgs/applications/audio/espeak/espeakedit-gcc6.patchnew file+57
@@ -0,0 +1,57 @@
1+diff --git i/src/compiledata.cpp w/src/compiledata.cpp
2+index f1bcb30..30e9e2d 100755
3+--- i/src/compiledata.cpp
4++++ w/src/compiledata.cpp
5+@@ -212,7 +212,7 @@ enum {
6+ kTUNE_SPLIT,
7+ };
8+
9+-static const char utf8_bom[] = {0xef,0xbb,0xbf,0};
10++static const char utf8_bom[] = {char(0xef),char(0xbb),char(0xbf),0};
11+
12+ static keywtab_t k_intonation[] = {
13+ {"tune", 0, kTUNE},
14+diff --git i/src/espeakedit.cpp w/src/espeakedit.cpp
15+index bde03ea..071689d 100755
16+--- i/src/espeakedit.cpp
17++++ w/src/espeakedit.cpp
18+@@ -744,7 +744,7 @@ void MyFrame::OnTools(wxCommandEvent& event)
19+ int debug_flag=0;
20+ char fname_log[sizeof(path_dsource)+12];
21+ char err_fname[sizeof(path_home)+15];
22+- static const char utf8_bom[] = {0xef,0xbb,0xbf,0};
23++ static const char utf8_bom[] = {char(0xef),char(0xbb),char(0xbf),0};
24+
25+ switch(event.GetId())
26+ {
27+diff --git i/src/extras.cpp w/src/extras.cpp
28+index fa6ac3b..ee68f59 100644
29+--- i/src/extras.cpp
30++++ w/src/extras.cpp
31+@@ -335,16 +335,16 @@ void Lexicon_It(int pass)
32+ static const char *vowels1 = "aeiou";
33+ static const char *vowels2 = "aeou";
34+
35+- static const char ex1[] = {'a',0xc3,0xac,0}; // aì
36+- static const char ex2[] = {'e',0xc3,0xac,0}; // eì
37+- static const char ex3[] = {0xc3,0xb9,'a',0}; // ùa
38+- static const char ex4[] = {0xc3,0xb9,'e',0}; // ùe
39+- static const char ex5[] = {0xc3,0xb9,'i',0}; // ùi
40+- static const char ex6[] = {0xc3,0xb9,'o',0}; // ùo
41+- static const char ex7[] = {'c',0xc3,0xac,'a',0}; // cìa
42+- static const char ex8[] = {'c',0xc3,0xac,'o',0}; // cìo
43+- static const char ex9[] = {'c',0xc3,0xac,'u',0}; // cìu
44+- static const char ex10[] = {'g','l',0xc3,0xac,0}; // glì
45++ static const char ex1[] = {'a',char(0xc3),char(0xac),0}; // aì
46++ static const char ex2[] = {'e',char(0xc3),char(0xac),0}; // eì
47++ static const char ex3[] = {char(0xc3),char(0xb9),'a',0}; // ùa
48++ static const char ex4[] = {char(0xc3),char(0xb9),'e',0}; // ùe
49++ static const char ex5[] = {char(0xc3),char(0xb9),'i',0}; // ùi
50++ static const char ex6[] = {char(0xc3),char(0xb9),'o',0}; // ùo
51++ static const char ex7[] = {'c',char(0xc3),char(0xac),'a',0}; // cìa
52++ static const char ex8[] = {'c',char(0xc3),char(0xac),'o',0}; // cìo
53++ static const char ex9[] = {'c',char(0xc3),char(0xac),'u',0}; // cìu
54++ static const char ex10[] = {'g','l',char(0xc3),char(0xac),0}; // glì
55+
56+
57+ static const char *exceptions[] = {ex1, ex2, ex3, ex4, ex5, ex6, ex7, ex8, ex9, ex10, NULL};
pkgs/applications/audio/espeak/gcc6.patchnew file+13
@@ -0,0 +1,13 @@
1+diff --git c/src/tr_languages.cpp i/src/tr_languages.cpp
2+index ec210a5..9503f47 100755
3+--- c/src/tr_languages.cpp
4++++ i/src/tr_languages.cpp
5+@@ -198,7 +198,7 @@ static const unsigned short chars_ignore_zwnj_hyphen[] = {
6+ 0x200d, 1, // zero width joiner
7+ 0, 0 };
8+
9+-const char string_ordinal[] = {0xc2,0xba,0}; // masculine ordinal character, UTF-8
10++const char string_ordinal[] = {char(0xc2),char(0xba),0}; // masculine ordinal character, UTF-8
11+
12+
13+ static Translator* NewTranslator(void)