summaryrefslogtreecommitdiff
blob: 7169c77753790244b49988c657a977ab6ae39bfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# /space/gentoo/cvsroot/gentoo-x86/media-sound/festival/festival-1.4.2.ebuild,v
# 1.6 2002/05/07 03:58:19 naz Exp $

S=${WORKDIR}/${PN}
T=${WORKDIR}/speech_tools
DESCRIPTION="Festival Test to Speech engine"
SITE="http://www.speech.cs.cmu.edu/${PN}/cstr/${PN}/${PV}"
SRC_URI="${SITE}/${P}-release.tar.gz
	${SITE}/festlex_CMU.tar.gz
	${SITE}/festlex_OALD.tar.gz
	${SITE}/festlex_POSLEX.tar.gz
	${SITE}/festvox_don.tar.gz
	${SITE}/festvox_ellpc11k.tar.gz
	${SITE}/festvox_kallpc16k.tar.gz
	${SITE}/festvox_kedlpc16k.tar.gz
	${SITE}/festvox_rablpc16k.tar.gz
	${SITE}/festvox_us1.tar.gz
	${SITE}/festvox_us2.tar.gz
	${SITE}/festvox_us3.tar.gz
	${SITE}/speech_tools-1.2.2-release.tar.gz
	http://www.ibiblio.org/gentoo/distfiles/festival-1.4.2-patch.tar.bz2"

HOMEPAGE="http://www.cstr.ed.ac.uk/"
	
src_compile() {
	cd ${T}
	econf || die
	patch -p1 < ${WORKDIR}/speech_tools.patch || die
	
	make || die

	cd ${S}
	econf || die
	patch -p1 < ${WORKDIR}/festival.patch || die
	
	make || die

	# Need to fix saytime to look for festival in the correct spot
	cp examples/saytime examples/saytime.orig
	sed "s:${WORKDIR}/festival/bin/festival:/usr/bin/festival:" \
		examples/saytime.orig > examples/saytime

	# And do the same thing for text2wave
	cp bin/text2wave bin/text2wave.orig
	sed "s:${WORKDIR}/festival/bin/festival:/usr/bin/festival:" \
		bin/text2wave.orig > bin/text2wave
}

src_install () {

	. install.sh || die
	
	# Install the docs
	dodoc ACKNOWLEDGMENTS COPYING NEWS README

}

pkg_postinst() {

	echo
	echo '#########################################################'
	echo '#                                                       #'
	echo '#     To test festival, simply type:                    #'
	echo '#         "saytime"                                     #'
	echo '#                                                       #'
	echo '#     Or for something more fun:                        #'
	echo '#         "echo "Gentoo can speak" | festival --tts"    #'
	echo '#                                                       #'
	echo '#########################################################'
	echo

}