summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorLubosz Sarnecki2016-02-05 00:37:59 +0100
committerLubosz Sarnecki2016-02-05 02:11:47 +0100
commita4f17c532c5e80b38b34530c5cc96484ba4f6462 (patch)
tree8c619f5c2932fcf3da8ef82337a809c1df1325b0 /PKGBUILD
downloadaur-festival-ims.tar.gz
copy festival package patch with IMS stuff
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD155
1 files changed, 155 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c56c4b42fbb7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,155 @@
+# $Id: PKGBUILD 255136 2015-12-10 04:45:16Z foutrelis $
+# Maintainer: Lubosz Sarnecki <lubosz@gmail.com>
+# Contributor: netcrusher < tobias AT miglix DOT eu >
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Simo Leone <neotuli@gmail.com>
+
+pkgname=festival-ims
+pkgver=2.4
+pkgrel=2
+pkgdesc="Festival with german patches from IMS Stuttgart"
+arch=(i686 x86_64)
+url="http://www.cstr.ed.ac.uk/projects/festival/"
+license=(BSD GPL custom)
+depends=(perl alsa-lib)
+options=('!makeflags')
+conflicts=('festival')
+replaces=('festival')
+source=(http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/$pkgname-$pkgver-release.tar.gz
+ http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/speech_tools-$pkgver-release.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
+ festival-2.4-compat.patch
+ festival-shared-build.patch
+ festival-gcc47.patch
+ # uni stuttgart
+ http://www2.ims.uni-stuttgart.de/phonetik/synthesis/festival/os940053/bomp_full.corr.tgz
+ http://www2.ims.uni-stuttgart.de/phonetik/synthesis/festival/os940053/ims_german_1.3-os.tgz)
+md5sums=('49707d2f6744d5a67f81a96c36f7cb59'
+ '3d60e563135363eb2548d947f7ef4e14'
+ '6a2ee4fed7c3ebedf197a3b8524ccb87'
+ '84af32a914d996f57bc4cb36fe8cdc97'
+ 'aa80f9250065b318325f16fdad3a4484'
+ '5a57ae18d71ba66dfd960519b97f4b18'
+ '6e088931b5279550b2aea4bf704bc42b'
+ '3bae028f01ef1fa523511f2ae452f0aa'
+ '9e0c5ce8c0bd5872c76d0570847f7668'
+ '253f00f5e0b10d4e36c06c7cb500f37c'
+ "SKIP"
+ "SKIP")
+
+prepare() {
+ patch -Np0 -i speechconfig.patch
+ patch -Np0 -i festconfig.patch
+
+ # fix build with new gcc versions and build shared libs - taken from Mageia
+ patch -Np0 -i festival-shared-build.patch
+ patch -Np0 -i festival-gcc47.patch
+
+ patch -Np0 -i festival-2.4-compat.patch
+
+ # Avoid make failure on making scripts and docs
+ sed -i "s#examples bin doc#examples#" festival/Makefile
+
+ # add ims config
+ sed -i 's/ALSO_INCLUDE +=$/# IMS module for German\nALSO_INCLUDE += ims_german_text/' "$srcdir/festival/config/config.in"
+cat<<EOF >> "$srcdir/festival/lib/sitevars.scm"
+(set! mbrola-path "/usr/share/mbrola/")
+(set! mbrola_progname "/usr/bin/mbrola -e")
+EOF
+ echo "(require 'ims_german_opensource)" >> "$srcdir/festival/lib/siteinit.scm"
+}
+
+build() {
+ # Build Speech Tools first
+ cd speech_tools
+ ./configure --prefix=/usr --sysconfdir=/etc
+ make OPTIMISE_CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" OPTIMISE_CCFLAGS="${CFLAGS} -fno-strict-aliasing"
+
+ # Build Festival itself
+ cd ../festival
+ ./configure --prefix=/usr --sysconfdir=/etc
+ make OPTIMISE_CXXFLAGS="${CXXFLAGS}" OPTIMISE_CCFLAGS="${CFLAGS}"
+}
+
+package() {
+ # Install Speech Tools first
+ cd 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 libestools.so.${pkgver}.1 "$pkgdir"/usr/lib/libestools.so
+ ln -sf libeststring.so.1.2 "$pkgdir"/usr/lib/libeststring.so
+
+ #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/benchmark "$pkgdir"/usr/bin/
+ install -m755 examples/dumpfeats "$pkgdir"/usr/bin/
+ install -m755 examples/durmeanstd "$pkgdir"/usr/bin/
+ install -m755 examples/latest "$pkgdir"/usr/bin/
+ install -m755 examples/make_utts "$pkgdir"/usr/bin/
+ install -m755 examples/powmeanstd "$pkgdir"/usr/bin/
+ install -m755 examples/run-festival-script "$pkgdir"/usr/bin/
+ install -m755 examples/saytime "$pkgdir"/usr/bin/
+ install -m755 examples/scfg_parse_text "$pkgdir"/usr/bin/
+ install -m755 examples/text2pos "$pkgdir"/usr/bin/
+ install -m755 examples/text2wave "$pkgdir"/usr/bin
+
+ #libraries
+ install -m755 src/lib/libFestival.so.* "$pkgdir"/usr/lib/
+ ln -sf libFestival.so.2.4.0 "$pkgdir"/usr/lib/libFestival.so
+
+ #headers
+ install -dm755 "$pkgdir"/usr/include/festival
+ install -m644 -t "$pkgdir"/usr/include/festival src/include/*.h
+
+ mkdir -p "$pkgdir"/usr/share/festival
+ cp -aR lib/* "$pkgdir"/usr/share/festival
+ rm -fv $(find "$pkgdir"/usr/share/festival -name Makefile)
+ rm -fv $(find "$pkgdir"/usr/bin -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
+}