From 6c1364712afd2d48173d2e87d49b7cdc6aecda51 Mon Sep 17 00:00:00 2001 From: Samuel Leathers Date: Fri, 1 Sep 2017 10:25:48 -0400 Subject: [PATCH] espeak-classic: fix build with gcc6 --- pkgs/applications/audio/espeak/default.nix | 6 +++++- pkgs/applications/audio/espeak/gcc6.patch | 13 +++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 pkgs/applications/audio/espeak/gcc6.patch diff --git a/pkgs/applications/audio/espeak/default.nix b/pkgs/applications/audio/espeak/default.nix index 0faf4841c71b..6b5101b50b5a 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 000000000000..58036ecbe509 --- /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)