summaryrefslogtreecommitdiff
path: root/extra/festival
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/festival
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/festival')
-rw-r--r--extra/festival/PKGBUILD119
-rw-r--r--extra/festival/festconfig.patch84
-rw-r--r--extra/festival/speechconfig.patch132
3 files changed, 335 insertions, 0 deletions
diff --git a/extra/festival/PKGBUILD b/extra/festival/PKGBUILD
new file mode 100644
index 000000000..755dc23a1
--- /dev/null
+++ b/extra/festival/PKGBUILD
@@ -0,0 +1,119 @@
+# $Id: PKGBUILD 102549 2010-12-08 06:43:53Z schiv $
+# Maintainer:
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Simo Leone <neotuli@gmail.com>
+
+pkgname=festival
+pkgver=2.1
+_suffix=release
+pkgrel=1
+pkgdesc="A general multi-lingual speech synthesis system"
+arch=('i686' 'x86_64')
+url="http://www.cstr.ed.ac.uk/projects/festival/"
+license=('BSD' 'GPL' 'custom')
+depends=('perl')
+options=('!makeflags')
+source=("http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/${pkgname}-${pkgver}-${_suffix}.tar.gz"
+ "http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/speech_tools-${pkgver}-${_suffix}.tar.gz"
+ "http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/festlex_CMU.tar.gz"
+ "http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/festlex_OALD.tar.gz"
+ "http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/festlex_POSLEX.tar.gz"
+ 'speechconfig.patch'
+ 'festconfig.patch')
+md5sums=('c93eb3e389ed171ab9abd46afe8897a8'
+ '6920ddc75b042910a3bcfee3ab106938'
+ '6a2ee4fed7c3ebedf197a3b8524ccb87'
+ '84af32a914d996f57bc4cb36fe8cdc97'
+ 'aa80f9250065b318325f16fdad3a4484'
+ '550abd77dc20e444673d6ecf87a60fe9'
+ '348cc033430aee7989463198818ae74c')
+
+build() {
+ # Build Speech Tools first
+ cd $srcdir/speech_tools
+ patch -Np1 -i $srcdir/speechconfig.patch
+
+ ./configure --prefix=/usr --sysconfdir=/etc
+ make OPTIMISE_CXXFLAGS="${CXXFLAGS}" OPTIMISE_CCFLAGS="${CFLAGS}"
+
+ # Build Festival itself
+ cd $srcdir/festival
+ patch -Np1 -i $srcdir/festconfig.patch
+
+ # Aviod make failure on making scripts and docs
+ sed -i "s#examples bin doc#examples#" Makefile
+
+ ./configure --prefix=/usr --sysconfdir=/etc
+ make OPTIMISE_CXXFLAGS="${CXXFLAGS}" OPTIMISE_CCFLAGS="${CFLAGS}"
+}
+
+package() {
+ # Install Speech Tools first
+ cd $srcdir/speech_tools
+ install -dm755 $pkgdir/usr/{bin,lib,include/speech_tools/{,instantiate,ling_class,rxp,sigpr,unix}}
+
+ #binaries
+ #move binaries over wrappers (FS#7864)
+ for i in `grep -l 'EST shared script' bin/*`; do
+ cp -f main/$(basename $i) bin;
+ done
+ install -m755 -t $pkgdir/usr/bin bin/[a-z]*
+ rm -f $pkgdir/usr/bin/{est_gdb,est_examples,est_program}
+
+ #libraries
+ install -m755 -t $pkgdir/usr/lib lib/lib*.so.*
+ ln -sf libestbase.so.${pkgver}.1 $pkgdir/usr/lib/libestbase.so
+ ln -sf libeststring.so.1.2 $pkgdir/usr/lib/libeststring.so
+ install -m644 -t $pkgdir/usr/lib lib/lib*.a
+
+ #headers
+ for dir in {.,instantiate,ling_class,rxp,sigpr,unix}; do
+ install -m644 -t ${pkgdir}/usr/include/speech_tools/$dir include/$dir/*.h
+ done
+
+ # Install Festival itself
+ cd $srcdir/festival
+
+ #binaries
+ install -m755 src/main/festival $pkgdir/usr/bin/
+ install -m755 src/main/festival_client $pkgdir/usr/bin/
+ install -m755 examples/text2wave $pkgdir/usr/bin
+ install -m755 examples/saytime $pkgdir/usr/bin/
+
+ #libraries
+ install -m644 src/lib/libFestival.a $pkgdir/usr/lib/
+
+ #headers
+ install -dm755 $pkgdir/usr/include/festival
+ install -m644 -t $pkgdir/usr/include/festival src/include/*.h
+
+ mkdir -p $pkgdir/usr/share/festival
+ #install -m644 -t $pkgdir/usr/share/festival lib/*.scm
+ #need to clean up but requires knowing which files are actually needed...
+ cp -aR lib/* $pkgdir/usr/share/festival
+ rm -f $(find $pkgdir/usr/share/festival -name Makefile)
+
+ #create voices directory
+ install -dm755 $pkgdir/usr/share/festival/voices
+
+ #licenses
+ install -D -m644 $srcdir/festival/COPYING \
+ $pkgdir/usr/share/licenses/$pkgname/LICENSE
+ install -D -m644 $srcdir/speech_tools/README \
+ $pkgdir/usr/share/licenses/$pkgname/LICENSE.other
+
+ #################################################################
+ # Ok now some general cleanups
+ for i in `find $pkgdir/usr/include/ -type f`; do
+ sed -i -e 's,"EST.*\.h",\<speech_tools/&\>,g' -e 's,speech_tools/\",speech_tools/,g' \
+ -e 's,"siod.*\.h",\<speech_tools/&\>,g' -e 's,speech_tools/\",speech_tools/,g' \
+ -e 's,"instantiate/.*\.h",\<speech_tools/&\>,g' -e 's,speech_tools/instantiate/\",speech_tools/instantiate/,g' -e 's,"instantiate,instantiate,g' \
+ -e 's,"ling_class/.*\.h",\<speech_tools/&\>,g' -e 's,speech_tools/ling_class/\",speech_tools/ling_class/,g' -e 's,"ling_class,ling_class,g'\
+ -e 's,"rxp/.*\.h",\<speech_tools/&\>,g' -e 's,speech_tools/rxp/\",speech_tools/rxp/,g' -e 's,"rxp,rxp,g' \
+ -e 's,"sigpr/.*\.h",\<speech_tools/&\>,g' -e 's,speech_tools/sigpr/\",speech_tools/sigpr/,g' -e 's,"sigpr,sigpr,g' \
+ -e 's,"unix/.*\.h",\<speech_tools/&\>,g' -e 's,speech_tools/unix/\",speech_tools/unix/,g' -e 's,\.h\">,.h\>,g' -e 's,"unix,unix,g' \
+ -e 's,"festival\.h",\<festival/festival.h\>,g' \
+ -e 's,"ModuleDescription\.h",\<festival/ModuleDescription.h\>,g' \
+ -e 's,"Phone\.h",\<festival/Phone.h\>,g' $i
+ done
+}
diff --git a/extra/festival/festconfig.patch b/extra/festival/festconfig.patch
new file mode 100644
index 000000000..5b39a854f
--- /dev/null
+++ b/extra/festival/festconfig.patch
@@ -0,0 +1,84 @@
+diff -Nru festival.orig/config/config.in festival/config/config.in
+--- festival.orig/config/config.in 2004-06-21 15:52:42.000000000 -0500
++++ festival/config/config.in 2005-05-30 19:50:45.000000000 -0500
+@@ -20,7 +20,7 @@
+ ## You may need to set this explicitly if automounter or NFS
+ ## side effects cause problems
+
+-FESTIVAL_HOME := $(shell (cd $(TOP); pwd))
++FESTIVAL_HOME := /usr
+
+ ###########################################################################
+ ## Feature selection.
+diff -Nru festival.orig/config/project.mak festival/config/project.mak
+--- festival.orig/config/project.mak 2004-07-12 10:39:37.000000000 -0500
++++ festival/config/project.mak 2005-05-30 19:50:45.000000000 -0500
+@@ -112,6 +112,5 @@
+ DOCXX_DIRS = $(TOP)/src
+ MODULE_TO_DOCXX = perl $(TOP)/src/modules/utilities/extract_module_doc++.prl
+
+-FTLIBDIR = $(FESTIVAL_HOME)/lib
+-
++FTLIBDIR = /usr/share/festival
+
+diff -Nru festival.orig/config/systems/Linux.mak festival/config/systems/Linux.mak
+--- festival.orig/config/systems/Linux.mak 2001-04-04 06:55:32.000000000 -0500
++++ festival/config/systems/Linux.mak 2005-05-30 19:51:28.000000000 -0500
+@@ -40,13 +40,13 @@
+
+ include $(EST)/config/systems/default.mak
+
+-DEFAULT_JAVA_HOME=/usr/lib/jdk-1.1.6
++DEFAULT_JAVA_HOME=/usr/lib/jvm/java-6-openjdk
+ JAVA=/usr/bin/java
+ JAVAC=/usr/bin/javac
+ JAVAH=/usr/bin/javah
+
+ TCL_LIBRARY = -ltcl
+-OS_LIBS = -ldl
++OS_LIBS = -ldl -lncurses
+
+ ## the native audio module for this type of system
+ NATIVE_AUDIO_MODULE = LINUX16
+diff -Nru festival.orig/config/systems/default.mak festival/config/systems/default.mak
+--- festival.orig/config/systems/default.mak 2001-04-04 06:55:32.000000000 -0500
++++ festival/config/systems/default.mak 2005-05-30 19:50:45.000000000 -0500
+@@ -40,7 +40,7 @@
+ ###########################################################################
+ ## Installation directories
+
+-INSTALL_PREFIX=/usr/local
++INSTALL_PREFIX=/usr
+
+ BINDIR=$(INSTALL_PREFIX)/bin
+ LIBDIR=$(INSTALL_PREFIX)/lib
+@@ -63,8 +63,8 @@
+ ###########################################################################
+ ## Where to find Enlightenment Speech Demon
+
+-ESD_INCLUDE = /usr/local/include
+-ESD_LIB = /usr/local/lib
++ESD_INCLUDE = /usr/include
++ESD_LIB = /usr/lib
+
+ ###########################################################################
+ ## Where to find X11
+@@ -75,14 +75,14 @@
+ ###########################################################################
+ ## TCL support
+
+-TCL_INCLUDE = /usr/local/include
+-TCL_LIB = /usr/local/lib
+-TCL_LIBRARY = -ltcl7.6
++TCL_INCLUDE = /usr/include
++TCL_LIB = /usr/lib
++TCL_LIBRARY = -ltcl
+
+ ###########################################################################
+ ## Efence library for malloc debugging
+
+-EFENCE_LIB = /usr/local/lib
++EFENCE_LIB = /usr/lib
+
+ ###########################################################################
+ ## Commands.
diff --git a/extra/festival/speechconfig.patch b/extra/festival/speechconfig.patch
new file mode 100644
index 000000000..f77b614e9
--- /dev/null
+++ b/extra/festival/speechconfig.patch
@@ -0,0 +1,132 @@
+diff -aur speech_tools.old//config/compilers/jdk.mak speech_tools/config/compilers/jdk.mak
+--- speech_tools.old//config/compilers/jdk.mak 2001-04-04 19:55:32.000000000 +0800
++++ speech_tools/config/compilers/jdk.mak 2010-12-08 12:14:56.076668109 +0800
+@@ -52,7 +52,7 @@
+ endif
+ endif
+
+-JAVAFLAGS = -depend
++JAVAFLAGS =
+
+ DEBUG_JAVAFLAGS = -g
+
+diff -aur speech_tools.old//config/config.in speech_tools/config/config.in
+--- speech_tools.old//config/config.in 2008-10-29 03:20:49.000000000 +0800
++++ speech_tools/config/config.in 2010-12-08 12:17:50.110001443 +0800
+@@ -15,7 +15,7 @@
+ ## You may need to set this explicitly if automounter or NFS
+ ## side effects cause problems
+
+-EST_HOME := $(shell (cd $(EST); pwd))
++EST_HOME := /usr
+
+ ###########################################################################
+ ## System type.
+@@ -28,14 +28,14 @@
+ ##
+ ## Examples: sparc_SunOS5 intel_Linux2.0
+
+-SYSTEM_TYPE=$(MACHINETYPE)_$(OSTYPE)$(OSREV)
++SYSTEM_TYPE=Linux
+
+ ###########################################################################
+ ## Compiler.
+ ## The definitions are in compilers/$(COMPILER).mak
+ ## Examples: gcc suncc egcs gcc28
+
+-COMPILER=@COMPILERTYPE@
++COMPILER=gcc
+
+ ###########################################################################
+ ## Java system to use if you include the Java interface.
+@@ -61,7 +61,7 @@
+ # VERBOSE=1
+ #DEBUG=1
+ # PROFILE=gprof
+-#SHARED=2
++SHARED=1
+
+ ## Directory specific selections which override the above
+
+@@ -98,7 +98,7 @@
+ ## It may not work under all systems, so may be optionally omitted.
+ INCLUDE_MODULES += EDITLINE
+
+-TERMCAPLIB = @TERMCAPLIB@
++TERMCAPLIB =
+ # speech recognition
+ #INCLUDE_MODULES += ASR
+
+@@ -169,8 +169,8 @@
+ CONFIG_WRAPPER_LANGUAGES = PYTHON PERL5
+
+ # Language specific includes should be set to correct site paths
+-CONFIG_PYTHON_INCLUDES= -I/usr/include/python2.2/
+-CONFIG_PERL_INCLUDES= -I/usr/lib/perl5/5.8.3/i386-linux-thread-multi/CORE/
++CONFIG_PYTHON_INCLUDES= -I/usr/include/python2.7/
++CONFIG_PERL_INCLUDES= -I/usr/lib/perl5/core_perl/CORE/
+ #OR OLD#CONFIG_PERL_INCLUDES= -I/usr/lib/perl5/5.6.1/i386-linux/CORE/
+ ##
+ ###################################################################
+Only in speech_tools/config: config.in.orig
+diff -aur speech_tools.old//config/systems/default.mak speech_tools/config/systems/default.mak
+--- speech_tools.old//config/systems/default.mak 2005-07-17 21:06:49.000000000 +0800
++++ speech_tools/config/systems/default.mak 2010-12-08 12:14:56.076668109 +0800
+@@ -40,7 +40,7 @@
+ ###########################################################################
+ ## Installation directories
+
+-INSTALL_PREFIX=/usr/local
++INSTALL_PREFIX=/usr
+
+ BINDIR=$(INSTALL_PREFIX)/bin
+ LIBDIR=$(INSTALL_PREFIX)/lib
+@@ -63,8 +63,8 @@
+ ###########################################################################
+ ## Where to find Enlightenment Speech Demon
+
+-ESD_INCLUDE = /usr/local/include
+-ESD_LIB = /usr/local/lib
++ESD_INCLUDE = /usr/include
++ESD_LIB = /usr/lib
+
+ ###########################################################################
+ ## Where to find X11
+@@ -75,14 +75,14 @@
+ ###########################################################################
+ ## TCL support
+
+-TCL_INCLUDE = /usr/local/include
+-TCL_LIB = /usr/local/lib
+-TCL_LIBRARY = -ltcl7.6
++TCL_INCLUDE = /usr/include
++TCL_LIB = /usr/lib
++TCL_LIBRARY = -ltcl
+
+ ###########################################################################
+ ## Efence library for malloc debugging
+
+-EFENCE_LIB = /usr/local/lib
++EFENCE_LIB = /usr/lib
+
+ ###########################################################################
+ ## Commands.
+diff -aur speech_tools.old//config/systems/Linux.mak speech_tools/config/systems/Linux.mak
+--- speech_tools.old//config/systems/Linux.mak 2001-04-04 19:55:32.000000000 +0800
++++ speech_tools/config/systems/Linux.mak 2010-12-08 12:14:56.076668109 +0800
+@@ -40,13 +40,13 @@
+
+ include $(EST)/config/systems/default.mak
+
+-DEFAULT_JAVA_HOME=/usr/lib/jdk-1.1.6
++DEFAULT_JAVA_HOME=/usr/lib/jvm/java-6-openjdk
+ JAVA=/usr/bin/java
+ JAVAC=/usr/bin/javac
+ JAVAH=/usr/bin/javah
+
+ TCL_LIBRARY = -ltcl
+-OS_LIBS = -ldl
++OS_LIBS = -ldl -lncurses
+
+ ## the native audio module for this type of system
+ NATIVE_AUDIO_MODULE = LINUX16