diff mbox series

[4/6] package/zynaddsubfx: fix alsa-lib handling

Message ID 20220316212220.3437314-4-fontaine.fabrice@gmail.com
State Accepted
Headers show
Series [1/6] package/zynaddsubfx: fix PluginEnable option | expand

Commit Message

Fabrice Fontaine March 16, 2022, 9:22 p.m. UTC
alsa-lib is optional, not mandatory, since the addition of the package
in commit 18a863063735e2c658fa6947a4e540e9dda6c431

Moreover, alsa support depends on BR2_PACKAGE_ALSA_LIB_SEQ (otherwise,
it is silently disabled)

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/zynaddsubfx/Config.in      | 3 +--
 package/zynaddsubfx/zynaddsubfx.mk | 8 +++++++-
 2 files changed, 8 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/package/zynaddsubfx/Config.in b/package/zynaddsubfx/Config.in
index 837a469e7c..f181a23944 100644
--- a/package/zynaddsubfx/Config.in
+++ b/package/zynaddsubfx/Config.in
@@ -2,8 +2,7 @@  config BR2_PACKAGE_ZYNADDSUBFX
 	bool "zynaddsubfx"
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11
-	depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib, liblo
-	select BR2_PACKAGE_ALSA_LIB
+	depends on BR2_TOOLCHAIN_HAS_THREADS # liblo
 	select BR2_PACKAGE_FFTW
 	select BR2_PACKAGE_FFTW_SINGLE
 	select BR2_PACKAGE_LIBLO
diff --git a/package/zynaddsubfx/zynaddsubfx.mk b/package/zynaddsubfx/zynaddsubfx.mk
index db0459ce62..aeeb0b6405 100644
--- a/package/zynaddsubfx/zynaddsubfx.mk
+++ b/package/zynaddsubfx/zynaddsubfx.mk
@@ -18,10 +18,16 @@  ZYNADDSUBFX_CONF_OPTS += -DOS_LIBRARIES=-latomic
 endif
 
 ZYNADDSUBFX_DEPENDENCIES = \
-	alsa-lib \
 	fftw-single \
 	liblo \
 	mxml \
 	zlib
 
+ifeq ($(BR2_PACKAGE_ALSA_LIB_SEQ),y)
+ZYNADDSUBFX_DEPENDENCIES += alsa-lib
+ZYNADDSUBFX_CONF_OPTS += -DAlsaEnable=ON
+else
+ZYNADDSUBFX_CONF_OPTS += -DAlsaEnable=OFF
+endif
+
 $(eval $(cmake-package))