NAME="espeak"
VERSION=1.47.11
RELEASE=1
CATEGORY="Audio"
SUMMARY="eSpeak text-to-speech engine"
DESCRIPTION="eSpeak is a compact open source software speech synthesizer for
English and other languages, for Linux and Windows. eSpeak produces good
quality English speech. It uses a different synthesis method from other open
source TTS engines, and sounds quite different."
HOMEPAGE="http://espeak.sourceforge.net/"
SRC_URI="mirror://sourceforge/espeak/espeak-${VERSION}-source.zip"
SRC_DIR="espeak-${VERSION}-source"
PATCH_URI="1.46.01-cygwin.patch"

PKG_NAMES="espeak libespeak1 libespeak-devel"
espeak_CONTENTS="usr/bin/*.exe usr/share/doc/"
libespeak1_CONTENTS="usr/bin/cygespeak-1.dll usr/share/espeak-data/"
libespeak_devel_CONTENTS="usr/include/ usr/lib/"

MAKEOPTS+=" BIN_NAME=speak.exe BIN2_NAME=espeak.exe LIB_NAME=libespeak.dll.a"

src_compile() {
	lndirs
	cd ${B}/src
	rm -f portaudio.h
	cp portaudio{19,}.h
	cygmake AUDIO=runtime
}

src_install() {
	cd ${B}/src
	dobin espeak.exe cygespeak-1.dll
	dolib libespeak.*

	includeinto espeak
	doinclude speak_lib.h

	dodir /usr/share
	cp -r ${S}/espeak-data ${D}/usr/share/
}
DOCS="License.txt ReadMe"
