From patchwork Thu Oct 17 14:12:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Aujon X-Patchwork-Id: 284229 X-Patchwork-Delegate: patrickdepinguin+buildroot@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 333412C00CA for ; Fri, 18 Oct 2013 01:12:23 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 357638C3C8; Thu, 17 Oct 2013 14:12:22 +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 Ps66ibWDdq+I; Thu, 17 Oct 2013 14:12:19 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 4F1E98C22E; Thu, 17 Oct 2013 14:12:19 +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 D4BEF1BF9AA for ; Thu, 17 Oct 2013 14:12:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D06748C00B for ; Thu, 17 Oct 2013 14:12:17 +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 UfSJC4mrDAhx for ; Thu, 17 Oct 2013 14:12:17 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by whitealder.osuosl.org (Postfix) with ESMTPS id E04F48C1A6 for ; Thu, 17 Oct 2013 14:12:16 +0000 (UTC) Received: by mail-wi0-f171.google.com with SMTP id h11so4163563wiv.10 for ; Thu, 17 Oct 2013 07:12:15 -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=RFet+3lUJoAoDdIr6sMXQBlZcL31Gi1NPFB06d34+7w=; b=irU2VRTqqfnjO7Enlo4Ade6TPwqGnjK8mjQ4FBZfCVuFImE6ZghFfcKzyB1sCnt2Vn crs7KZgiqLcjn9X5tlEkuSaX/cZel/EbT1nP+796iD0mPb4wcGWmMG4DLP62tFqBZwLM 641v7hgNWIaIWAzAkl1yZxTgNfZRF268dXZdZ3iLg3zCFZVKTYyfVxr+3pkaI3ywcmnF y2pR+GxtXjVGuyd3eJXF7BWOsTBLoNaJygLCSA9MHB2oqdY4BQugzcPlG23OsUunEIFJ eelcWo4d4zmAFyudqkTrBgrPyrtp1yFlQG0jQY3NhvpwlZqSBLjrem5f/Yv2XLCtBOjY 2y3A== X-Received: by 10.180.79.163 with SMTP id k3mr7105324wix.25.1382019135167; Thu, 17 Oct 2013 07:12:15 -0700 (PDT) Received: from new-host-4.home (191-161-190-109.dsl.ovh.fr. [109.190.161.191]) by mx.google.com with ESMTPSA id c10sm16635884wie.11.2013.10.17.07.12.14 for (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Thu, 17 Oct 2013 07:12:14 -0700 (PDT) From: Arnaud Aujon To: buildroot@busybox.net Date: Thu, 17 Oct 2013 16:12:04 +0200 Message-Id: <1382019124-3190-1-git-send-email-arnaud.aujon@gmail.com> X-Mailer: git-send-email 1.8.3.1 Subject: [Buildroot] [PATCH v9] espeak: new package 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 Signed-off-by: Arnaud Aujon --- Changes v8 -> v9: - use VERSION_MAJOR Changes v7 -> v8: - convert package name to lowercase - fix comments following new policy Changes v6 -> v7: - remove comment fromm v5 again Changes v5 -> v6: - fix indent - rename patch - fix licence to GPLv3+ Changes v4 -> v5: - remove useless comment line Changes v3 -> v4: - remove extre new lines - remove useless help - remove -source from ESPEAK_VERSION - update extract command to remove -source --- package/Config.in | 1 + package/espeak/Config.in | 41 ++++++++++++++++++++ .../espeak-01-do-not-compil-when-install.patch | 15 ++++++++ package/espeak/espeak.mk | 44 ++++++++++++++++++++++ 4 files changed, 101 insertions(+) create mode 100644 package/espeak/Config.in create mode 100644 package/espeak/espeak-01-do-not-compil-when-install.patch create mode 100644 package/espeak/espeak.mk diff --git a/package/Config.in b/package/Config.in index 0e6f86c..a5144bc 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..0284c5c --- /dev/null +++ b/package/espeak/Config.in @@ -0,0 +1,41 @@ +comment "espeak needs a toolchain w/ C++, wchar" + 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 +choice +prompt "choose audio backend" +default BR2_PACKAGE_ESPEAK_AUDIO_BACKEND_NONE + +config BR2_PACKAGE_ESPEAK_AUDIO_BACKEND_NONE + bool "No sound backend, only produce wav files" + +comment "alsa backend needs a toolchain w/ threads" +depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_ESPEAK_AUDIO_BACKEND_ALSA + bool "alsa via portaudio" + select BR2_PACKAGE_PORTAUDIO + select BR2_PACKAGE_PORTAUDIO_CXX + depends on BR2_TOOLCHAIN_HAS_THREADS # portaudio + +comment "pulseaudio backend needs a toolchain w/ wchar, largefile, threads" +depends on !(BR2_TOOLCHAIN_HAS_THREADS && BR2_USE_WCHAR && BR2_LARGEFILE) + +config BR2_PACKAGE_ESPEAK_AUDIO_BACKEND_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 + +endchoice +endif # BR2_PACKAGE_ESPEAK diff --git a/package/espeak/espeak-01-do-not-compil-when-install.patch b/package/espeak/espeak-01-do-not-compil-when-install.patch new file mode 100644 index 0000000..983cd1c --- /dev/null +++ b/package/espeak/espeak-01-do-not-compil-when-install.patch @@ -0,0 +1,15 @@ +Makefile: do not execute the 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..c2c346e --- /dev/null +++ b/package/espeak/espeak.mk @@ -0,0 +1,44 @@ +############################################################################### +# +# espeak +# +############################################################################### + +ESPEAK_VERSION_MAJOR = 1.47 +ESPEAK_VERSION = $(ESPEAK_VERSION_MAJOR).11 +ESPEAK_SOURCE = espeak-$(ESPEAK_VERSION)-source.zip +ESPEAK_SITE = http://downloads.sourceforge.net/project/espeak/espeak/espeak-$(ESPEAK_VERSION_MAJOR) +ESPEAK_LICENSE = GPLv3+ +ESPEAK_LICENSE_FILES = Licence.txt + +ifeq ($(BR2_PACKAGE_ESPEAK_AUDIO_BACKEND_ALSA),y) +ESPEAK_AUDIO_BACKEND = portaudio +ESPEAK_DEPENDENCIES = portaudio +endif +ifeq ($(BR2_PACKAGE_ESPEAK_AUDIO_BACKEND_PULSEAUDIO),y) +ESPEAK_AUDIO_BACKEND = pulseaudio +ESPEAK_DEPENDENCIES = pulseaudio +endif + +define ESPEAK_EXTRACT_CMDS + unzip -d $(@D) $(DL_DIR)/$(ESPEAK_SOURCE) + mv $(@D)/espeak-$(ESPEAK_VERSION)-source/* $(@D) + $(RM) -r $(@D)/espeak-$(ESPEAK_VERSION)-source +endef + +define ESPEAK_CONFIGURE_CMDS + # Buildroot provides portaudio V19, see ReadMe file for more details. + cp $(@D)/src/portaudio19.h $(@D)/src/portaudio.h +endef + +define ESPEAK_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + AUDIO="$(ESPEAK_AUDIO_BACKEND)" \ + -C $(@D)/src all +endef + +define ESPEAK_INSTALL_TARGET_CMDS + $(MAKE) install DESTDIR="$(TARGET_DIR)" -C $(@D)/src +endef + +$(eval $(generic-package))