summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'speech-tools/2.1-r2')
-rw-r--r--speech-tools/2.1-r2/patch/02_all_gcc42.patch81
-rw-r--r--speech-tools/2.1-r2/patch/03_all_GentooLinux.patch147
-rw-r--r--speech-tools/2.1-r2/patch/04_all_gcc42-doc.patch25
-rw-r--r--speech-tools/2.1-r2/patch/05_all_sharedlib.patch52
-rw-r--r--speech-tools/2.1-r2/patch/06_all_gcc43-include.patch37
-rw-r--r--speech-tools/2.1-r2/patch/08_all_rateconv.patch26
-rw-r--r--speech-tools/2.1-r2/patch/09_all_remove-shared-refs.patch95
-rw-r--r--speech-tools/2.1-r2/patch/10_all_base_class.patch12
-rw-r--r--speech-tools/2.1-r2/patch/81_all_etcpath.patch17
-rw-r--r--speech-tools/2.1-r2/patch/91_all_gentoo-config.patch25
-rw-r--r--speech-tools/2.1-r2/patch/92_all_ldflags_fix.patch11
-rw-r--r--speech-tools/2.1-r2/patch/92_all_mixed_cxxflag_cflag_fix.patch12
-rw-r--r--speech-tools/2.1-r2/patch/93_all_gcc4.7.patch82
13 files changed, 622 insertions, 0 deletions
diff --git a/speech-tools/2.1-r2/patch/02_all_gcc42.patch b/speech-tools/2.1-r2/patch/02_all_gcc42.patch
new file mode 100644
index 0000000..173d3b9
--- /dev/null
+++ b/speech-tools/2.1-r2/patch/02_all_gcc42.patch
@@ -0,0 +1,81 @@
+diff --git a/config/compilers/Makefile b/config/compilers/Makefile
+index 3d3d5bb..e21bf9b 100644
+--- a/config/compilers/Makefile
++++ b/config/compilers/Makefile
+@@ -41,7 +41,7 @@ COMPILERS = gcc.mak gcc27.mak gcc28.mak gcc295.mak \
+ egcs.mak gcc27emx.mak intel80.mak \
+ suncc.mak suncc40.mak \
+ jolt.mak jdk.mak jdk12.mak none.mak \
+- jikes.mak gcc296.mak gcc30.mak gcc31.mak gcc32.mak
++ jikes.mak gcc296.mak gcc30.mak gcc31.mak gcc32.mak gcc42.mak
+
+ FILES = Makefile $(COMPILERS) gcc_defaults.mak suncc_defaults.mak jdk_defaults.mak jikes_defaults.mak
+
+diff --git a/config/compilers/gcc42.mak b/config/compilers/gcc42.mak
+new file mode 100644
+index 0000000..3bbf897
+--- /dev/null
++++ b/config/compilers/gcc42.mak
+@@ -0,0 +1,62 @@
++ ###########################################################################
++ ## ##
++ ## Centre for Speech Technology Research ##
++ ## University of Edinburgh, UK ##
++ ## Copyright (c) 1999 ##
++ ## All Rights Reserved. ##
++ ## ##
++ ## Permission is hereby granted, free of charge, to use and distribute ##
++ ## this software and its documentation without restriction, including ##
++ ## without limitation the rights to use, copy, modify, merge, publish, ##
++ ## distribute, sublicense, and/or sell copies of this work, and to ##
++ ## permit persons to whom this work is furnished to do so, subject to ##
++ ## the following conditions: ##
++ ## 1. The code must retain the above copyright notice, this list of ##
++ ## conditions and the following disclaimer. ##
++ ## 2. Any modifications must be clearly marked as such. ##
++ ## 3. Original authors' names are not deleted. ##
++ ## 4. The authors' names are not used to endorse or promote products ##
++ ## derived from this software without specific prior written ##
++ ## permission. ##
++ ## ##
++ ## THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ##
++ ## DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ##
++ ## ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ##
++ ## SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ##
++ ## FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ##
++ ## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ##
++ ## AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ##
++ ## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ##
++ ## THIS SOFTWARE. ##
++ ## ##
++ ###########################################################################
++ ## ##
++ ## Author: William Hubbs (williamh@gentoo.org) ##
++ ## Date: Sun Aug 25 2002 ##
++ ## -------------------------------------------------------------------- ##
++ ## Settings for GCC-4.2 ##
++ ## ##
++ ###########################################################################
++
++include $(EST)/config/compilers/gcc_defaults.mak
++
++ifndef GCC42
++ GCC42 = gcc
++endif
++
++CC= $(GCC42)
++CXX = g++
++
++COMPILER_DESC=gcc-4.[234]
++
++SHARED_CCFLAGS = -fPIC
++SHARED_CXXFLAGS = -fPIC
++SHARED_LINKFLAGS =
++
++ ifndef GCC_MAKE_SHARED_LIB
++ MAKE_SHARED_LIB = $(CXX) -shared -o XXX -Wl,-soname,YYY
++ else
++ MAKE_SHARED_LIB = $(GCC_MAKE_SHARED_LIB)
++ endif
++
++STATIC_LINKFLAGS = -Dstatic
diff --git a/speech-tools/2.1-r2/patch/03_all_GentooLinux.patch b/speech-tools/2.1-r2/patch/03_all_GentooLinux.patch
new file mode 100644
index 0000000..7309ece
--- /dev/null
+++ b/speech-tools/2.1-r2/patch/03_all_GentooLinux.patch
@@ -0,0 +1,147 @@
+From c5af88ba6b62e8a926aa156f52428348435fe254 Mon Sep 17 00:00:00 2001
+From: William Hubbs <w.d.hubbs@gmail.com>
+Date: Thu, 16 Jul 2009 22:24:07 -0500
+Subject: [PATCH 9/9] add gentoo linux support
+
+---
+ config/system.sh | 4 +++
+ config/systems/GentooLinux.mak | 42 ++++++++++++++++++++++++++++++++
+ config/systems/Makefile | 2 +
+ config/systems/unknown_GentooLinux.mak | 41 +++++++++++++++++++++++++++++++
+ 4 files changed, 89 insertions(+), 0 deletions(-)
+ create mode 100644 config/systems/GentooLinux.mak
+ create mode 100644 config/systems/unknown_GentooLinux.mak
+
+diff --git a/config/system.sh b/config/system.sh
+index af07781..9524af3 100644
+--- a/config/system.sh
++++ b/config/system.sh
+@@ -70,6 +70,10 @@ if [ "$OSTYPE" = Linux ]
+ then
+ OSTYPE=DebianGNULinux
+ OSREV=`cat /etc/debian_version`
++ elif [ -f "/etc/gentoo-release" ]
++ then
++ OSTYPE=GentooLinux
++ OSREV=
+ else
+ # Generic unknown GNU/Linux system.
+ OSTYPE=Linux
+diff --git a/config/systems/GentooLinux.mak b/config/systems/GentooLinux.mak
+new file mode 100644
+index 0000000..d3cc031
+--- /dev/null
++++ b/config/systems/GentooLinux.mak
+@@ -0,0 +1,42 @@
++ ###########################################################################
++ ## ##
++ ## Centre for Speech Technology Research ##
++ ## University of Edinburgh, UK ##
++ ## Copyright (c) 1996 ##
++ ## All Rights Reserved. ##
++ ## ##
++ ## Permission is hereby granted, free of charge, to use and distribute ##
++ ## this software and its documentation without restriction, including ##
++ ## without limitation the rights to use, copy, modify, merge, publish, ##
++ ## distribute, sublicense, and/or sell copies of this work, and to ##
++ ## permit persons to whom this work is furnished to do so, subject to ##
++ ## the following conditions: ##
++ ## 1. The code must retain the above copyright notice, this list of ##
++ ## conditions and the following disclaimer. ##
++ ## 2. Any modifications must be clearly marked as such. ##
++ ## 3. Original authors' names are not deleted. ##
++ ## 4. The authors' names are not used to endorse or promote products ##
++ ## derived from this software without specific prior written ##
++ ## permission. ##
++ ## ##
++ ## THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ##
++ ## DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ##
++ ## ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ##
++ ## SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ##
++ ## FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ##
++ ## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ##
++ ## AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ##
++ ## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ##
++ ## THIS SOFTWARE. ##
++ ## ##
++ ###########################################################################
++ ## ##
++ ## Author: William Hubbs <williamh@gentoo.org> ##
++ ## -------------------------------------------------------------------- ##
++ ## Settings for Gentoo Linux distributions. ##
++ ## ##
++ ###########################################################################
++
++MANDIR=$(INSTALL_PREFIX)/share/man
++# Gentoo does not use termcap
++OS_LIBS = $(LDFLAGS) -ldl -lncurses
+diff --git a/config/systems/Makefile b/config/systems/Makefile
+index df166ce..a87ab78 100644
+--- a/config/systems/Makefile
++++ b/config/systems/Makefile
+@@ -41,6 +41,7 @@ SYSTEMS = \
+ Linux.mak \
+ RedHatLinux.mak \
+ DebianGNULinux.mak \
++ GentooLinux.mak \
+ alpha_Linux.mak \
+ alpha_OSF1V4.0.mak \
+ alpha_RedHatLinux.mak \
+@@ -95,6 +96,7 @@ SYSTEMS = \
+ sparc_SunOS5.mak \
+ sparc_unknown.mak \
+ unknown_DebianGNULinux.mak \
++ unknown_GentooLinux.mak \
+ unknown_Linux.mak \
+ unknown_RedHatLinux.mak \
+ power_macintosh_Darwin.mak \
+diff --git a/config/systems/unknown_GentooLinux.mak b/config/systems/unknown_GentooLinux.mak
+new file mode 100644
+index 0000000..3f9f39c
+--- /dev/null
++++ b/config/systems/unknown_GentooLinux.mak
+@@ -0,0 +1,41 @@
++ ###########################################################################
++ ## ##
++ ## Centre for Speech Technology Research ##
++ ## University of Edinburgh, UK ##
++ ## Copyright (c) 1996 ##
++ ## All Rights Reserved. ##
++ ## ##
++ ## Permission is hereby granted, free of charge, to use and distribute ##
++ ## this software and its documentation without restriction, including ##
++ ## without limitation the rights to use, copy, modify, merge, publish, ##
++ ## distribute, sublicense, and/or sell copies of this work, and to ##
++ ## permit persons to whom this work is furnished to do so, subject to ##
++ ## the following conditions: ##
++ ## 1. The code must retain the above copyright notice, this list of ##
++ ## conditions and the following disclaimer. ##
++ ## 2. Any modifications must be clearly marked as such. ##
++ ## 3. Original authors' names are not deleted. ##
++ ## 4. The authors' names are not used to endorse or promote products ##
++ ## derived from this software without specific prior written ##
++ ## permission. ##
++ ## ##
++ ## THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK ##
++ ## DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ##
++ ## ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ##
++ ## SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE ##
++ ## FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ##
++ ## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ##
++ ## AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ##
++ ## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ##
++ ## THIS SOFTWARE. ##
++ ## ##
++ ###########################################################################
++ ## ##
++ ## Author: William Hubbs <williamh@gentoo.org> ##
++ ## -------------------------------------------------------------------- ##
++ ## Settings for Gentoo Linux distributions. ##
++ ## ##
++ ###########################################################################
++
++ include $(EST)/config/systems/Linux.mak
++ include $(EST)/config/systems/GentooLinux.mak
+--
+1.6.3.3
+
diff --git a/speech-tools/2.1-r2/patch/04_all_gcc42-doc.patch b/speech-tools/2.1-r2/patch/04_all_gcc42-doc.patch
new file mode 100644
index 0000000..cfa5da3
--- /dev/null
+++ b/speech-tools/2.1-r2/patch/04_all_gcc42-doc.patch
@@ -0,0 +1,25 @@
+From 82aa4c8a0c6dbff9186a4895a6d890327c0cb5dd Mon Sep 17 00:00:00 2001
+From: William Hubbs <w.d.hubbs@gmail.com>
+Date: Thu, 16 Jul 2009 22:21:59 -0500
+Subject: [PATCH 4/9] documentation update for gcc 4.2
+
+---
+ doc/estjavaapp.sgml | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/doc/estjavaapp.sgml b/doc/estjavaapp.sgml
+index b5f4343..6b06b52 100644
+--- a/doc/estjavaapp.sgml
++++ b/doc/estjavaapp.sgml
+@@ -105,7 +105,7 @@ temporary directory and linking the bits together as follows:
+ &shellprompt; <userinput>cd tmpdir</userinput>
+ &shellprompt; <userinput>ar x ../libgcc.a</userinput>
+ &shellprompt; <userinput>cd ..</userinput>
+- &shellprompt; <userinput>gcc -shared -fno-shared-data -o libgcc.so.2.7.2 tmpdir/*.o</userinput>
++ &shellprompt; <userinput>gcc -shared -o libgcc.so.2.7.2 tmpdir/*.o</userinput>
+ </screen>
+ </para>
+ </sect1>
+--
+1.6.3.3
+
diff --git a/speech-tools/2.1-r2/patch/05_all_sharedlib.patch b/speech-tools/2.1-r2/patch/05_all_sharedlib.patch
new file mode 100644
index 0000000..84f3856
--- /dev/null
+++ b/speech-tools/2.1-r2/patch/05_all_sharedlib.patch
@@ -0,0 +1,52 @@
+diff --git a/config/rules/defaults.mak b/config/rules/defaults.mak
+index aca1573..cb3fcba 100644
+--- a/config/rules/defaults.mak
++++ b/config/rules/defaults.mak
+@@ -69,15 +69,21 @@ ifdef N
+ 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))
+diff --git a/config/rules/library.mak b/config/rules/library.mak
+index 0181988..2038239 100644
+--- a/config/rules/library.mak
++++ b/config/rules/library.mak
+@@ -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)) $@
+
+ ###########################################################################
+ ## ##
diff --git a/speech-tools/2.1-r2/patch/06_all_gcc43-include.patch b/speech-tools/2.1-r2/patch/06_all_gcc43-include.patch
new file mode 100644
index 0000000..84489f9
--- /dev/null
+++ b/speech-tools/2.1-r2/patch/06_all_gcc43-include.patch
@@ -0,0 +1,37 @@
+From b1ac28f4794d991d8f0c713039d4109a456a94de Mon Sep 17 00:00:00 2001
+From: William Hubbs <w.d.hubbs@gmail.com>
+Date: Thu, 16 Jul 2009 23:25:53 -0500
+Subject: [PATCH 5/9] gcc 4.3 include file fix
+
+---
+ base_class/EST_TSimpleMatrix.cc | 1 +
+ base_class/EST_TSimpleVector.cc | 1 +
+ 2 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/base_class/EST_TSimpleMatrix.cc b/base_class/EST_TSimpleMatrix.cc
+index 32aab33..aa4ed9c 100644
+--- a/base_class/EST_TSimpleMatrix.cc
++++ b/base_class/EST_TSimpleMatrix.cc
+@@ -42,6 +42,7 @@
+
+ #include "EST_TSimpleMatrix.h"
+ #include "EST_TVector.h"
++#include <cstring>
+ #include <fstream>
+ #include <iostream>
+ #include "EST_cutils.h"
+diff --git a/base_class/EST_TSimpleVector.cc b/base_class/EST_TSimpleVector.cc
+index 52df5e2..26bf850 100644
+--- a/base_class/EST_TSimpleVector.cc
++++ b/base_class/EST_TSimpleVector.cc
+@@ -42,6 +42,7 @@
+
+ #include "EST_TSimpleVector.h"
+ #include "EST_matrix_support.h"
++#include <cstring>
+ #include <fstream>
+ #include "EST_cutils.h"
+
+--
+1.6.3.3
+
diff --git a/speech-tools/2.1-r2/patch/08_all_rateconv.patch b/speech-tools/2.1-r2/patch/08_all_rateconv.patch
new file mode 100644
index 0000000..e000247
--- /dev/null
+++ b/speech-tools/2.1-r2/patch/08_all_rateconv.patch
@@ -0,0 +1,26 @@
+From b7d4f822de69bd35c68372884018ea76f9fef2fd Mon Sep 17 00:00:00 2001
+From: William Hubbs <w.d.hubbs@gmail.com>
+Date: Fri, 17 Jul 2009 00:33:39 -0500
+Subject: [PATCH 7/9] fix coding error in rateconv
+
+---
+ base_class/rateconv.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/base_class/rateconv.cc b/base_class/rateconv.cc
+index 3e1fb03..defcba5 100644
+--- a/base_class/rateconv.cc
++++ b/base_class/rateconv.cc
+@@ -384,7 +384,8 @@ static int filtering_on_buffers
+ }
+ fir_stereo(inp + inoffset + inbaseidx,
+ coep + cycctr * firlen, firlen,
+- outp + outidx++, outp + outidx++);
++ outp + outidx, outp + outidx + 1);
++ outidx += 2;
+ cycctr++;
+ if (!(cycctr %= up))
+ inbaseidx += 2*down;
+--
+1.6.3.3
+
diff --git a/speech-tools/2.1-r2/patch/09_all_remove-shared-refs.patch b/speech-tools/2.1-r2/patch/09_all_remove-shared-refs.patch
new file mode 100644
index 0000000..0900a8f
--- /dev/null
+++ b/speech-tools/2.1-r2/patch/09_all_remove-shared-refs.patch
@@ -0,0 +1,95 @@
+From 067e73c8563247bc317ba5e632d5a56ccdf0de0c Mon Sep 17 00:00:00 2001
+From: William Hubbs <w.d.hubbs@gmail.com>
+Date: Fri, 17 Jul 2009 01:14:33 -0500
+Subject: [PATCH 8/9] remove shared setup references
+
+---
+ scripts/build_docbook_index.prl | 2 --
+ scripts/cxx_to_docbook.prl | 2 --
+ scripts/pm.prl | 2 --
+ scripts/raw_to_xgraph.prl | 2 --
+ scripts/resynth.sh | 2 --
+ scripts/tex_to_images.prl | 2 --
+ 6 files changed, 0 insertions(+), 12 deletions(-)
+
+diff --git a/scripts/build_docbook_index.prl b/scripts/build_docbook_index.prl
+index f07a234..728324d 100644
+--- a/scripts/build_docbook_index.prl
++++ b/scripts/build_docbook_index.prl
+@@ -35,8 +35,6 @@ sub useage
+ END
+ }
+
+-#__SHARED_SETUP__
+-
+ $title='';
+ $mode='debug';
+ $verbose=0;
+diff --git a/scripts/cxx_to_docbook.prl b/scripts/cxx_to_docbook.prl
+index 9bde698..a8f61c4 100644
+--- a/scripts/cxx_to_docbook.prl
++++ b/scripts/cxx_to_docbook.prl
+@@ -37,8 +37,6 @@ sub useage
+ END
+ }
+
+-#__SHARED_SETUP__
+-
+ $level=0;
+ $title=undef;
+ $chapter='chapter';
+diff --git a/scripts/pm.prl b/scripts/pm.prl
+index c2be12a..31bb512 100755
+--- a/scripts/pm.prl
++++ b/scripts/pm.prl
+@@ -56,8 +56,6 @@ sub useage
+ END
+ }
+
+-#__SHARED_SETUP__
+-
+ while ($#ARGV>=0)
+ {
+ if ($ARGV[0] eq "-f")
+diff --git a/scripts/raw_to_xgraph.prl b/scripts/raw_to_xgraph.prl
+index 8924981..f280ecf 100644
+--- a/scripts/raw_to_xgraph.prl
++++ b/scripts/raw_to_xgraph.prl
+@@ -56,8 +56,6 @@ Convert raw sample data into something xgraph can plot.
+ END
+ }
+
+-#__SHARED_SETUP__
+-
+ $stream = STDIN;
+ $sample_rate = 1;
+
+diff --git a/scripts/resynth.sh b/scripts/resynth.sh
+index 0cdc63d..f978fc8 100755
+--- a/scripts/resynth.sh
++++ b/scripts/resynth.sh
+@@ -63,8 +63,6 @@ EOF
+ exit $1
+ }
+
+-#__SHARED_SETUP__
+-
+ invert=false
+ voiced=''
+ pre=0
+diff --git a/scripts/tex_to_images.prl b/scripts/tex_to_images.prl
+index 08cb604..6799428 100644
+--- a/scripts/tex_to_images.prl
++++ b/scripts/tex_to_images.prl
+@@ -79,8 +79,6 @@ END
+ exit($_[0]);
+ }
+
+-#__SHARED_SETUP__
+-
+ $out_pattern="image_NNN.FFF";
+ $scale=3;
+ $over=2;
+--
+1.6.3.3
+
diff --git a/speech-tools/2.1-r2/patch/10_all_base_class.patch b/speech-tools/2.1-r2/patch/10_all_base_class.patch
new file mode 100644
index 0000000..87b4a45
--- /dev/null
+++ b/speech-tools/2.1-r2/patch/10_all_base_class.patch
@@ -0,0 +1,12 @@
+diff --git a/base_class/Makefile b/base_class/Makefile
+index 7a5d802..d2deabc 100644
+--- a/base_class/Makefile
++++ b/base_class/Makefile
+@@ -72,7 +72,3 @@ FILES = $(SRCS) EST_Pathname_win32.cc $(T) $(H)\
+ ALL = .buildlib $(BUILD_DIRS)
+
+ include $(TOP)/config/common_make_rules
+-
+-# Always compile with -O3 as its an important function
+-rateconv.o:
+- $(CXX_COMMAND) -O3 rateconv.cc -o rateconv.o
diff --git a/speech-tools/2.1-r2/patch/81_all_etcpath.patch b/speech-tools/2.1-r2/patch/81_all_etcpath.patch
new file mode 100644
index 0000000..6341d6d
--- /dev/null
+++ b/speech-tools/2.1-r2/patch/81_all_etcpath.patch
@@ -0,0 +1,17 @@
+diff -ur speech_tools/main/siod_main.cc speech_tools/main/siod_main.cc
+--- speech_tools/main/siod_main.cc 2004-09-30 08:53:36.000000000 -0400
++++ speech_tools/main/siod_main.cc 2007-03-13 00:49:35.000000000 -0400
+@@ -224,10 +224,10 @@
+ cons(flocons(subminor),NIL))));
+
+ EST_Pathname etcdircommon = est_libdir;
+- etcdircommon += "etc";
++ etcdircommon += "etc/";
+
+- EST_Pathname etcdir = etcdircommon;
+- etcdir += est_ostype;
++ EST_Pathname etcdir = {{HORRIBLELIBARCHKLUDGE}};
++ etcdir += "festival/etc/";
+
+ // Modify my PATH to include these directories
+ siod_set_lval("etc-path",cons(rintern(etcdir),
diff --git a/speech-tools/2.1-r2/patch/91_all_gentoo-config.patch b/speech-tools/2.1-r2/patch/91_all_gentoo-config.patch
new file mode 100644
index 0000000..2c1cc14
--- /dev/null
+++ b/speech-tools/2.1-r2/patch/91_all_gentoo-config.patch
@@ -0,0 +1,25 @@
+diff --git a/config/config.in b/config/config.in
+index 8edebc8..53f71d6 100644
+--- a/config/config.in
++++ b/config/config.in
+@@ -56,16 +56,16 @@ CONFIGURATION =
+ ##
+ ## OPTIMISE=4 will turn off DEBUG
+
+-OPTIMISE=3
++OPTIMISE=0
+ WARN=1
+ # VERBOSE=1
+-#DEBUG=1
++DEBUG=0
+ # PROFILE=gprof
+-#SHARED=2
++SHARED=2
+
+ ## Directory specific selections which override the above
+
+-OPTIMISE_sigpr = 3
++#OPTIMISE_sigpr = 3
+
+ ###########################################################################
+ ## Feature selection.
diff --git a/speech-tools/2.1-r2/patch/92_all_ldflags_fix.patch b/speech-tools/2.1-r2/patch/92_all_ldflags_fix.patch
new file mode 100644
index 0000000..fb3edb5
--- /dev/null
+++ b/speech-tools/2.1-r2/patch/92_all_ldflags_fix.patch
@@ -0,0 +1,11 @@
+diff -uNr speech_tools.orig/config/rules/defaults.mak speech_tools/config/rules/defaults.mak
+--- speech_tools.orig/config/rules/defaults.mak 2011-02-08 19:58:10.000000000 -0500
++++ speech_tools/config/rules/defaults.mak 2011-02-08 19:58:53.000000000 -0500
+@@ -202,6 +202,6 @@
+ ## Link a program (not including libraries)
+
+ ifndef LINK_COMMAND
+- LINK_COMMAND = $(CXX) $(LINKFLAGS) $(TEMPLATES)
++ LINK_COMMAND = $(CXX) $(LINKFLAGS) $(OS_LIBS) $(TEMPLATES)
+ endif
+
diff --git a/speech-tools/2.1-r2/patch/92_all_mixed_cxxflag_cflag_fix.patch b/speech-tools/2.1-r2/patch/92_all_mixed_cxxflag_cflag_fix.patch
new file mode 100644
index 0000000..11769a8
--- /dev/null
+++ b/speech-tools/2.1-r2/patch/92_all_mixed_cxxflag_cflag_fix.patch
@@ -0,0 +1,12 @@
+diff -uNr speech_tools.orig/config/compilers/gcc_defaults.mak speech_tools/config/compilers/gcc_defaults.mak
+--- speech_tools.orig/config/compilers/gcc_defaults.mak 2012-11-28 18:33:27.000000000 -0500
++++ speech_tools/config/compilers/gcc_defaults.mak 2012-11-28 18:33:46.000000000 -0500
+@@ -48,7 +48,7 @@
+ COMPILER_VERSION_COMMAND=$(CXX) -v 2>&1 | tail -1 | sed -e 's/^....//'
+
+ CFLAGS = $(GCC_SYSTEM_OPTIONS) $(CC_OTHER_FLAGS)
+-CXXFLAGS = $(GCC_SYSTEM_OPTIONS) -fno-implicit-templates $(CC_OTHER_FLAGS)
++CXXFLAGS = $(GCC_SYSTEM_OPTIONS) -fno-implicit-templates $(CXX_OTHER_FLAGS)
+
+ DEBUG_CCFLAGS = -g
+ DEBUG_CXXFLAGS = -g
diff --git a/speech-tools/2.1-r2/patch/93_all_gcc4.7.patch b/speech-tools/2.1-r2/patch/93_all_gcc4.7.patch
new file mode 100644
index 0000000..e99a17b
--- /dev/null
+++ b/speech-tools/2.1-r2/patch/93_all_gcc4.7.patch
@@ -0,0 +1,82 @@
+diff -uNr speech_tools.orig/include/EST_TIterator.h speech_tools/include/EST_TIterator.h
+--- speech_tools.orig/include/EST_TIterator.h 2012-12-02 22:15:30.000000000 +0000
++++ speech_tools/include/EST_TIterator.h 2012-12-02 22:17:37.000000000 +0000
+@@ -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();}
+@@ -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();}
+
+diff -uNr speech_tools.orig/base_class/EST_TSimpleMatrix.cc speech_tools/base_class/EST_TSimpleMatrix.cc
+--- speech_tools.orig/base_class/EST_TSimpleMatrix.cc 2012-12-02 22:24:35.000000000 +0000
++++ speech_tools/base_class/EST_TSimpleMatrix.cc 2012-12-02 22:29:10.000000000 +0000
+@@ -99,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];
+@@ -128,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);
+diff -uNr speech_tools.orig/base_class/EST_TSimpleVector.cc speech_tools/base_class/EST_TSimpleVector.cc
+--- speech_tools.orig/base_class/EST_TSimpleVector.cc 2012-12-02 22:24:35.000000000 +0000
++++ speech_tools/base_class/EST_TSimpleVector.cc 2012-12-02 22:29:42.000000000 +0000
+@@ -71,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)
+ {
+diff -uNr speech_tools.orig/config/compilers/gcc_defaults.mak speech_tools/config/compilers/gcc_defaults.mak
+--- speech_tools.orig/config/compilers/gcc_defaults.mak 2012-12-02 22:24:35.000000000 +0000
++++ speech_tools/config/compilers/gcc_defaults.mak 2012-12-02 22:34:22.000000000 +0000
+@@ -81,7 +81,7 @@
+ SHARED_LINKFLAGS =
+
+ ifndef GCC_MAKE_SHARED_LIB
+- MAKE_SHARED_LIB = $(CXX) -shared -fno-shared-data -o XXX
++ MAKE_SHARED_LIB = $(CXX) -shared -o XXX
+ else
+ MAKE_SHARED_LIB = $(GCC_MAKE_SHARED_LIB)
+ endif
+diff -uNr speech_tools.orig/include/EST_TNamedEnum.h speech_tools/include/EST_TNamedEnum.h
+--- speech_tools.orig/include/EST_TNamedEnum.h 2012-12-02 22:24:35.000000000 +0000
++++ speech_tools/include/EST_TNamedEnum.h 2012-12-02 22:26:00.000000000 +0000
+@@ -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); };
+
+ };
+