[arch-commits] Commit in festival/trunk (4 files)

Andreas Radke andyrtr at nymeria.archlinux.org
Tue Feb 4 16:26:01 UTC 2014


    Date: Tuesday, February 4, 2014 @ 17:26:00
  Author: andyrtr
Revision: 205424

upgpkg: festival 2.1-4

drop static libs (as Fedora does) - add patches to make it compile again

Added:
  festival/trunk/festival-2.1-bettersonamehack.patch
  festival/trunk/festival.gcc47.patch
Modified:
  festival/trunk/PKGBUILD
  festival/trunk/festival-shared-build.patch

-------------------------------------+
 PKGBUILD                            |   49 +++++++------
 festival-2.1-bettersonamehack.patch |   35 +++++++++
 festival-shared-build.patch         |   50 ++++----------
 festival.gcc47.patch                |  121 ++++++++++++++++++++++++++++++++++
 4 files changed, 197 insertions(+), 58 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-02-04 14:09:43 UTC (rev 205423)
+++ PKGBUILD	2014-02-04 16:26:00 UTC (rev 205424)
@@ -5,7 +5,7 @@
 
 pkgname=festival
 pkgver=2.1
-pkgrel=3
+pkgrel=4
 pkgdesc="A general multi-lingual speech synthesis system"
 arch=('i686' 'x86_64')
 url="http://www.cstr.ed.ac.uk/projects/festival/"
@@ -12,14 +12,16 @@
 license=('BSD' 'GPL' 'custom')
 depends=('perl')
 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"
-	'speechconfig.patch'
-	'festconfig.patch'
-	'festival-shared-build.patch')
+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-shared-build.patch
+        festival.gcc47.patch
+        festival-2.1-bettersonamehack.patch)
 md5sums=('c93eb3e389ed171ab9abd46afe8897a8'
          '6920ddc75b042910a3bcfee3ab106938'
          '6a2ee4fed7c3ebedf197a3b8524ccb87'
@@ -27,19 +29,22 @@
          'aa80f9250065b318325f16fdad3a4484'
          'c30ae990baca40c9c2b1d5cd27502139'
          '348cc033430aee7989463198818ae74c'
-         '46132b1cd86a982007312def49ab176a')
+         '02f589688182527308e3fe8d1a82c056'
+         'ed738fdf981aaddbae6d00c3a0120d62'
+         '85367db2b57bae214d1032e2fc896753')
 
 prepare() {
-  cd "$srcdir"
-  patch -p0 -i "$srcdir/festival-shared-build.patch"
-  cd "$srcdir/speech_tools"
-  patch -p1 -i "$srcdir/speechconfig.patch"
+  cd $srcdir
+  patch -Np0 -i ${srcdir}/speechconfig.patch
+  patch -Np0 -i ${srcdir}/festconfig.patch
 
-  cd "$srcdir/festival"
-  patch -p1 -i "$srcdir/festconfig.patch"
-
+  # fix build with new gcc versions and build shared libs - taken from Mageia
+  patch -Np0 -i ${srcdir}/festival-shared-build.patch
+  patch -Np0 -i ${srcdir}/festival-2.1-bettersonamehack.patch
+  patch -Np0 -i ${srcdir}/festival.gcc47.patch
+  
   # Avoid make failure on making scripts and docs
-  sed -i "s#examples bin doc#examples#" Makefile
+  sed -i "s#examples bin doc#examples#" festival/Makefile
 }
 
 build() {
@@ -46,7 +51,7 @@
   # Build Speech Tools first
   cd "$srcdir/speech_tools"
   ./configure --prefix=/usr --sysconfdir=/etc
-  make OPTIMISE_CXXFLAGS="${CXXFLAGS}" OPTIMISE_CCFLAGS="${CFLAGS}"
+  make OPTIMISE_CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" OPTIMISE_CCFLAGS="${CFLAGS} -fno-strict-aliasing"
 
   # Build Festival itself
   cd "$srcdir/festival"
@@ -72,7 +77,6 @@
   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
@@ -98,7 +102,6 @@
   install -m755 examples/text2wave "$pkgdir"/usr/bin
 
   #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
 
@@ -108,8 +111,8 @@
 
   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)
+  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

Added: festival-2.1-bettersonamehack.patch
===================================================================
--- festival-2.1-bettersonamehack.patch	                        (rev 0)
+++ festival-2.1-bettersonamehack.patch	2014-02-04 16:26:00 UTC (rev 205424)
@@ -0,0 +1,35 @@
+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 -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: festival-shared-build.patch
===================================================================
--- festival-shared-build.patch	2014-02-04 14:09:43 UTC (rev 205423)
+++ festival-shared-build.patch	2014-02-04 16:26:00 UTC (rev 205424)
@@ -1,3 +1,18 @@
+--- speech_tools/config/project.mak.orig	2007-03-13 15:27:53.000000000 -0400
++++ speech_tools/config/project.mak	2007-03-13 15:29:12.000000000 -0400
+@@ -99,8 +99,9 @@
+ PROJECT_LIBRARY_DIR_eststring = $(TOP)/lib
+ PROJECT_LIBRARY_DIR_estjava = $(TOP)/lib
+ 
+-PROJECT_LIBRARY_USES_estbase = eststring
+-
++PROJECT_LIBRARY_USES_estbase = eststring m
++PROJECT_LIBRARY_USES_estools = estbase m ncurses
++PROJECT_LIBRARY_USES_eststring = m
+ PROJECT_LIBRARY_USES_estjava = estbase eststring
+ 
+ PROJECT_LIBRARY_VERSION_estools = $(PROJECT_VERSION).1
+
 --- 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 @@
@@ -35,38 +50,3 @@
  # 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)) $@
- 
-  ###########################################################################
-  ##                                                                       ##

Added: festival.gcc47.patch
===================================================================
--- festival.gcc47.patch	                        (rev 0)
+++ festival.gcc47.patch	2014-02-04 16:26:00 UTC (rev 205424)
@@ -0,0 +1,121 @@
+--- speech_tools/base_class/EST_TSimpleMatrix.cc.gcc	2009-02-18 20:56:24.000000000 +0800
++++ speech_tools/base_class/EST_TSimpleMatrix.cc	2012-10-14 13:06:35.000000000 +0800
+@@ -44,6 +44,7 @@
+ #include "EST_TVector.h"
+ #include <fstream>
+ #include <iostream>
++#include <cstring>
+ #include "EST_cutils.h"
+ 
+ template<class T> 
+@@ -98,7 +99,7 @@
+ 	{
+ 	  int copy_r = Lof(this->num_rows(), new_rows);
+ 
+-	  just_resize(new_rows, new_cols, &old_vals);
++	  this->just_resize(new_rows, new_cols, &old_vals);
+ 
+           for (q=0; q<(copy_r*new_cols*sizeof(T)); q++) /* memcpy */
+               ((char *)this->p_memory)[q] = ((char *)old_vals)[q];
+@@ -127,9 +128,9 @@
+ 	  int copy_r = Lof(this->num_rows(), new_rows);
+ 	  int copy_c = Lof(this->num_columns(), new_cols);
+ 	  
+-	  just_resize(new_rows, new_cols, &old_vals);
++	  this->just_resize(new_rows, new_cols, &old_vals);
+ 
+-	  set_values(old_vals,
++	  this->set_values(old_vals,
+ 		     old_row_step, old_column_step,
+ 		     0, copy_r,
+ 		     0, copy_c);
+--- speech_tools/base_class/EST_TSimpleVector.cc.gcc	2009-02-18 20:52:55.000000000 +0800
++++ speech_tools/base_class/EST_TSimpleVector.cc	2012-10-14 13:09:37.000000000 +0800
+@@ -43,6 +43,7 @@
+ #include "EST_TSimpleVector.h"
+ #include "EST_matrix_support.h"
+ #include <fstream>
++#include <cstring>
+ #include "EST_cutils.h"
+ 
+ template<class T> void EST_TSimpleVector<T>::copy(const EST_TSimpleVector<T> &a)
+@@ -70,7 +71,7 @@
+   int old_offset = this->p_offset;
+   unsigned int q;
+ 
+-  just_resize(newn, &old_vals);
++  this->just_resize(newn, &old_vals);
+ 
+   if (set && old_vals)
+     {
+--- speech_tools/include/EST_TIterator.h.gcc	2004-05-04 08:00:16.000000000 +0800
++++ speech_tools/include/EST_TIterator.h	2012-10-14 12:52:52.000000000 +0800
+@@ -101,7 +101,7 @@
+ 
+   /// Create an iterator ready to run over the given container.
+   EST_TIterator(const Container &over)
+-    { begin(over); }
++    { this->begin(over); }
+ 
+   /// Copy an iterator by assignment
+   Iter &operator = (const Iter &orig)
+@@ -109,7 +109,7 @@
+ 
+   /// Assigning a container to an iterator sets it ready to start.
+   Iter &operator = (const Container &over)
+-    { begin(over); return *this;}
++    { this->begin(over); return *this;}
+ 
+   /// Set the iterator ready to run over this container.
+   void begin(const Container &over)
+@@ -209,7 +209,7 @@
+ 
+   /// Create an iterator ready to run over the given container.
+   EST_TStructIterator(const Container &over)
+-    { begin(over); }
++    { this->begin(over); }
+ 
+   const Entry *operator ->() const
+     {return &this->current();}
+@@ -239,7 +239,7 @@
+ 
+   /// Create an iterator ready to run over the given container.
+   EST_TRwIterator(Container &over)
+-    { begin(over); }
++    { this->begin(over); }
+ 
+   /// Set the iterator ready to run over this container.
+   void begin(Container &over)
+@@ -289,7 +289,7 @@
+ 
+   /// Create an iterator ready to run over the given container.
+   EST_TRwStructIterator(Container &over)
+-    { begin(over); }
++    { this->begin(over); }
+ 
+   Entry *operator ->() const
+     {return &this->current();}
+--- speech_tools/include/EST_TNamedEnum.h.gcc	2004-09-30 20:53:36.000000000 +0800
++++ speech_tools/include/EST_TNamedEnum.h	2012-10-14 12:52:52.000000000 +0800
+@@ -130,7 +130,7 @@
+ 	{this->initialise((const void *)defs); };
+   EST_TNamedEnumI(EST_TValuedEnumDefinition<const char *,const char *,INFO> defs[], ENUM (*conv)(const char *))
+ 	{this->initialise((const void *)defs, conv); };
+-  const char *name(ENUM tok, int n=0) const {return value(tok,n); };
++  const char *name(ENUM tok, int n=0) const {return this->value(tok,n); };
+ 
+ };
+ 
+--- festival/src/modules/Text/text_modes.cc.gcc	2012-10-14 13:08:54.000000000 +0800
++++ festival/src/modules/Text/text_modes.cc	2012-10-14 13:09:09.000000000 +0800
+@@ -59,8 +59,8 @@
+ void tts_file_user_mode(LISP filename, LISP params)
+ {
+ 
+-    volatile EST_String tmpname = make_tmp_filename();
+-    volatile EST_String inname = (EST_String)get_c_string(filename);
++    EST_String tmpname = make_tmp_filename();
++    EST_String inname = (EST_String)get_c_string(filename);
+     volatile EST_String filter;
+     volatile EST_TokenStream ts;
+     volatile LISP func;




More information about the arch-commits mailing list