summaryrefslogtreecommitdiff
blob: dafd25e872efa9549671e134aa0a2f1251381964 (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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/speech-tools/speech-tools-1.2.3.ebuild,v 1.1 2003/07/20 03:55:36 jje Exp $

MY_P=${P/-/_}
S=${WORKDIR}/speech_tools
DESCRIPTION="Speech tools for Festival Text to Speech engine"
IUSE=""
HOMEPAGE="http://www.cstr.ed.ac.uk/"
SITE="http://www.cstr.ed.ac.uk/download/festival/1.4.3"
SRC_URI="${SITE}/${MY_P}-release.tar.gz"

SLOT="0"
LICENSE="FESTIVAL BSD as-is"
KEYWORDS="~x86"

RDEPEND="virtual/glibc"

src_unpack() {
	unpack ${A}
	cd ${S}
	epatch ${FILESDIR}/${PN}-gcc3.3.diff
}

src_compile() {

	cd ${S}

	if [ ! -n "`use static`" ]
	then
		pushd ${S}/config
		mv -f config.in config.in.orig
		sed -e 's/# SHARED=1/SHARED=1/' config.in.orig > config.in
		popd
	fi

	pushd ${S}/config/compilers
	mv -f gcc_defaults.mak gcc_defaults.mak.orig
	sed -e 's/-fno-implicit-templates //' gcc_defaults.mak.orig > gcc_defaults.mak
	popd
	
	econf

	make || die

}

src_install() {

	into /usr/lib/speech-tools
	
	if [ -n "`use static`" ]
	then
		cd ${S}/main
		dobin align
		dobin bcat
		dobin ch_lab
		dobin ch_track
		dobin ch_utt
		dobin ch_wave
		dobin design_filter
		dobin dp
		dobin fringe_client
		dobin na_play
		dobin na_record
		dobin ngram_build
		dobin ngram_test
		dobin ols
		dobin ols_test
		dobin pda
		dobin pitchmark
		dobin scfg_make
		dobin scfg_parse
		dobin scfg_test
		dobin scfg_train
		dobin sig2fv
		dobin sigfilter
		dobin spectgen
		dobin siod
		dobin tilt_analysis
		dobin tilt_synthesis
		dobin viterbi
		dobin wagon
		dobin wagon_test
		dobin wfst_build
		dobin wfst_run
		dobin wfst_train
		dobin xml_parser
		cd ${S}/bin
		dobin build_docbook_index
		dobin cxx_to_docbook
		dobin est_examples
		dobin est_gdb
		dobin est_program
		dobin example_to_doc++
		dobin make_wagon_desc
		dobin pm
		dobin raw_to_xgraph
		dobin resynth
		dobin tex_to_images
	else
		cd ${S}/bin
		rm -f Makefile
		dobin *
	fi

	cd ${S}/lib
	if [ ! -n "`use static`" ]
	then
		dolib.so libestbase.so.1.2.3.1
		dosym /usr/lib/speech-tools/lib/libestbase.so.1.2.3.1 /usr/lib/speech-tools/lib/libestbase.so
		dolib.so libeststring.so.1.2
		dosym /usr/lib/speech-tools/lib/libeststring.so.1.2 /usr/lib/speech-tools/lib/libeststring.so
	fi
	dolib.a libestbase.a
	dolib.a libestools.a
	dolib.a libeststring.a

	insinto /usr/lib/speech-tools/lib/siod
	cd ${S}/lib/siod
	doins *
	insinto /usr/share/doc/${PF}/example_data
	cd ${S}/lib/example_data
	doins *

	cd ${S}
	find config -print | cpio -pmd ${D}/usr/lib/speech-tools
	find include -print | cpio -pmd ${D}/usr/lib/speech-tools
	
	insinto /etc/env.d
	doins ${FILESDIR}/58speech-tools
	
	cd ${S}
	dodoc README
	dodoc INSTALL
	cd ${S}/lib
	dodoc cstrutt.dtd
}