1 DESCRIPTION = "A free speech synthesis and text-to-speech system"
2 HOMEPAGE = "http://www.cstr.ed.ac.uk/projects/festival/"
3 SECTION = "System/Libraries"
4 LICENSE = "MIT & GPL-2.0+ & TCL"
11 inherit manifest autotools-brokensep
19 #PROVIDES by festival-dev
20 PROVIDES += "festival-dev"
24 #RDEPENDS of festival-dev (${PN}-dev)
25 RDEPENDS_${PN}-dev += "festival"
38 tar -zxf ${S}/packaging/speech_tools-2.1-release.tar.gz
43 tar -zxf ${S}/packaging/festlex_CMU.tar.gz
48 tar -zxf ${S}/packaging/festvox_kallpc16k.tar.gz
53 tar -zxf ${S}/packaging/festlex_POSLEX.tar.gz
55 chmod -Rf a+rX,u+w,g-w,o-w ${S}
56 #setup -q -b 1 -b 2 -b 3 -b 4
57 mv ../festival/lib/* lib/
58 cat ${S}/packaging/festival-1.95-examples.patch | patch -s -p1 --fuzz=2
60 cat ${S}/packaging/festival-text2wave-manpage.patch | patch -s -p1 --fuzz=2
62 cat ${S}/packaging/festival-1.95-libdir.patch | patch -s -p0 --fuzz=2
64 cat ${S}/packaging/festival-1.95-audsp.patch | patch -s -p0 --fuzz=2
66 cat ${S}/packaging/festival-1.96-chroot.patch | patch -s -p0 --fuzz=2
68 cat ${S}/packaging/festival-no-LD_LIBRARY_PATH-extension.patch | patch -s -p1 --fuzz=2
70 cat ${S}/packaging/festival-safe-temp-file.patch | patch -s -p1 --fuzz=2
72 cat ${S}/packaging/festival-use-pacat.patch | patch -s -p1 -b --suffix .use-pacat --fuzz=2
73 #patch7 -p1 -b .use-pacat
75 cat ${S}/packaging/speech_tools-undefined-operation.patch | patch -s -p1 --fuzz=2
77 cat ${S}/packaging/speech_tools-1.2.95-config.patch | patch -s -p0 --fuzz=2
79 cat ${S}/packaging/speech_tools-no-LD_LIBRARY_PATH-extension.patch | patch -s -p1 --fuzz=2
81 cat ${S}/packaging/speech_tools-gcc47.patch | patch -s -p1 --fuzz=2
83 cat ${S}/packaging/festival-1.96-speechtools-shared-build.patch | patch -s -p2 -b --suffix .shared-build --fuzz=2
84 #patch200 -p2 -b .shared-build
85 cat ${S}/packaging/festival-1.96-bettersonamehack.patch | patch -s -p2 -b --suffix .bettersoname --fuzz=2
86 #patch201 -p2 -b .bettersoname
87 cat ${S}/packaging/festival-1.96-main-speech_tools-shared-build.patch | patch -s -p2 -b --suffix .shared --fuzz=2
88 #patch205 -p2 -b .shared
90 cat ${S}/packaging/festival-1.96-main-festival-shared-build.patch | patch -s -p1 -b --suffix .shared --fuzz=2
91 #patch206 -p1 -b .shared
93 cat ${S}/packaging/no-shared-data.patch | patch -s -p1 -b --suffix .no-shared-data --fuzz=2
94 #patch210 -p1 -b .no-shared-data
95 cat ${S}/packaging/festival-1.96-speechtools-linklibswithotherlibs.patch | patch -s -p1 -b --suffix .linklibswithotherlibs --fuzz=2
96 #patch211 -p1 -b .linklibswithotherlibs
101 bb.build.exec_func('do_prep', d)
112 LD_AS_NEEDED=1; export LD_AS_NEEDED ;
116 autotools_do_configure
119 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/speech_tools/lib
120 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/festival-2.1/src/lib
123 ./configure --host=${HOST_SYS} --prefix=${prefix} --libdir=${prefix}/lib --datadir=${prefix}/share/festival --sysconfdir=${sysconfdir}
125 oe_runmake CC="${CC} -fPIC $RPM_OPT_FLAGS" CXX="${CXX} $RPM_OPT_FLAGS -fPIC -Wno-non-template-friend -ffriend-injection -fno-strict-aliasing"
127 oe_runmake CC="${CC} -fPIC $RPM_OPT_FLAGS" CXX="${CXX} $RPM_OPT_FLAGS -fPIC -Wno-non-template-friend -ffriend-injection -fno-strict-aliasing"
134 EXTRA_OECONF += " --prefix=${prefix} --libdir=${prefix}/lib --datadir=${prefix}/share/festival --sysconfdir=${sysconfdir}"
137 export RPM_BUILD_ROOT=${D}
146 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/speech_tools/lib
147 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/festival-2.1/src/lib
150 #make INSTALLED_BIN=%{buildroot}%{_bindir} make_installed_bin_shared
156 BINDIR=${prefix}/bin \
158 rm -f ${D}${infodir}/dir
159 find ${D} -regex ".*\.la$" | xargs rm -f --
160 find ${D} -regex ".*\.a$" | xargs rm -f --
163 install -D bin/text2wave ${D}${prefix}/bin/text2wave
164 install -m 755 src/main/festival ${D}${prefix}/bin/
165 install -m 755 src/main/festival_client ${D}${prefix}/bin/
166 install -m 755 bin/festival_server* ${D}${prefix}/bin/
167 install -m 755 examples/saytime ${D}${prefix}/bin/
169 install -D -m 644 doc/festival.1 ${D}${mandir}/man1/festival.1
170 install -m 644 doc/festival_client.1 ${D}${mandir}/man1/
171 install -m 644 doc/text2wave.1 ${D}${mandir}/man1/
173 install -D lib/festival.scm ${D}${sysconfdir}/festival.scm
174 # install dictionarys
175 install -D lib/dicts/cmu/cmudict-0.4.out ${D}${prefix}/share/festival/dicts/cmu/cmudict-0.4.out
176 install -m 644 lib/dicts/cmu/*.scm ${D}${prefix}/share/festival/dicts/cmu/
177 install -m 644 lib/dicts/wsj.wp39.poslexR ${D}${prefix}/share/festival/dicts/
178 install -m 644 lib/dicts/wsj.wp39.tri.ngrambin ${D}${prefix}/share/festival/dicts/
180 mkdir -p ${D}${prefix}/share/festival/voices/english/kal_diphone/festvox
181 mkdir -p ${D}${prefix}/share/festival/voices/english/kal_diphone/group
182 cp lib/voices/english/kal_diphone/group/* ${D}${prefix}/share/festival/voices/english/kal_diphone/group/
183 cp lib/voices/english/kal_diphone/festvox/*.scm ${D}${prefix}/share/festival/voices/english/kal_diphone/festvox
185 cp lib/*.scm ${D}${prefix}/share/festival/
186 cp lib/*.ngrambin ${D}${prefix}/share/festival/
187 cp lib/*.gram ${D}${prefix}/share/festival/
188 cp lib/*.el ${D}${prefix}/share/festival/
189 install -D lib/etc/unknown_Linux/audsp ${D}${prefix}/lib/festival/audsp
191 install -D src/lib/libFestival.so ${D}${prefix}/lib/libFestival.so
193 mkdir -p ${D}${prefix}/include/
194 install -m 644 src/include/*.h ${D}${prefix}/include/
197 mkdir -p ${D}${prefix}/include/instantiate
198 mkdir -p ${D}${prefix}/include/ling_class
199 mkdir -p ${D}${prefix}/include/rxp
200 mkdir -p ${D}${prefix}/include/sigpr
201 mkdir -p ${D}${prefix}/include/unix
202 install -m 644 include/*h ${D}${prefix}/include
203 install -m 644 include/instantiate/*h ${D}${prefix}/include/instantiate
204 install -m 644 include/ling_class/*h ${D}${prefix}/include/ling_class
205 install -m 644 include/rxp/*h ${D}${prefix}/include/rxp
206 install -m 644 include/sigpr/*h ${D}${prefix}/include/sigpr
207 install -m 644 include/unix/*h ${D}${prefix}/include/unix
208 # make sure we have no static libs, install shared ones
209 install -m 644 lib/lib*.so* ${D}${prefix}/lib
210 rm -f ${D}${prefix}/lib/*.a
212 # install init script
213 # install -m 755 -D %{S:6} %{buildroot}/etc/init.d/%name
214 # install -d %{buildroot}%_sbindir
215 # ln -sf ../../etc/init.d/%name %{buildroot}/usr/sbin/rc%name
216 # installl sysconfig file
217 #install -m 644 -D %{S:5} %{buildroot}/var/adm/fillup-templates/sysconfig.%name
222 pkg_postinst_${PN}() {
225 [ "" != "$D" ] || ldconfig
229 pkg_postinst_${PN}() {
232 [ "" != "$D" ] || ldconfig
239 [ "" != "$D" ] || ldconfig
246 [ "" != "$D" ] || ldconfig
250 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
251 PACKAGES += " festival "
252 PACKAGES += " festival-dev "
255 festival_files += "README INSTALL examples/*.text examples/ex1.* examples/*.scm examples/*.dtd"
256 festival_files += "${sysconfdir}/festival.scm"
257 festival_files += "${prefix}/bin/festival"
258 festival_files += "${prefix}/bin/festival_client"
259 festival_files += "${prefix}/bin/festival_server"
260 festival_files += "${prefix}/bin/festival_server_control"
261 festival_files += "${prefix}/bin/text2wave"
262 festival_files += "${prefix}/bin/saytime"
263 festival_files += "${prefix}/lib/libe*.so.*"
264 festival_files += "${prefix}/lib/libFestival.so"
265 festival_files += "${prefix}/lib/festival"
266 festival_files += "${prefix}/share/festival"
267 festival_files += "${mandir}/man1/*"
269 festival-dev_files = ""
270 festival-dev_files += "${prefix}/include/*"
271 festival-dev_files += "${prefix}/lib/libe*.so"
273 FILES_${PN} = "${festival_files}"
274 FILES_${PN}-dev = "${festival-dev_files}"
276 PKG_festival= "festival"
277 PKG_festival-dev= "festival-dev"
279 require festival-extraconf.inc