summary refs log tree commit diff
path: root/pkgs/applications/audio/espeak
diff options
context:
space:
mode:
authorSamuel Leathers <sam@appliedtrust.com>2017-09-01 10:25:48 -0400
committerSamuel Leathers <sam@appliedtrust.com>2017-09-01 10:46:48 -0400
commit6c1364712afd2d48173d2e87d49b7cdc6aecda51 (patch)
treeb8293a0e9133e8661e8f8579075dc6543523efd6 /pkgs/applications/audio/espeak
parentb2e7e231ec3ec67545aa9ace003973543dedb801 (diff)
downloadnixpkgs-6c1364712afd2d48173d2e87d49b7cdc6aecda51.tar
nixpkgs-6c1364712afd2d48173d2e87d49b7cdc6aecda51.tar.gz
nixpkgs-6c1364712afd2d48173d2e87d49b7cdc6aecda51.tar.bz2
nixpkgs-6c1364712afd2d48173d2e87d49b7cdc6aecda51.tar.lz
nixpkgs-6c1364712afd2d48173d2e87d49b7cdc6aecda51.tar.xz
nixpkgs-6c1364712afd2d48173d2e87d49b7cdc6aecda51.tar.zst
nixpkgs-6c1364712afd2d48173d2e87d49b7cdc6aecda51.zip
espeak-classic: fix build with gcc6
Diffstat (limited to 'pkgs/applications/audio/espeak')
-rw-r--r--pkgs/applications/audio/espeak/default.nix6
-rw-r--r--pkgs/applications/audio/espeak/gcc6.patch13
2 files changed, 18 insertions, 1 deletions
diff --git a/pkgs/applications/audio/espeak/default.nix b/pkgs/applications/audio/espeak/default.nix
index 0faf4841c71..6b5101b50b5 100644
--- a/pkgs/applications/audio/espeak/default.nix
+++ b/pkgs/applications/audio/espeak/default.nix
@@ -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 ''
diff --git a/pkgs/applications/audio/espeak/gcc6.patch b/pkgs/applications/audio/espeak/gcc6.patch
new file mode 100644
index 00000000000..58036ecbe50
--- /dev/null
+++ b/pkgs/applications/audio/espeak/gcc6.patch
@@ -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)