flite: use FLITE_STRIP_COMPONENTS and FLITE_SUBDIR
authorLuca Ceresoli <luca@lucaceresoli.net>
Sun, 12 Jul 2015 14:23:14 +0000 (16:23 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 12 Jul 2015 15:07:18 +0000 (17:07 +0200)
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 <PKG>_STRIP_COMPONENTS, along with <PKG>_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 <luca@lucaceresoli.net>
Cc: Samuel Martin <s.martin49@gmail.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/flite/0001-now-honor-DESTDIR-env.-var.patch
package/flite/0002-fix-alsa-static.patch
package/flite/flite.mk

index 5972f34066a7e711f15027777e36b2e0f6493d1a..2d5fb68532e48f4c74b994f0ad8285f4ed2ed81b 100644 (file)
@@ -13,8 +13,8 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
 
 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@
index 7ed4899cc4f73597c230e8577c8d9aa8020fc62f..12adb9e018818f875ff66bce123ca9e2986fba21 100644 (file)
@@ -3,8 +3,8 @@ Use pkg-config to determine alsa link flags. This fixes static linking.
 Signed-off-by: Baruch Siach <baruch@tkos.co.il>
 
 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"
index ead73fe3dbf86c7ea41220ec55433754d7d0c13c..07ec47377e0fdf4db2baac1984513c1f457acb4b 100644 (file)
@@ -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