initial import
This commit is contained in:
168
festival/PKGBUILD
Normal file
168
festival/PKGBUILD
Normal file
@@ -0,0 +1,168 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgname=festival
|
||||
pkgver=2.4
|
||||
pkgrel=5
|
||||
pkgdesc="A general multi-lingual speech synthesis system (including voices)"
|
||||
arch=(i686 x86_64)
|
||||
url='http://www.cstr.ed.ac.uk/projects/festival/'
|
||||
license=(custom:Festival)
|
||||
depends=(perl sndio)
|
||||
options=('!makeflags')
|
||||
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
|
||||
http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/voices/festvox_cmu_us_awb_cg.tar.gz
|
||||
http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/voices/festvox_cmu_us_rms_cg.tar.gz
|
||||
http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/voices/festvox_cmu_us_slt_cg.tar.gz
|
||||
http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/voices/festvox_kallpc16k.tar.gz
|
||||
http://www.cstr.ed.ac.uk/downloads/${pkgname}/${pkgver}/voices/festvox_rablpc16k.tar.gz
|
||||
festival-without-java.patch
|
||||
festival-config.patch
|
||||
festival-2.4-compat.patch
|
||||
festival-shared-build.patch
|
||||
festival-sndio.patch
|
||||
speech_tools-without-java.patch
|
||||
speech_tools-config.patch
|
||||
speech_tools-shared-build.patch
|
||||
speech_tools-gcc47.patch
|
||||
speech_tools-sndio.patch)
|
||||
sha512sums=('7c8eb6812c587623ea0877d5c792418ace2787f71087929d867adc4714ba13612da6e431dde89ca234330a83bf76519306c1302623e837a6fbfa4c4416b32231'
|
||||
'e6931216069fd3ea791ad22f8657fddd73b18296221e12cbbdf9241d2efda7821ea80a549e595151343533039107a00f939b52f7dc1034a6d9cf2f57d7baefa7'
|
||||
'c293344020fd3337193303cd5dfb7e2b0a1012770a484d8bccaae921b0c61b75699204bec45fee0db754506d6f1558fd616866cc94e76afcbb85a4dcbcf9542b'
|
||||
'dc7ec5db71ef331f4c4460a741392d548e037369d47080dc734e912aa312bd5c11e66cdcb94bdc4746a3f6c16c0e0294ce159f07b46e350b85c0afab07cc2064'
|
||||
'd7f96621fd98bcd3c84f0188fc6ac5a006e2cbb535279693be3341d51148344360f68e67962f08c4041df1e3527de9b30705b13fb9859ad91e3c804704eb5348'
|
||||
'edb4008606afc72802b265a503d1f6a37fc8f99bd21f6aaa72a06a970f86858da17c0857ce423356f0a432b19ada87778e0a88f6ecb9aeb66ae42a41c06e0494'
|
||||
'b0a519a654e349b49b627bb35384dadde8e44c4af43a4df7f8126c1535fe5838d8d2cd13fc9813cad7ec4dd92ae018c6090ca453d0e6a1c470ccf839faf21125'
|
||||
'b02da2a5a17e0341cbd0d692021b8cb44cd3bfd3e6a60a06c5a22004ce2ad135efba64df75f4c8479a4cd2da15fd733165bce89972ae206c3e11b543150a69e4'
|
||||
'e7155a8df1305fc80a0b7f97e07b74f2d687ce93f89dc74b4ab3653a369629b956491381a1f4613e531570cc688480b151b2e60fd5b8f9755c641648dc72d3bc'
|
||||
'a8962a8187e83c4419414e7ef5953a8a1ed1b65a7d5a9dea3722185a4fb660727897e7dca9f6ccddf4fefc85d9d757dcb444a6ac08328b7dc94624ffff24f5a6'
|
||||
'ad42dd594d86f71e6abcaae541334a18cfd3cc929301b27176590fb57d1486d106d595c6ea9ac259c089b58b035259ebfc1f80761c01010f7744aeb9cc93c833'
|
||||
'25b75692e5ab8a18bc4500d573e2bdb3fbd543b5238d5ec7346c5199695a2b543cea8ffe4bd70e64e2f51563fc2daed9b551afd4170c8db08275fa7e70b6c882'
|
||||
'26f60c777e8062ec23b9e19a4ff48bd3425a7686ebcabb2d1cae0f13351e3b2ccae9d0d4996291b55548a75df6d7750e2f127ff2faf3a8a86a01fb141c0e8b16'
|
||||
'5271eb4eb92a43b1b44cea01f473ed1012f216bbb86c6213be69fbeb565ecba76859a3c5ec9f5cfa87764dc073fc5c0d80d082721c256ee977c050682ca7c87f'
|
||||
'4a8cd2a3cac554cf4862a08e0c78f757228262087b4e9033565c68d7a0e278a529b2ae5d7e9e48017f8fd71f1351bc761a6f01728656433c029f51e8b492f730'
|
||||
'5683178c8e88abae20fef22a78621d0c50ac5265d711b21c233fb9e6a2e28db9a470e56efaa26a0d77380458f45b410024af8586e47a7b128dcef7f5efb7bb1c'
|
||||
'64bafc35935e83dc31c1377c8fb528c2f72fcfabd1b6cf2cec216584677e04304437eea375d1847f9bc0e1aafa7f769d4bf2e83b8d539995f56b32eccd7c6982'
|
||||
'16e007d4f8b3cae113933434bad580fe9a1b52473ad77f98236e9a88ec225f91dbe26364899ba620c4b064164abedcff0a190c768835e67ae160f210f1cdaded'
|
||||
'c71bedc38425a59f7ebb42eaa39e40ac7755260d93c52d478e8bc11ed9a50b686189077672953a656bce11522d7b7ced3919854499fe41a19053c9e1a619e7b3'
|
||||
'b2a43d5979cc544f89f7e2f4bf0bb4825e021e160cfe0bc0c864477618033bc2778f7f256cffba51b49b179b5fc67f86647587c63d4b39092ffc467b54cb2074')
|
||||
|
||||
prepare() {
|
||||
# Remove Java support
|
||||
patch -Np0 -i festival-without-java.patch
|
||||
patch -Np0 -i speech_tools-without-java.patch
|
||||
|
||||
# Fix config files
|
||||
patch -Np0 -i festival-config.patch
|
||||
patch -Np0 -i speech_tools-config.patch
|
||||
|
||||
patch -Np0 -i festival-2.4-compat.patch
|
||||
|
||||
# Fix build with new gcc versions and build shared libs - taken from Mageia
|
||||
patch -Np0 -i festival-shared-build.patch
|
||||
patch -Np0 -i speech_tools-shared-build.patch
|
||||
patch -Np0 -i speech_tools-gcc47.patch
|
||||
|
||||
# Add sndio support
|
||||
patch -Np0 -i festival-sndio.patch
|
||||
patch -Np0 -i speech_tools-sndio.patch
|
||||
|
||||
# Avoid make failure on making scripts and docs
|
||||
sed -i "s#examples bin doc#examples#" festival/Makefile
|
||||
}
|
||||
|
||||
build() {
|
||||
# Build Speech Tools first
|
||||
cd speech_tools
|
||||
./configure --prefix=/usr --sysconfdir=/etc
|
||||
make OPTIMISE_CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing -fno-delete-null-pointer-checks -std=gnu++98" OPTIMISE_CCFLAGS="${CFLAGS} -fno-strict-aliasing"
|
||||
|
||||
# Build Festival itself
|
||||
cd ../festival
|
||||
./configure --prefix=/usr --sysconfdir=/etc
|
||||
make OPTIMISE_CXXFLAGS="${CXXFLAGS} -fno-delete-null-pointer-checks -std=gnu++98" 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 and include initial data
|
||||
install -dm755 "$pkgdir"/usr/share/festival/voices
|
||||
cp -rf lib/voices/us "$pkgdir/usr/share/festival/voices/"
|
||||
cp -rf lib/voices/english "$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
|
||||
|
||||
# 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
|
||||
}
|
||||
Reference in New Issue
Block a user