[arch-commits] Commit in festival/trunk (3 files)
Eric Bélanger
eric at archlinux.org
Tue Sep 13 09:15:55 UTC 2011
Date: Tuesday, September 13, 2011 @ 05:15:54
Author: eric
Revision: 137967
upgpkg: festival 2.1-3
Add shared libraries (close FS#25959)
Added:
festival/trunk/festival-shared-build.patch
Modified:
festival/trunk/PKGBUILD
festival/trunk/speechconfig.patch
-----------------------------+
PKGBUILD | 178 +++++++++++++++++++++---------------------
festival-shared-build.patch | 72 ++++++++++++++++
speechconfig.patch | 2
3 files changed, 164 insertions(+), 88 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2011-09-13 07:36:58 UTC (rev 137966)
+++ PKGBUILD 2011-09-13 09:15:54 UTC (rev 137967)
@@ -6,7 +6,7 @@
pkgname=festival
pkgver=2.1
_suffix=release
-pkgrel=2
+pkgrel=3
pkgdesc="A general multi-lingual speech synthesis system"
arch=('i686' 'x86_64')
url="http://www.cstr.ed.ac.uk/projects/festival/"
@@ -15,115 +15,119 @@
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')
+ "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-shared-build.patch')
md5sums=('c93eb3e389ed171ab9abd46afe8897a8'
'6920ddc75b042910a3bcfee3ab106938'
'6a2ee4fed7c3ebedf197a3b8524ccb87'
'84af32a914d996f57bc4cb36fe8cdc97'
'aa80f9250065b318325f16fdad3a4484'
- '550abd77dc20e444673d6ecf87a60fe9'
- '348cc033430aee7989463198818ae74c')
+ 'c30ae990baca40c9c2b1d5cd27502139'
+ '348cc033430aee7989463198818ae74c'
+ '46132b1cd86a982007312def49ab176a')
build() {
- # Build Speech Tools first
- cd "$srcdir/speech_tools"
- patch -Np1 -i "$srcdir/speechconfig.patch"
+ cd "$srcdir"
+ patch -Np0 -i "$srcdir/festival-shared-build.patch"
- ./configure --prefix=/usr --sysconfdir=/etc
- make OPTIMISE_CXXFLAGS="${CXXFLAGS}" OPTIMISE_CCFLAGS="${CFLAGS}"
+ # 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"
+ # Build Festival itself
+ cd "$srcdir/festival"
+ patch -Np1 -i "$srcdir/festconfig.patch"
- # Avoid make failure on making scripts and docs
- sed -i "s#examples bin doc#examples#" Makefile
+ # Avoid 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}"
+ ./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}}
+ # 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}
+ #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
+ #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
+ 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
+ #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
+ # 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
+ #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 -m644 src/lib/libFestival.a "$pkgdir"/usr/lib/
+ #libraries
+ install -m644 src/lib/libFestival.a "$pkgdir"/usr/lib/
+ install -m755 src/lib/libFestival.so.* "$pkgdir"/usr/lib/
+ ln -sf libFestival.so.2.1.0 "$pkgdir"/usr/lib/libFestival.so
- #headers
- install -dm755 "$pkgdir"/usr/include/festival
- install -m644 -t "$pkgdir"/usr/include/festival src/include/*.h
+ #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)
- rm -f $(find "$pkgdir"/usr/bin -name Makefile)
+ mkdir -p "$pkgdir"/usr/share/festival
+ cp -aR lib/* "$pkgdir"/usr/share/festival
+ rm -f $(find "$pkgdir"/usr/share/festival -name Makefile)
+ rm -f $(find "$pkgdir"/usr/bin -name Makefile)
- #create voices directory
- install -dm755 "$pkgdir"/usr/share/festival/voices
+ #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
+ #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
+ # 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
}
Added: festival-shared-build.patch
===================================================================
--- festival-shared-build.patch (rev 0)
+++ festival-shared-build.patch 2011-09-13 09:15:54 UTC (rev 137967)
@@ -0,0 +1,72 @@
+--- speech_tools/config/rules/defaults.mak.orig 2007-03-16 12:39:12.000000000 -0400
++++ speech_tools/config/rules/defaults.mak 2007-03-16 12:39:19.000000000 -0400
+@@ -69,15 +69,21 @@
+ MADE_FROM_ABOVE:=$(N)
+ endif
+
++ifneq ($(SHARED),0)
++ LIBTYPE=so
++else
++ LIBTYPE=a
++endif
++
+ ifndef PROJECT_LIBDEPS
+- PROJECT_LIBDEPS = $(foreach l,$(PROJECT_LIBRARIES),$(PROJECT_LIBRARY_DIR_$(l))/lib$(l).a)
++ PROJECT_LIBDEPS = $(foreach l,$(PROJECT_LIBRARIES),$(PROJECT_LIBRARY_DIR_$(l))/lib$(l).$(LIBTYPE))
+ endif
+ ifndef PROJECT_LIBS
+ PROJECT_LIBS = $(foreach l,$(PROJECT_LIBRARIES),-L$(PROJECT_LIBRARY_DIR_$(l)) -l$(l))
+ endif
+
+ ifndef REQUIRED_LIBDEPS
+- REQUIRED_LIBDEPS = $(foreach l,$(REQUIRED_LIBRARIES),$(REQUIRED_LIBRARY_DIR_$(l))/lib$(l).a)
++ REQUIRED_LIBDEPS = $(foreach l,$(REQUIRED_LIBRARIES),$(REQUIRED_LIBRARY_DIR_$(l))/lib$(l).$(LIBTYPE))
+ endif
+ ifndef REQUIRED_LIBS
+ REQUIRED_LIBS = $(foreach l,$(REQUIRED_LIBRARIES),-L$(REQUIRED_LIBRARY_DIR_$(l)) -l$(l))
+--- festival/config/project.mak.orig 2007-03-16 13:01:40.000000000 -0400
++++ festival/config/project.mak 2007-03-16 13:02:24.000000000 -0400
+@@ -84,6 +84,8 @@
+ PROJECT_LIBRARY_DIR_Festival = $(TOP)/src/lib
+ PROJECT_DEFAULT_LIBRARY = Festival
+
++PROJECT_LIBRARY_VERSION_Festival = $(PROJECT_VERSION).0
++
+ # Libraries used from other projects
+
+ REQUIRED_LIBRARIES = estools estbase eststring
+diff -p -up festival/speech_tools/config/compilers/gcc_defaults.mak.bettersoname festival/speech_tools/config/compilers/gcc_defaults.mak
+--- speech_tools/config/compilers/gcc_defaults.mak.bettersoname 2010-12-06 10:25:35.000000000 +0100
++++ speech_tools/config/compilers/gcc_defaults.mak 2010-12-06 10:27:51.000000000 +0100
+@@ -78,7 +78,7 @@ SHARED_CXXFLAGS = -fPIC
+ SHARED_LINKFLAGS =
+
+ ifndef GCC_MAKE_SHARED_LIB
+- MAKE_SHARED_LIB = $(CXX) -shared -fno-shared-data -o XXX
++ MAKE_SHARED_LIB = $(CXX) -shared -fno-shared-data -o XXX -Wl,-soname,YYY
+ else
+ MAKE_SHARED_LIB = $(GCC_MAKE_SHARED_LIB)
+ endif
+diff -p -up festival/speech_tools/config/rules/library.mak.bettersoname festival/speech_tools/config/rules/library.mak
+--- speech_tools/config/rules/library.mak.bettersoname 2001-04-04 13:55:32.000000000 +0200
++++ speech_tools/config/rules/library.mak 2010-12-06 10:25:35.000000000 +0100
+@@ -103,14 +103,14 @@ endif
+ ###########################################################################
+
+ lib%.so : lib%.a
+- @echo Make Shared Library $*
++ @echo Make Shared Library $(*F)
+ @if [ ! -d shared_space ] ; then mkdir shared_space ; else $(RM) -f shared_space/*.o ; fi
+ @(cd shared_space ; $(AR) x ../$< )
+- @echo Link Shared Library $*
+- if [ -n "$(PROJECT_LIBRARY_NEEDS_SYSLIBS_$*)" ] ; then libs='$(JAVA_PROJECT_LIBS)' ; fi ;\
+- $(subst XXX,$@.$(PROJECT_LIBRARY_VERSION_$*),$(MAKE_SHARED_LIB)) shared_space/*.o $(PROJECT_LIBRARY_USES_$*:%=-L. -l%) $$libs
++ @echo Link Shared Library $(*F)
++ if [ -n "$(PROJECT_LIBRARY_NEEDS_SYSLIBS_$(*F))" ] ; then libs='$(JAVA_PROJECT_LIBS)' ; fi ;\
++ $(subst XXX,$@.$(PROJECT_LIBRARY_VERSION_$(*F)),$(subst YYY,$(@F).$(PROJECT_LIBRARY_VERSION_$(*F)),$(MAKE_SHARED_LIB))) shared_space/*.o $(PROJECT_LIBRARY_USES_$(*F):%=-L. -l%) $$libs
+ @$(RM) -f shared_space/*.o $@
+- @ln -s $@.$(PROJECT_LIBRARY_VERSION_$*) $@
++ @ln -s $(@F).$(PROJECT_LIBRARY_VERSION_$(*F)) $@
+
+ ###########################################################################
+ ## ##
Modified: speechconfig.patch
===================================================================
--- speechconfig.patch 2011-09-13 07:36:58 UTC (rev 137966)
+++ speechconfig.patch 2011-09-13 09:15:54 UTC (rev 137967)
@@ -44,7 +44,7 @@
#DEBUG=1
# PROFILE=gprof
-#SHARED=2
-+SHARED=1
++SHARED=2
## Directory specific selections which override the above
More information about the arch-commits
mailing list