From patchwork Tue Oct 8 10:28:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Aujon X-Patchwork-Id: 281397 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 09AD12C0085 for ; Tue, 8 Oct 2013 21:28:53 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 18B872F866; Tue, 8 Oct 2013 10:28:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 293JxBJIitan; Tue, 8 Oct 2013 10:28:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id DB99726D37; Tue, 8 Oct 2013 10:28:48 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 810631BF9FF for ; Tue, 8 Oct 2013 10:28:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 80182856B0 for ; Tue, 8 Oct 2013 10:28:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TiOSmuHb9QtL for ; Tue, 8 Oct 2013 10:28:46 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by whitealder.osuosl.org (Postfix) with ESMTPS id 9FC98828D5 for ; Tue, 8 Oct 2013 10:28:46 +0000 (UTC) Received: by mail-wi0-f180.google.com with SMTP id hj3so6337600wib.1 for ; Tue, 08 Oct 2013 03:28:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=sCgpBlQk4tb5vinhZSb4DeLQu48RNRX5Y5ZbAilNwiE=; b=CFl42hrDEk6HV9wcDOz+4qEuvDqdCfPYmJzkh/JfY/8mat9Zy+XXxyiMXwuZTLWXHz 7FENJ0CnRWiMTUqIB0au4opzEqMcP2TJUmWgJ7mq7RgfhcUwslDa8zzZ2TmOW4x6hoJ1 1r2qJea8WqX+FUivCApSGyMv7kh/hUFcTF5017HV2JN0nAtf7In9l50PnqAWcFFc0MbC b/CBjOXdZI1gh8m4dVmlRPnrkj5qvK/L6ypBhPT8t5+wgJpN9veYnKoYFzDgYpfT56Eg K7dDsqdXc94XpLL1UaYT3ORj5lq7cLvR7VDWDlvXndYsFFH9akIQkqiNdrVrFtT3NGHc KHjA== X-Received: by 10.180.184.107 with SMTP id et11mr23317048wic.60.1381228125196; Tue, 08 Oct 2013 03:28:45 -0700 (PDT) Received: from gmail.com ([78.250.67.21]) by mx.google.com with ESMTPSA id q5sm3761166wiz.3.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 08 Oct 2013 03:28:44 -0700 (PDT) From: arnaud.aujon@gmail.com To: buildroot@busybox.net Date: Tue, 8 Oct 2013 12:28:09 +0200 Message-Id: <1381228089-3151-1-git-send-email-arnaud.aujon@gmail.com> X-Mailer: git-send-email 1.8.3.1 Subject: [Buildroot] [PATCH v2] Add new package espeak, a speech synthesizer software X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net From: Arnaud Aujon Signed-off-by: Arnaud Aujon --- package/Config.in | 1 + package/espeak/Config.in | 53 ++++++++++++++++++++++ .../espeak-1-do-not-compil-when-install.patch | 15 ++++++ package/espeak/espeak.mk | 41 +++++++++++++++++ 4 files changed, 110 insertions(+) create mode 100644 package/espeak/Config.in create mode 100644 package/espeak/espeak-1-do-not-compil-when-install.patch create mode 100644 package/espeak/espeak.mk diff --git a/package/Config.in b/package/Config.in index 424e40d..b5f411f 100644 --- a/package/Config.in +++ b/package/Config.in @@ -6,6 +6,7 @@ menu "Audio and video applications" source "package/alsa-utils/Config.in" source "package/aumix/Config.in" source "package/bellagio/Config.in" +source "package/espeak/Config.in" source "package/faad2/Config.in" source "package/ffmpeg/Config.in" source "package/flac/Config.in" diff --git a/package/espeak/Config.in b/package/espeak/Config.in new file mode 100644 index 0000000..5fd1715 --- /dev/null +++ b/package/espeak/Config.in @@ -0,0 +1,53 @@ +comment "eSpeak requires a toolchain with C++ and WCHAR support" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR) + +config BR2_PACKAGE_ESPEAK + bool "eSpeak" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + help + eSpeak is a speech synthesizer software for English and other languages. + + http://espeak.sourceforge.net/ + + + +if BR2_PACKAGE_ESPEAK + +config BR2_PACKAGE_ESPEAK_SOUND + bool +choice + prompt "choose audio backend" + default BR2_PACKAGE_ESPEAK_SOUND_NOSOUND + help + Select the audio backend you want to use + + config BR2_PACKAGE_ESPEAK_SOUND_NOSOUND + bool "No sound backend, only produce wav files" + + comment "ALSA backend requires a toolchain with threads support" + depends on !(BR2_TOOLCHAIN_HAS_THREADS) + + config BR2_PACKAGE_ESPEAK_SOUND_ALSA + bool "Portaudio and ALSA" + select BR2_PACKAGE_PORTAUDIO + select BR2_PACKAGE_PORTAUDIO_CXX + depends on BR2_TOOLCHAIN_HAS_THREADS #portaudio + help + Allow eSpeak to output sound using ALSA + + comment "Pulseaudio backend requires a toolchain with WCHAR, LARGEFILE and threads support" + depends on !(BR2_TOOLCHAIN_HAS_THREADS && BR2_USE_WCHAR && BR2_LARGEFILE) + + config BR2_PACKAGE_ESPEAK_SOUND_PULSEAUDIO + bool "pulseaudio" + select BR2_PACKAGE_PULSEAUDIO + depends on BR2_TOOLCHAIN_HAS_THREADS # pulseaudio + depends on BR2_USE_WCHAR # pulseaudio + depends on BR2_LARGEFILE # pulseaudio + help + Allow eSpeak to output sound using Pulseaudio + + +endchoice +endif #BR2_PACKAGE_ESPEAK diff --git a/package/espeak/espeak-1-do-not-compil-when-install.patch b/package/espeak/espeak-1-do-not-compil-when-install.patch new file mode 100644 index 0000000..744af62 --- /dev/null +++ b/package/espeak/espeak-1-do-not-compil-when-install.patch @@ -0,0 +1,15 @@ +Index: espeak-1.47.11-source/src/Makefile +Makefile: do not executethe rule "all" when executing "install" +signed-off-by Arnaud Aujon +=================================================================== +--- espeak-1.47.11-source.orig/src/Makefile ++++ espeak-1.47.11-source/src/Makefile +@@ -131,7 +131,7 @@ + rm -f $(BIN2_NAME) + rm -f $(LIB_NAME)* + +-install: all ++install: + # Create directories + rm -rf $(DESTDIR)$(DATADIR) + $(MKDIR) $(DESTDIR)$(BINDIR) diff --git a/package/espeak/espeak.mk b/package/espeak/espeak.mk new file mode 100644 index 0000000..47ecc0a --- /dev/null +++ b/package/espeak/espeak.mk @@ -0,0 +1,41 @@ +############################################################################### +# +# eSpeak +# +################################################################################ +ESPEAK_VERSION = 1.47.11-source +ESPEAK_SOURCE = espeak-$(ESPEAK_VERSION).zip +ESPEAK_SITE = http://sourceforge.net/projects/espeak/files/espeak/espeak-1.47 +ESPEAK_LICENSE = GPLv3 +ESPEAK_LICENSE_FILES = Licence.txt + +ifeq ($(BR2_PACKAGE_ESPEAK_SOUND_ALSA), y) +AUDIO = portaudio +ESPEAK_DEPENDENCIES = portaudio +endif +ifeq ($(BR2_PACKAGE_ESPEAK_SOUND_PULSEAUDIO), y) +AUDIO = pulseaudio +ESPEAK_DEPENDENCIES = pulseaudio +endif +ifeq ($(BR2_PACKAGE_ESPEAK_SOUND_NOSOUND), y) +AUDIO = +endif + +define ESPEAK_EXTRACT_CMDS + unzip $(DL_DIR)/$(ESPEAK_SOURCE) -d $(BUILD_DIR) +endef + +define ESPEAK_CONFIGURE_CMDS + # next command is required because buildroot provides portaudio V19, this is explained in package ReadMe file. + cp $(@D)/src/portaudio19.h $(@D)/src/portaudio.h +endef + +define ESPEAK_BUILD_CMDS + $(MAKE) CXX="$(TARGET_CXX)" LD="$(TARGET_LD)" AUDIO="$(AUDIO)" -C $(@D)/src all +endef + +define ESPEAK_INSTALL_TARGET_CMDS + $(MAKE) install DESTDIR="$(TARGET_DIR)" -C $(@D)/src +endef + +$(eval $(generic-package))