Skip to content

Commit

Permalink
espeak-classic: fix build with gcc6
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Leathers committed Sep 1, 2017
1 parent b2e7e23 commit 6c13647
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkgs/applications/audio/espeak/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ stdenv.mkDerivation rec {

buildInputs = [ unzip portaudio ];

patchPhase = ''
patches = [
./gcc6.patch
];

prePatch = ''
sed -e s,/bin/ln,ln,g -i src/Makefile
sed -e 's,^CXXFLAGS=-O2,CXXFLAGS=-O2 -D PATH_ESPEAK_DATA=\\\"$(DATADIR)\\\",' -i src/Makefile
'' + (if portaudio.api_version == 19 then ''
Expand Down
13 changes: 13 additions & 0 deletions pkgs/applications/audio/espeak/gcc6.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git c/src/tr_languages.cpp i/src/tr_languages.cpp
index ec210a5..9503f47 100755
--- c/src/tr_languages.cpp
+++ i/src/tr_languages.cpp
@@ -198,7 +198,7 @@ static const unsigned short chars_ignore_zwnj_hyphen[] = {
0x200d, 1, // zero width joiner
0, 0 };

-const char string_ordinal[] = {0xc2,0xba,0}; // masculine ordinal character, UTF-8
+const char string_ordinal[] = {char(0xc2),char(0xba),0}; // masculine ordinal character, UTF-8


static Translator* NewTranslator(void)

0 comments on commit 6c13647

Please sign in to comment.