From patchwork Sun Jul 12 14:23:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 494116 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 0EAB6140285 for ; Mon, 13 Jul 2015 00:23:52 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 2A07F33298; Sun, 12 Jul 2015 14:23: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 YujYbvNSYSqQ; Sun, 12 Jul 2015 14:23:48 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id E51AE33266; Sun, 12 Jul 2015 14:23:47 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 664FF1C1F3D for ; Sun, 12 Jul 2015 14:23:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 61DED8C173 for ; Sun, 12 Jul 2015 14:23:46 +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 URbeB8xg2qxh for ; Sun, 12 Jul 2015 14:23:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from srv-hp10.netsons.net (unknown [94.141.22.72]) by whitealder.osuosl.org (Postfix) with ESMTPS id 22B3E8B886 for ; Sun, 12 Jul 2015 14:23:44 +0000 (UTC) Received: from adsl-ull-61-76.44-151.net24.it ([151.44.76.61]:11080 helo=srv-hp10.netsons.net) by srv-hp10.netsons.net with esmtpsa (TLSv1.2:AES128-SHA256:128) (Exim 4.85) (envelope-from ) id 1ZEIAN-000rfr-Vs; Sun, 12 Jul 2015 16:23:40 +0200 From: Luca Ceresoli To: buildroot@busybox.net Date: Sun, 12 Jul 2015 16:23:14 +0200 Message-Id: <1436710994-5056-1-git-send-email-luca@lucaceresoli.net> X-Mailer: git-send-email 1.9.1 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - srv-hp10.netsons.net X-AntiAbuse: Original Domain - busybox.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lucaceresoli.net X-Get-Message-Sender-Via: srv-hp10.netsons.net: authenticated_id: luca+lucaceresoli.net/only user confirmed/virtual account not confirmed X-Source: X-Source-Args: X-Source-Dir: Cc: Luca Ceresoli Subject: [Buildroot] [PATCH] flite: use FLITE_STRIP_COMPONENTS and FLITE_SUBDIR X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 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" So far, to overcome the buggy way the flite tarball is made, we had to override the extract commands in a rather ugly way. The newly introduced _STRIP_COMPONENTS, along with _SUBDIR and a little edit to the patches, allow to remove the custom FLITE_EXTRACT_CMDS, slightly simplifying the flite.mk code. Signed-off-by: Luca Ceresoli Cc: Samuel Martin Cc: Arnout Vandecappelle --- I'm not sure this is really an improvement, because the change to the patch files is not nice. But I'm not even sure this is a bad patch. After all, it removes more lines than it adds. So, here it is... let you voice be heard, whatever you think! --- .../flite/0001-now-honor-DESTDIR-env.-var.patch | 4 +-- package/flite/0002-fix-alsa-static.patch | 4 +-- package/flite/flite.mk | 35 ++++++++++------------ 3 files changed, 19 insertions(+), 24 deletions(-) diff --git a/package/flite/0001-now-honor-DESTDIR-env.-var.patch b/package/flite/0001-now-honor-DESTDIR-env.-var.patch index 5972f34066a7..2d5fb68532e4 100644 --- a/package/flite/0001-now-honor-DESTDIR-env.-var.patch +++ b/package/flite/0001-now-honor-DESTDIR-env.-var.patch @@ -13,8 +13,8 @@ Signed-off-by: Samuel Martin diff --git a/config/config.in b/config/config.in index 914d2bf..43f1a56 100644 ---- a/config/config.in -+++ b/config/config.in +--- a/flite-1.4-release/config/config.in ++++ b/flite-1.4-release/config/config.in @@ -49,6 +49,6 @@ include $(TOP)/config/$(langvox).lv prefix = @prefix@ exec_prefix = @exec_prefix@ diff --git a/package/flite/0002-fix-alsa-static.patch b/package/flite/0002-fix-alsa-static.patch index 7ed4899cc4f7..12adb9e01881 100644 --- a/package/flite/0002-fix-alsa-static.patch +++ b/package/flite/0002-fix-alsa-static.patch @@ -3,8 +3,8 @@ Use pkg-config to determine alsa link flags. This fixes static linking. Signed-off-by: Baruch Siach diff -Nuar flite-1.4-release.orig/configure.in flite-1.4-release/configure.in ---- flite-1.4-release.orig/configure.in 2009-08-14 23:46:38.000000000 +0300 -+++ flite-1.4-release/configure.in 2014-04-30 18:52:33.253297236 +0300 +--- flite-1.4-release.orig/flite-1.4-release/configure.in 2009-08-14 23:46:38.000000000 +0300 ++++ flite-1.4-release/flite-1.4-release/configure.in 2014-04-30 18:52:33.253297236 +0300 @@ -275,7 +275,10 @@ #endif], [AUDIODRIVER="alsa" diff --git a/package/flite/flite.mk b/package/flite/flite.mk index ead73fe3dbf8..07ec47377e0f 100644 --- a/package/flite/flite.mk +++ b/package/flite/flite.mk @@ -7,18 +7,6 @@ FLITE_VERSION = 1.4 FLITE_SOURCE = flite-$(FLITE_VERSION)-release.tar.bz2 FLITE_SITE = http://www.speech.cs.cmu.edu/flite/packed/flite-$(FLITE_VERSION) -FLITE_LICENSE = BSD-4c -FLITE_LICENSE_FILES = COPYING - -FLITE_INSTALL_STAGING = YES -# Patching configure.in -FLITE_AUTORECONF = YES -FLITE_DEPENDENCIES = host-pkgconf - -# Sadly, Flite does not support parallel build, especially when building its -# shared libraries. -FLITE_MAKE = $(MAKE1) - # $ tar tf flite-1.4-release.tar.bz2 # ... # flite-1.4-release//install-sh @@ -32,14 +20,21 @@ FLITE_MAKE = $(MAKE1) # flite-1.4-release/config/config.in # flite-1.4-release/config/system.mak.in # -# So, the strip-component trick does not work at all. -# Let's redefine the extract command. -define FLITE_EXTRACT_CMDS - $(INFLATE$(suffix $(FLITE_SOURCE))) $(DL_DIR)/$(FLITE_SOURCE) | \ - $(TAR) -C $(BUILD_DIR) $(TAR_OPTIONS) - - rsync -ar $(BUILD_DIR)/$(subst .tar.bz2,,$(FLITE_SOURCE))/* $(FLITE_DIR)/ - $(RM) -rf $(BUILD_DIR)/$(subst .tar.bz2,,$(FLITE_SOURCE)) -endef +# So, we set FLITE_STRIP_COMPONENTS=0 to avoid writing to "/", and then +# build in flite-1.4-release/ +FLITE_STRIP_COMPONENTS = 0 +FLITE_SUBDIR = flite-$(FLITE_VERSION)-release +FLITE_LICENSE = BSD-4c +FLITE_LICENSE_FILES = COPYING + +FLITE_INSTALL_STAGING = YES +# Patching configure.in +FLITE_AUTORECONF = YES +FLITE_DEPENDENCIES = host-pkgconf + +# Sadly, Flite does not support parallel build, especially when building its +# shared libraries. +FLITE_MAKE = $(MAKE1) ifeq ($(BR2_PACKAGE_ALSA_LIB),y) FLITE_DEPENDENCIES += alsa-lib