Source0: http://dl.sourceforge.net/espeak/%{name}-%{version}-source.zip
# Source0-md5: 9a52e2a00354474334adc36fe2fdd4c6
Patch0: %{name}-ac_am.patch
+Patch1: %{name}-sys_includes.patch
URL: http://espeak.sourceforge.net/
BuildRequires: autoconf
BuildRequires: automake
%prep
%setup -q -n %{name}-%{version}-source
-%patch -p1
+%patch0 -p1
+%patch1 -p1
# remove pernicious headers to avoid using them during build instead of /usr/include/portaudio.h system header
rm -f src/portaudio{18,19,}.h
--- /dev/null
+diff -Nur o.speak-1.14-source/src/speak.cpp n.speak-1.14-source/src/speak.cpp
+--- o.speak-1.14-source/src/speak.cpp 2006-09-22 19:17:56.000000000 +0200
++++ n.speak-1.14-source/src/speak.cpp 2006-09-23 21:32:27.000000000 +0200
+@@ -27,7 +27,7 @@
+ #include <time.h>
+ #include <signal.h>
+ #include <locale.h>
+-#include "sys/stat.h"
++#include <sys/stat.h>
+
+ #include "speech.h"
+ #include "voice.h"
+diff -Nur o.speak-1.14-source/src/speak_lib.cpp n.speak-1.14-source/src/speak_lib.cpp
+--- o.speak-1.14-source/src/speak_lib.cpp 2006-09-16 03:59:29.000000000 +0200
++++ n.speak-1.14-source/src/speak_lib.cpp 2006-09-23 21:33:35.000000000 +0200
+@@ -19,14 +19,14 @@
+ ***************************************************************************/
+
+
+-#include "stdio.h"
+-#include "ctype.h"
+-#include "string.h"
+-#include "stdlib.h"
+-#include "wchar.h"
+-#include "locale.h"
++#include <stdio.h>
++#include <ctype.h>
++#include <string.h>
++#include <stdlib.h>
++#include <wchar.h>
++#include <locale.h>
+
+-#include "sys/stat.h"
++#include <sys/stat.h>
+ #ifndef __WIN32__
+ #include <unistd.h>
+ #endif
+diff -Nur o.speak-1.14-source/src/speech.h n.speak-1.14-source/src/speech.h
+--- o.speak-1.14-source/src/speech.h 2006-09-21 20:00:41.000000000 +0200
++++ n.speak-1.14-source/src/speech.h 2006-09-23 19:54:14.000000000 +0200
+@@ -36,7 +36,10 @@
+ #endif
+
+ // will look for espeak_data directory here, and also in user's home directory
++#include "config.h"
++#ifndef PATH_ESPEAK_DATA
+ #define PATH_ESPEAK_DATA "/usr/share/espeak-data"
++#endif
+
+ typedef unsigned short USHORT;
+ typedef unsigned char UCHAR;
+diff -Nur o.speak-1.14-source/src/voices.cpp n.speak-1.14-source/src/voices.cpp
+--- o.speak-1.14-source/src/voices.cpp 2006-09-21 20:00:42.000000000 +0200
++++ n.speak-1.14-source/src/voices.cpp 2006-09-23 21:34:46.000000000 +0200
+@@ -18,15 +18,15 @@
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
+-#include "stdio.h"
+-#include "ctype.h"
+-#include "wctype.h"
+-#include "string.h"
+-#include "stdlib.h"
+-#include "speech.h"
++#include <stdio.h>
++#include <ctype.h>
++#include <wctype.h>
++#include <string.h>
++#include <stdlib.h>
++#include <speech.h>
+
+ #ifndef PLATFORM_RISCOS
+-#include "dirent.h"
++#include <dirent.h>
+ #endif
+
+ #include "voice.h"
+diff -Nur o.speak-1.14-source/src/wavegen.cpp n.speak-1.14-source/src/wavegen.cpp
+--- o.speak-1.14-source/src/wavegen.cpp 2006-09-21 20:00:42.000000000 +0200
++++ n.speak-1.14-source/src/wavegen.cpp 2006-09-23 21:35:11.000000000 +0200
+@@ -33,7 +33,7 @@
+ #include "synthesize.h"
+
+ #ifdef USE_PORTAUDIO
+-#include "portaudio.h"
++#include <portaudio.h>
+ #undef USE_PORTAUDIO
+ // determine portaudio version by looking for a #define which is not in V18
+ #ifdef paNeverDropInput