From 7efba85f615befc8afe53859070c9b8ff59df5d0 Mon Sep 17 00:00:00 2001 From: Marc Kleine-Budde Date: Wed, 9 Oct 2013 21:19:16 +0200 Subject: [PATCH] speech_tools: add new package Signed-off-by: Marc Kleine-Budde --- ...s-HACK-build-system-to-make-CC-and-CXX-ov.patch | 24 ++++ ...02-fix-compilation-with-modern-toolchains.patch | 133 +++++++++++++++++++++ patches/speech_tools-2.1/series | 5 + rules/speech_tools.in | 7 ++ rules/speech_tools.make | 58 +++++++++ 5 files changed, 227 insertions(+) create mode 100644 patches/speech_tools-2.1/0001-gcc_defaults-HACK-build-system-to-make-CC-and-CXX-ov.patch create mode 100644 patches/speech_tools-2.1/0002-fix-compilation-with-modern-toolchains.patch create mode 100644 patches/speech_tools-2.1/series create mode 100644 rules/speech_tools.in create mode 100644 rules/speech_tools.make diff --git a/patches/speech_tools-2.1/0001-gcc_defaults-HACK-build-system-to-make-CC-and-CXX-ov.patch b/patches/speech_tools-2.1/0001-gcc_defaults-HACK-build-system-to-make-CC-and-CXX-ov.patch new file mode 100644 index 0000000..4796247 --- /dev/null +++ b/patches/speech_tools-2.1/0001-gcc_defaults-HACK-build-system-to-make-CC-and-CXX-ov.patch @@ -0,0 +1,24 @@ +From: Marc Kleine-Budde +Date: Wed, 9 Oct 2013 09:30:38 +0200 +Subject: [PATCH] gcc_defaults: HACK build system to make CC and CXX + overwriteable + +--- + config/compilers/gcc_defaults.mak | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/config/compilers/gcc_defaults.mak b/config/compilers/gcc_defaults.mak +index a885266..9a5291e 100644 +--- a/config/compilers/gcc_defaults.mak ++++ b/config/compilers/gcc_defaults.mak +@@ -38,8 +38,8 @@ + ## ## + ########################################################################### + +-CC=gcc +-CXX=gcc ++CC=$(CC) ++CXX=$(CXX) + ifeq ($(OSTYPE),Darwin) + CXX=g++ + endif diff --git a/patches/speech_tools-2.1/0002-fix-compilation-with-modern-toolchains.patch b/patches/speech_tools-2.1/0002-fix-compilation-with-modern-toolchains.patch new file mode 100644 index 0000000..9a9b106 --- /dev/null +++ b/patches/speech_tools-2.1/0002-fix-compilation-with-modern-toolchains.patch @@ -0,0 +1,133 @@ +From: Peter Drysdale +Date: Wed, 9 Oct 2013 21:16:55 +0200 +Subject: [PATCH] fix compilation with modern toolchains + +This patch allows compiling of festival on gcc 4.7 and clang 3.0. +Both these compilers are stricter of unqualified method calls in +templates than previous versions of gcc. +This patch should not alter the code in a substantive way as it +only qualifies method calls which were assumed in previous compilers. +No copyright subsists in this patch as it is too trivial. +--- + base_class/EST_TSimpleMatrix.cc | 9 +++++---- + base_class/EST_TSimpleVector.cc | 7 ++++--- + include/EST_TIterator.h | 4 ++-- + include/EST_TNamedEnum.h | 2 +- + 4 files changed, 12 insertions(+), 10 deletions(-) + +diff --git a/base_class/EST_TSimpleMatrix.cc b/base_class/EST_TSimpleMatrix.cc +index ca6bdf7..09b989f 100644 +--- a/base_class/EST_TSimpleMatrix.cc ++++ b/base_class/EST_TSimpleMatrix.cc +@@ -44,6 +44,7 @@ + #include "EST_TVector.h" + #include + #include ++#include + #include "EST_cutils.h" + + template +@@ -51,7 +52,7 @@ void EST_TSimpleMatrix::copy_data(const EST_TSimpleMatrix &a) + { + + if (!a.p_sub_matrix && !this->p_sub_matrix) +- memcpy((void *)&this->a_no_check(0,0), ++ std::memcpy((void *)&this->a_no_check(0,0), + (const void *)&a.a_no_check(0,0), + this->num_rows()*this->num_columns()*sizeof(T) + ); +@@ -98,7 +99,7 @@ void EST_TSimpleMatrix::resize(int new_rows, + { + 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 @@ void EST_TSimpleMatrix::resize(int new_rows, + 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 --git a/base_class/EST_TSimpleVector.cc b/base_class/EST_TSimpleVector.cc +index c6a0acf..ea9bcc6 100644 +--- a/base_class/EST_TSimpleVector.cc ++++ b/base_class/EST_TSimpleVector.cc +@@ -43,6 +43,7 @@ + #include "EST_TSimpleVector.h" + #include "EST_matrix_support.h" + #include ++#include + #include "EST_cutils.h" + + template void EST_TSimpleVector::copy(const EST_TSimpleVector &a) +@@ -50,7 +51,7 @@ template void EST_TSimpleVector::copy(const EST_TSimpleVector &a) + if (this->p_column_step==1 && a.p_column_step==1) + { + resize(a.n(), FALSE); +- memcpy((void *)(this->p_memory), (const void *)(a.p_memory), this->n() * sizeof(T)); ++ std::memcpy((void *)(this->p_memory), (const void *)(a.p_memory), this->n() * sizeof(T)); + } + else + ((EST_TVector *)this)->copy(a); +@@ -70,7 +71,7 @@ template void EST_TSimpleVector::resize(int newn, int set) + int old_offset = this->p_offset; + unsigned int q; + +- just_resize(newn, &old_vals); ++ this->just_resize(newn, &old_vals); + + if (set && old_vals) + { +@@ -140,7 +141,7 @@ template EST_TSimpleVector &EST_TSimpleVector::operator=(const ES + template void EST_TSimpleVector::zero() + { + if (this->p_column_step==1) +- memset((void *)(this->p_memory), 0, this->n() * sizeof(T)); ++ std::memset((void *)(this->p_memory), 0, this->n() * sizeof(T)); + else + ((EST_TVector *)this)->fill(*this->def_val); + } +diff --git a/include/EST_TIterator.h b/include/EST_TIterator.h +index e2c6e0b..3ae2201 100644 +--- a/include/EST_TIterator.h ++++ b/include/EST_TIterator.h +@@ -209,7 +209,7 @@ public: + + /// 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 @@ public: + + /// 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 --git a/include/EST_TNamedEnum.h b/include/EST_TNamedEnum.h +index 8f54d73..f1e5aa1 100644 +--- a/include/EST_TNamedEnum.h ++++ b/include/EST_TNamedEnum.h +@@ -130,7 +130,7 @@ public: + {this->initialise((const void *)defs); }; + EST_TNamedEnumI(EST_TValuedEnumDefinition 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); }; + + }; + diff --git a/patches/speech_tools-2.1/series b/patches/speech_tools-2.1/series new file mode 100644 index 0000000..ca37de6 --- /dev/null +++ b/patches/speech_tools-2.1/series @@ -0,0 +1,5 @@ +# generated by git-ptx-patches +#tag:base --start-number 1 +0001-gcc_defaults-HACK-build-system-to-make-CC-and-CXX-ov.patch +0002-fix-compilation-with-modern-toolchains.patch +# 4bb08202a42b3001d652f86363a19d81 - git-ptx-patches magic diff --git a/rules/speech_tools.in b/rules/speech_tools.in new file mode 100644 index 0000000..25050c0 --- /dev/null +++ b/rules/speech_tools.in @@ -0,0 +1,7 @@ +## SECTION=project_specific + +config SPEECH_TOOLS + tristate + prompt "speech_tools" + help + FIXME diff --git a/rules/speech_tools.make b/rules/speech_tools.make new file mode 100644 index 0000000..88a723e --- /dev/null +++ b/rules/speech_tools.make @@ -0,0 +1,58 @@ +# -*-makefile-*- +# +# Copyright (C) 2013 by Marc Kleine-Budde +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_SPEECH_TOOLS) += speech_tools + +# +# Paths and names +# +SPEECH_TOOLS_VERSION := 2.1 +SPEECH_TOOLS_MD5 := 6920ddc75b042910a3bcfee3ab106938 +SPEECH_TOOLS := speech_tools-$(SPEECH_TOOLS_VERSION) +SPEECH_TOOLS_SUFFIX := tar.gz +SPEECH_TOOLS_URL := http://www.cstr.ed.ac.uk/downloads/festival/$(SPEECH_TOOLS_VERSION)/$(SPEECH_TOOLS)-release.$(SPEECH_TOOLS_SUFFIX) +SPEECH_TOOLS_SOURCE := $(SRCDIR)/$(SPEECH_TOOLS).$(SPEECH_TOOLS_SUFFIX) +SPEECH_TOOLS_DIR := $(BUILDDIR)/$(SPEECH_TOOLS) +SPEECH_TOOLS_LICENSE := unknown + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +# +# autoconf +# +SPEECH_TOOLS_CONF_TOOL := autoconf +SPEECH_TOOLS_MAKE_OPT := $(CROSS_ENV_CC) $(CROSS_ENV_CXX) +SPEECH_TOOLS_MAKE_PAR := NO + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/speech_tools.targetinstall: + @$(call targetinfo) + + @$(call install_init, speech_tools) + @$(call install_fixup, speech_tools,PRIORITY,optional) + @$(call install_fixup, speech_tools,SECTION,base) + @$(call install_fixup, speech_tools,AUTHOR,"Marc Kleine-Budde ") + @$(call install_fixup, speech_tools,DESCRIPTION,missing) + +# @$(call install_copy, speech_tools, 0, 0, 0755, $(SPEECH_TOOLS_DIR)/foobar, /dev/null) + + @$(call install_finish, speech_tools) + + @$(call touch) + +# vim: syntax=make -- 1.8.4.rc3