[Buildroot] [PATCH v2 4/4] package/mpd: introduce sub-options for expat and yajl
Andreas Ziegler
br015 at umbiko.net
Wed Oct 5 09:10:32 UTC 2022
Make inclusion of expat and yajl libraries in the mpd build dependent on
user selection, not presence of the libraries in the target filesystem.
Signed-off-by: Andreas Ziegler <br015 at umbiko.net>
---
Changes v1 -> v2:
- based on a discussion w/ Arnout Vandecapelle, Yann Morin
package/mpd/Config.in | 17 ++++++++++++++---
package/mpd/mpd.mk | 24 +++++++++++++++++-------
2 files changed, 31 insertions(+), 10 deletions(-)
diff --git a/package/mpd/Config.in b/package/mpd/Config.in
index daf1469cae..fe4f22201a 100644
--- a/package/mpd/Config.in
+++ b/package/mpd/Config.in
@@ -20,6 +20,16 @@ menuconfig BR2_PACKAGE_MPD
if BR2_PACKAGE_MPD
+# mpd internal feature dependencies
+
+config BR2_PACKAGE_MPD_EXPAT
+ bool
+ select BR2_PACKAGE_EXPAT
+
+config BR2_PACKAGE_MPD_YAJL
+ bool
+ select BR2_PACKAGE_YAJL
+
comment "Archive plugins"
config BR2_PACKAGE_MPD_BZIP2
@@ -48,14 +58,14 @@ config BR2_PACKAGE_MPD_QOBUZ
depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS
select BR2_PACKAGE_MPD_CURL
select BR2_PACKAGE_LIBGCRYPT
- select BR2_PACKAGE_YAJL
+ select BR2_PACKAGE_MPD_YAJL
help
Play songs from the commercial streaming service Qobuz.
config BR2_PACKAGE_MPD_SOUNDCLOUD
bool "soundcloud"
select BR2_PACKAGE_MPD_CURL
- select BR2_PACKAGE_YAJL
+ select BR2_PACKAGE_MPD_YAJL
help
Enable soundcloud.com playlist support.
@@ -399,9 +409,9 @@ choice
config BR2_PACKAGE_MPD_UPNP_PUPNP
bool "pupnp"
- select BR2_PACKAGE_EXPAT
select BR2_PACKAGE_LIBUPNP
select BR2_PACKAGE_MPD_CURL
+ select BR2_PACKAGE_MPD_EXPAT
help
Provides UPnP database access through libupnp
(the legacy Portable SDK for UPnP devices).
@@ -412,6 +422,7 @@ config BR2_PACKAGE_MPD_UPNP_NPUPNP
bool "npupnp"
select BR2_PACKAGE_LIBNPUPNP
select BR2_PACKAGE_MPD_CURL
+ select BR2_PACKAGE_MPD_EXPAT
help
Provides UPnP database access through libnpupnp
(a C++ reimplementation of the Portable UPnP library).
diff --git a/package/mpd/mpd.mk b/package/mpd/mpd.mk
index 1269b90661..1c3b659220 100644
--- a/package/mpd/mpd.mk
+++ b/package/mpd/mpd.mk
@@ -78,6 +78,13 @@ else
MPD_CONF_OPTS += -Ddsd=false
endif
+ifeq ($(BR2_PACKAGE_MPD_EXPAT),y)
+MPD_DEPENDENCIES += expat
+MPD_CONF_OPTS += -Dexpat=enabled
+else
+MPD_CONF_OPTS += -Dexpat=disabled
+endif
+
ifeq ($(BR2_PACKAGE_MPD_FAAD2),y)
MPD_DEPENDENCIES += faad2
MPD_CONF_OPTS += -Dfaad=enabled
@@ -252,7 +259,7 @@ MPD_CONF_OPTS += -Dpulse=disabled
endif
ifeq ($(BR2_PACKAGE_MPD_QOBUZ),y)
-MPD_DEPENDENCIES += libgcrypt yajl
+MPD_DEPENDENCIES += libgcrypt
MPD_CONF_OPTS += -Dqobuz=enabled
else
MPD_CONF_OPTS += -Dqobuz=disabled
@@ -273,7 +280,6 @@ MPD_CONF_OPTS += -Dsidplay=disabled
endif
ifeq ($(BR2_PACKAGE_MPD_SOUNDCLOUD),y)
-MPD_DEPENDENCIES += yajl
MPD_CONF_OPTS += -Dsoundcloud=enabled
else
MPD_CONF_OPTS += -Dsoundcloud=disabled
@@ -306,13 +312,10 @@ MPD_CONF_OPTS += -Dtwolame=disabled
endif
ifeq ($(BR2_PACKAGE_MPD_UPNP_PUPNP),y)
-MPD_DEPENDENCIES += \
- expat \
- libupnp
+MPD_DEPENDENCIES += libupnp
MPD_CONF_OPTS += -Dupnp=pupnp
else ifeq ($(BR2_PACKAGE_MPD_UPNP_NPUPNP),y)
-MPD_DEPENDENCIES += \
- libnpupnp
+MPD_DEPENDENCIES += libnpupnp
MPD_CONF_OPTS += -Dupnp=npupnp
else ifeq ($(BR2_PACKAGE_MPD_UPNP_DISABLED),y)
MPD_CONF_OPTS += -Dupnp=disabled
@@ -333,6 +336,13 @@ else
MPD_CONF_OPTS += -Dwavpack=disabled
endif
+ifeq ($(BR2_PACKAGE_MPD_YAJL),y)
+MPD_DEPENDENCIES += yajl
+MPD_CONF_OPTS += -Dyajl=enabled
+else
+MPD_CONF_OPTS += -Dyajl=disabled
+endif
+
ifeq ($(BR2_PACKAGE_MPD_ZZIP),y)
MPD_DEPENDENCIES += zziplib
MPD_CONF_OPTS += -Dzzip=enabled
--
2.34.1
More information about the buildroot
mailing list