Skip to contentSkip to conversation

alsa-lib: put BR2_PACKAGE_ALSA_LIB_PYTHON under the existing if condition

PATCH New Thomas Petazzoni 3 participants 5 messages Sep 18, 2012 – Sep 20, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 alsa-lib: put BR2_PACKAGE_ALSA_LIB_PYTHON under the existing if condition

Instead of duplicating the "depends on BR2_PACKAGE_ALSA_LIB", just put BR2_PACKAGE_ALSA_LIB_PYTHON under the existing condition "if BR2_PACKAGE_ALSA_LIB".

---
 package/alsa-lib/Config.in |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/alsa-lib/Config.in +2 -2
index 98b8313..8123b5f 100644
@@ -10,9 +10,10 @@ config BR2_PACKAGE_ALSA_LIB
 
 	  http://www.alsa-project.org/
 
+if BR2_PACKAGE_ALSA_LIB
+
 config BR2_PACKAGE_ALSA_LIB_PYTHON
 	bool "Python support for alsa-lib"
-	depends on BR2_PACKAGE_ALSA_LIB
 	depends on BR2_PACKAGE_PYTHON
 	help
 	  Add python support for alsa-lib.
@@ -20,7 +21,6 @@ config BR2_PACKAGE_ALSA_LIB_PYTHON
 	  in the target directory
 	  http://www.alsa-project.org/
 
-if BR2_PACKAGE_ALSA_LIB
 menu "ALSA lib selection"
 
 config BR2_PACKAGE_ALSA_LIB_DEVDIR
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 2/3 alsa-lib: require thread support

Some parts of alsa-lib correctly use threads only when available, but some other parts, especially certain PCM plugins, unconditionally require threads. While it would certainly be possible to fix alsa-lib to only use threads when available, it probably doesn't make much sense, since on an embedded system that has audio, we are probably powerful enough to enable thread support in the C library.

Fixes:

http://autobuild.buildroot.org/results/e14469be7f6171f4c8c0c09c8e32943819f7938b/build-end.log

---
 package/alsa-lib/Config.in              |    8 ++++++++
 package/bluez_utils/Config.in           |    2 +-
 package/multimedia/alsa-utils/Config.in |    5 +++--
 package/multimedia/mpd/Config.in        |    1 +
 package/portaudio/Config.in             |    1 +
 package/qt/Config.in                    |    1 +
 6 files changed, 15 insertions(+), 3 deletions(-)
package/alsa-lib/Config.in +8 -0
index 8123b5f..ca063d8 100644
@@ -4,12 +4,20 @@ config BR2_PACKAGE_ALSA_LIB
 	# https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4913
 	# is fixed
 	select BR2_PACKAGE_ALSA_LIB_PCM
+	# Even though some parts of alsa-lib use threads only when
+	# available, some PCM plugins use them unconditionally. Since
+	# the usage of alsa-lib on no-thread systems is pretty
+	# unlikely, just require thread support globally for alsa-lib.
+	depends on BR2_TOOLCHAIN_HAS_THREADS
 	help
 	  The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI
 	  functionality to the Linux operating system.
 
 	  http://www.alsa-project.org/
 
+comment "alsa-lib needs threads support in toolchain"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
+
 if BR2_PACKAGE_ALSA_LIB
 
 config BR2_PACKAGE_ALSA_LIB_PYTHON
package/bluez_utils/Config.in +1 -1
index d63284d..9836b21 100644
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_BLUEZ_UTILS
 	bool "bluez-utils"
 	depends on BR2_USE_WCHAR # libglib2
-	depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
+	depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, alsa-lib
 	select BR2_PACKAGE_DBUS
 	select BR2_PACKAGE_LIBGLIB2
 	help
package/multimedia/alsa-utils/Config.in +3 -2
index c65e33f..4bc1204 100644
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_ALSA_UTILS
 	bool "alsa-utils"
 	depends on BR2_LARGEFILE
+	depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
 	select BR2_PACKAGE_ALSA_LIB
 	help
 	  This package contains the command line utilities for the ALSA
@@ -8,8 +9,8 @@ config BR2_PACKAGE_ALSA_UTILS
 
 	  http://www.alsa-project.org/
 
-comment "alsa-utils requires a toolchain with LARGEFILE support"
-	depends on !BR2_LARGEFILE
+comment "alsa-utils requires a toolchain with LARGEFILE and threads support"
+	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
 
 if BR2_PACKAGE_ALSA_UTILS
 menu "ALSA utils selection"
package/multimedia/mpd/Config.in +1 -0
index c7c0cd7..5d08182 100644
@@ -21,6 +21,7 @@ config BR2_PACKAGE_MPD_ALSA
 	select BR2_PACKAGE_ALSA_LIB
 	select BR2_PACKAGE_ALSA_LIB_PCM
 	select BR2_PACKAGE_ALSA_LIB_MIXER
+	depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
 	help
 	  Enable alsa output support.
 
package/portaudio/Config.in +1 -0
index f91acc0..df884a7 100644
@@ -11,6 +11,7 @@ if BR2_PACKAGE_PORTAUDIO
 config BR2_PACKAGE_PORTAUDIO_ALSA
 	bool "alsa support"
 	select BR2_PACKAGE_ALSA_LIB
+	depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
 	default y
 	help
 	  Compile with ALSA support.
package/qt/Config.in +1 -0
index b75f224..b99bf4c 100644
@@ -315,6 +315,7 @@ config BR2_PACKAGE_QT_AUDIO_BACKEND
 	bool "QtMultimedia Audio backend"
 	depends on BR2_PACKAGE_QT_MULTIMEDIA
 	select BR2_PACKAGE_ALSA_LIB
+	depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
 	help
 	  Build the ALSA audio backend into QtMultimedia
 
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 3/3 alsamixergui: use a normal 'select' statement for the alsa-lib dependency

In reply to Thomas Petazzoni
---
 package/alsamixergui/Config.in |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
package/alsamixergui/Config.in +4 -3
index 3afc314..39809d9 100644
@@ -1,15 +1,16 @@
 config BR2_PACKAGE_ALSAMIXERGUI
 	depends on BR2_PACKAGE_XORG7
-	depends on BR2_PACKAGE_ALSA_LIB
 	depends on BR2_INSTALL_LIBSTDCPP
 	select BR2_PACKAGE_FLTK
+	select BR2_PACKAGE_ALSA_LIB
 	select BR2_PACKAGE_ALSA_LIB_PCM
 	select BR2_PACKAGE_ALSA_LIB_MIXER
+	depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
 	bool "alsamixergui"
 	help
 	  A nice GUI mixer for Alsa using fltk
 
 	  http://www.iua.upf.es/~mdeboer/projects/alsamixergui/
 
-comment "alsamixergui requires a toolchain with C++ support enabled"
-	depends on !BR2_INSTALL_LIBSTDCPP && BR2_PACKAGE_XORG7 && BR2_PACKAGE_ALSA_LIB
+comment "alsamixergui requires a toolchain with C++ and threads support enabled"
+	depends on (!BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS) && BR2_PACKAGE_XORG7
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH 1/3 alsa-lib: put BR2_PACKAGE_ALSA_LIB_PYTHON under the existing if condition

In reply to Thomas Petazzoni
Quoted 5 lines · Thomas Petazzoni

Instead of duplicating the "depends on BR2_PACKAGE_ALSA_LIB", just put BR2_PACKAGE_ALSA_LIB_PYTHON under the existing condition "if BR2_PACKAGE_ALSA_LIB".

[snip]

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
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 1/3 alsa-lib: put BR2_PACKAGE_ALSA_LIB_PYTHON under the existing if condition

In reply to Thomas Petazzoni
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Thomas> Instead of duplicating the "depends on BR2_PACKAGE_ALSA_LIB", just put Thomas> BR2_PACKAGE_ALSA_LIB_PYTHON under the existing condition "if Thomas> BR2_PACKAGE_ALSA_LIB".

Committed all 3, thanks.

Signature · 1 line
Bye, Peter Korsgaard