Skip to contentSkip to conversation

flite: depend on alsa-lib when available

PATCH New Baruch Siach 3 participants 8 messages May 1, 2014 – May 22, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 flite: depend on alsa-lib when available

The flite configure script detects the availability of alsa-lib. Add alsa-lib to flite dependencies to make sure alsa-lib is always detected when available.

---
 package/flite/flite.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/flite/flite.mk +7 -0
index 7511b87731e7..08d2ce1622f9 100644
@@ -38,4 +38,11 @@ define FLITE_EXTRACT_CMDS
 	$(RM) -rf $(BUILD_DIR)/$(subst .tar.bz2,,$(FLITE_SOURCE))
 endef
 
+ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
+FLITE_DEPENDENCIES += alsa-lib
+FLITE_CONF_OPT += --with-audio=alsa
+else
+FLITE_CONF_OPT += --with-audio=oss
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
1.9.2
#1 lore raw

PATCH 2/2 flite: fix static linking against alsa

Fixes:
http://autobuild.buildroot.net/results/3ff/3ff2217a4fccbddbdb2bc8ade68c88fc52848d36/

---
 package/flite/flite-0002-fix-alsa-static.patch | 19 +++++++++++++++++++
 package/flite/flite.mk                         |  3 +++
 2 files changed, 22 insertions(+)
 create mode 100644 package/flite/flite-0002-fix-alsa-static.patch
package/flite/flite-0002-fix-alsa-static.patch new file +19 -0
new file mode 100644
index 000000000000..7ed4899cc4f7
@@ -0,0 +1,19 @@
+Use pkg-config to determine alsa link flags. This fixes static linking.
+
+Signed-off-by: Baruch Siach <[email protected]>
+
+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
+@@ -275,7 +275,10 @@
+                 #endif],
+               [AUDIODRIVER="alsa"
+ 	       AUDIODEFS=-DCST_AUDIO_ALSA
+-               AUDIOLIBS=-lasound])
++               AUDIOLIBS=`pkg-config --libs alsa`
++               if test "$shared" = false; then
++                   AUDIOLIBS=`pkg-config --libs --static alsa`
++               fi])
+ AC_CHECK_HEADER(mmsystem.h,
+ 	      [AUDIODRIVER="wince"
+ 	       AUDIODEFS=-DCST_AUDIO_WINCE
package/flite/flite.mk +3 -0
index 08d2ce1622f9..38aaebf51782 100644
@@ -11,6 +11,9 @@ 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.
Signature · 1 line
1.9.2
#2 lore raw

PATCH 2/2 flite: fix static linking against alsa

Quoted 21 lines · Baruch Siach

Fixes:
http://autobuild.buildroot.net/results/3ff/3ff2217a4fccbddbdb2bc8ade68c88fc52848d36/

---
 package/flite/flite-0002-fix-alsa-static.patch | 19 +++++++++++++++++++
 package/flite/flite.mk                         |  3 +++
 2 files changed, 22 insertions(+)
 create mode 100644 package/flite/flite-0002-fix-alsa-static.patch
package/flite/flite-0002-fix-alsa-static.patch new file +5 -0
new file mode 100644
index 000000000000..7ed4899cc4f7
@@ -0,0 +1,19 @@
+Use pkg-config to determine alsa link flags. This fixes static linking.
+
+Signed-off-by: Baruch Siach <[email protected]>
+
+diff -Nuar flite-1.4-release.orig/configure.in flite-1.4-release/configure.in

package/flite/flite-0002-fix-alsa-static.patch line 15

Quoted 10 lines
package/flite/flite-0002-fix-alsa-static.patch new file +10 -0
+--- 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
+@@ -275,7 +275,10 @@
+                 #endif],
+               [AUDIODRIVER="alsa"
+ 	       AUDIODEFS=-DCST_AUDIO_ALSA
+-               AUDIOLIBS=-lasound])
++               AUDIOLIBS=`pkg-config --libs alsa`
++               if test "$shared" = false; then
++                   AUDIOLIBS=`pkg-config --libs --static alsa`

In the light of Thomas's wish of having a more fundamental solution for all
these static link issues: how about adding --static to the pkg-config wrapper?

Regards,
Arnout

Quoted 19 lines
package/flite/flite-0002-fix-alsa-static.patch new file +4 -0
++               fi])
+ AC_CHECK_HEADER(mmsystem.h,
+ 	      [AUDIODRIVER="wince"
+ 	       AUDIODEFS=-DCST_AUDIO_WINCE
package/flite/flite.mk +3 -0
index 08d2ce1622f9..38aaebf51782 100644
@@ -11,6 +11,9 @@ 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.
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#3 lore raw

PATCH 2/2 flite: fix static linking against alsa

Quoted 27 lines · Arnout Vandecappelle
Quoted 26 lines · Baruch Siach

Fixes:
http://autobuild.buildroot.net/results/3ff/3ff2217a4fccbddbdb2bc8ade68c88fc52848d36/

---
 package/flite/flite-0002-fix-alsa-static.patch | 19 +++++++++++++++++++
 package/flite/flite.mk                         |  3 +++
 2 files changed, 22 insertions(+)
 create mode 100644 package/flite/flite-0002-fix-alsa-static.patch
package/flite/flite-0002-fix-alsa-static.patch new file +10 -0
new file mode 100644
index 000000000000..7ed4899cc4f7
@@ -0,0 +1,19 @@
+Use pkg-config to determine alsa link flags. This fixes static linking.
+
+Signed-off-by: Baruch Siach <[email protected]>
+
+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
+@@ -275,7 +275,10 @@
+                 #endif],
+               [AUDIODRIVER="alsa"
Quoted 8 lines

package/flite/flite-0002-fix-alsa-static.patch line 15

Quoted 5 lines
package/flite/flite-0002-fix-alsa-static.patch new file +5 -0
+ 	       AUDIODEFS=-DCST_AUDIO_ALSA
+-               AUDIOLIBS=-lasound])
++               AUDIOLIBS=`pkg-config --libs alsa`
++               if test "$shared" = false; then
++                   AUDIOLIBS=`pkg-config --libs --static alsa`

In the light of Thomas's wish of having a more fundamental solution for all
these static link issues: how about adding --static to the pkg-config wrapper?

Ahem, looks like you had the same thought :-)

Regards,
Arnout

Quoted 26 lines

Regards,
Arnout

Quoted 19 lines
package/flite/flite-0002-fix-alsa-static.patch new file +4 -0
++               fi])
+ AC_CHECK_HEADER(mmsystem.h,
+ 	      [AUDIODRIVER="wince"
+ 	       AUDIODEFS=-DCST_AUDIO_WINCE
package/flite/flite.mk +3 -0
index 08d2ce1622f9..38aaebf51782 100644
@@ -11,6 +11,9 @@ 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.
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#4 lore raw

PATCH 2/2 flite: fix static linking against alsa

In reply to Arnout Vandecappelle

Hi Arnout,

Quoted 27 lines · Arnout Vandecappelle
Quoted 26 lines · Baruch Siach

Fixes:
http://autobuild.buildroot.net/results/3ff/3ff2217a4fccbddbdb2bc8ade68c88fc52848d36/

---
 package/flite/flite-0002-fix-alsa-static.patch | 19 +++++++++++++++++++
 package/flite/flite.mk                         |  3 +++
 2 files changed, 22 insertions(+)
 create mode 100644 package/flite/flite-0002-fix-alsa-static.patch
package/flite/flite-0002-fix-alsa-static.patch new file +10 -0
new file mode 100644
index 000000000000..7ed4899cc4f7
@@ -0,0 +1,19 @@
+Use pkg-config to determine alsa link flags. This fixes static linking.
+
+Signed-off-by: Baruch Siach <[email protected]>
+
+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
+@@ -275,7 +275,10 @@
+                 #endif],
+               [AUDIODRIVER="alsa"
Quoted 8 lines

package/flite/flite-0002-fix-alsa-static.patch line 15

Quoted 5 lines
package/flite/flite-0002-fix-alsa-static.patch new file +5 -0
+ 	       AUDIODEFS=-DCST_AUDIO_ALSA
+-               AUDIOLIBS=-lasound])
++               AUDIOLIBS=`pkg-config --libs alsa`
++               if test "$shared" = false; then
++                   AUDIOLIBS=`pkg-config --libs --static alsa`

In the light of Thomas's wish of having a more fundamental solution for all
these static link issues: how about adding --static to the pkg-config wrapper?

It is precisely because of Thomas wish for upstream-able solutions that I did it this way. Adding the pkg-config without the 'if' part is enough to solve the problem when combined with http://patchwork.ozlabs.org/patch/326741/, but it's otherwise mostly useless for upstream. That being said, I couldn't find any active upstream to send this patch to.

baruch

Quoted 18 lines
Quoted 18 lines
package/flite/flite-0002-fix-alsa-static.patch new file +4 -0
++               fi])
+ AC_CHECK_HEADER(mmsystem.h,
+ 	      [AUDIODRIVER="wince"
+ 	       AUDIODEFS=-DCST_AUDIO_WINCE
package/flite/flite.mk +3 -0
index 08d2ce1622f9..38aaebf51782 100644
@@ -11,6 +11,9 @@ 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.
Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#5 lore raw

PATCH 2/2 flite: fix static linking against alsa

In reply to Baruch Siach

Hi Buildroot list,

Quoted 2 lines · Baruch Siach

Fixes:
http://autobuild.buildroot.net/results/3ff/3ff2217a4fccbddbdb2bc8ade68c88fc52848d36/

Ping.
I believe this should go in for 2014.05.

baruch

Quoted 46 lines
---
 package/flite/flite-0002-fix-alsa-static.patch | 19 +++++++++++++++++++
 package/flite/flite.mk                         |  3 +++
 2 files changed, 22 insertions(+)
 create mode 100644 package/flite/flite-0002-fix-alsa-static.patch
package/flite/flite-0002-fix-alsa-static.patch new file +19 -0
new file mode 100644
index 000000000000..7ed4899cc4f7
@@ -0,0 +1,19 @@
+Use pkg-config to determine alsa link flags. This fixes static linking.
+
+Signed-off-by: Baruch Siach <[email protected]>
+
+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
+@@ -275,7 +275,10 @@
+                 #endif],
+               [AUDIODRIVER="alsa"
+ 	       AUDIODEFS=-DCST_AUDIO_ALSA
+-               AUDIOLIBS=-lasound])
++               AUDIOLIBS=`pkg-config --libs alsa`
++               if test "$shared" = false; then
++                   AUDIOLIBS=`pkg-config --libs --static alsa`
++               fi])
+ AC_CHECK_HEADER(mmsystem.h,
+ 	      [AUDIODRIVER="wince"
+ 	       AUDIODEFS=-DCST_AUDIO_WINCE
package/flite/flite.mk +3 -0
index 08d2ce1622f9..38aaebf51782 100644
@@ -11,6 +11,9 @@ 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.
Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#7 lore raw

PATCH 1/2 flite: depend on alsa-lib when available

In reply to Baruch Siach
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

The flite configure script detects the availability of alsa-lib. Add alsa-lib to flite dependencies to make sure alsa-lib is always detected when available.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard