mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Javier Fileiv <javier.fileiv@gmail.com>
Subject: Re: [ptxdist] Problem adding new package.
Date: Wed, 09 Oct 2013 21:21:55 +0200	[thread overview]
Message-ID: <5255ACD3.9030104@pengutronix.de> (raw)
In-Reply-To: <CABvwO2AVJwOsrPmbUeG_B3Vzp_S3cx3S0=NDjmZWDWruVtLHOA@mail.gmail.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 861 bytes --]

Hello Javier,

please keep the mailinglist on Cc.

On 10/09/2013 08:50 PM, Javier Fileiv wrote:
> Now, I set everything as you said but is not linking... I used as the
> build package for the ptxdist newpackage as "src-make-prog"...is that ok?

As this package is sort of autotoolized better use:

    ptxdist newpackage target

However I've done that for you, apply this patch to your BSP. At least
speech_tools produce some static libs. If you want anything else, it's
up to you.

> p.s.> I didnt do top-post now, right? ;)

Nope, still top-posting.

cheers,
MArc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.2: 0001-speech_tools-add-new-package.patch --]
[-- Type: text/x-diff; name="0001-speech_tools-add-new-package.patch", Size: 10420 bytes --]

From 7efba85f615befc8afe53859070c9b8ff59df5d0 Mon Sep 17 00:00:00 2001
From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Wed, 9 Oct 2013 21:19:16 +0200
Subject: [PATCH] speech_tools: add new package

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 ...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 <mkl@pengutronix.de>
+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 <drysdalepete@gmail.com>
+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 <fstream>
+ #include <iostream>
++#include <cstring>
+ #include "EST_cutils.h"
+ 
+ template<class T> 
+@@ -51,7 +52,7 @@ void EST_TSimpleMatrix<T>::copy_data(const EST_TSimpleMatrix<T> &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<T>::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<T>::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 <fstream>
++#include <cstring>
+ #include "EST_cutils.h"
+ 
+ template<class T> void EST_TSimpleVector<T>::copy(const EST_TSimpleVector<T> &a)
+@@ -50,7 +51,7 @@ template<class T> void EST_TSimpleVector<T>::copy(const EST_TSimpleVector<T> &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<T> *)this)->copy(a);
+@@ -70,7 +71,7 @@ template<class T> void EST_TSimpleVector<T>::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<class T> EST_TSimpleVector<T> &EST_TSimpleVector<T>::operator=(const ES
+ template<class T> void EST_TSimpleVector<T>::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<T> *)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<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); };
+ 
+ };
+ 
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 <mkl@pengutronix.de>
+#
+# 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 <mkl@pengutronix.de>")
+	@$(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


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2013-10-09 19:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-05 18:14 Javier Fileiv
2013-10-05 18:27 ` Marc Kleine-Budde
2013-10-06  8:56   ` Javier Fileiv
     [not found]     ` <CABvwO2D==XqM_d06=kA8PZPTQdtNPWdHwOnBXrexGb6HZwZh2w@mail.gmail.com>
2013-10-06  9:59       ` [ptxdist] Fwd: " Javier Fileiv
2013-10-06 10:04     ` [ptxdist] " Marc Kleine-Budde
2013-10-09  7:22       ` Javier Fileiv
2013-10-09  7:27         ` Javier Fileiv
2013-10-09 11:11           ` Marc Kleine-Budde
2013-10-09 18:50             ` Javier Fileiv
2013-10-09 19:21               ` Marc Kleine-Budde [this message]
2013-10-10 19:53                 ` Javier Fileiv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5255ACD3.9030104@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=javier.fileiv@gmail.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox