package/mpd: handle expat and yajl explicitly

mpd's Config.in selects expat and/or yajl depending on which
sub-options is enabled, and adds build dependencies, but does not pass
-D<option>=enabled/disabled for both of these features, relying on
auto-detection.

This commit fixes that by explicitly enabling/disabling expat and yajl
depending on their presence. The mpd sub-options no longer need to
have these as build-time dependencies, as it is handled globally.

Signed-off-by: Andreas Ziegler <br015@umbiko.net>
[Thomas: extracted from
https://patchwork.ozlabs.org/project/buildroot/patch/20221005091032.3014-5-br015@umbiko.net/]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Andreas Ziegler 2023-08-06 22:11:45 +02:00 committed by Thomas Petazzoni
parent 6cdb48a048
commit 3693462a1f

View File

@ -29,6 +29,13 @@ else
MPD_CONF_OPTS += -Dzeroconf=disabled
endif
ifeq ($(BR2_PACKAGE_EXPAT),y)
MPD_DEPENDENCIES += expat
MPD_CONF_OPTS += -Dexpat=enabled
else
MPD_CONF_OPTS += -Dexpat=disabled
endif
# MPD prefers libicu for utf8 collation instead of libglib2.
ifeq ($(BR2_PACKAGE_ICU),y)
MPD_DEPENDENCIES += icu
@ -37,6 +44,13 @@ else
MPD_CONF_OPTS += -Dicu=disabled
endif
ifeq ($(BR2_PACKAGE_YAJL),y)
MPD_DEPENDENCIES += yajl
MPD_CONF_OPTS += -Dyajl=enabled
else
MPD_CONF_OPTS += -Dyajl=disabled
endif
ifeq ($(BR2_PACKAGE_MPD_ALSA),y)
MPD_DEPENDENCIES += alsa-lib
MPD_CONF_OPTS += -Dalsa=enabled
@ -251,7 +265,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
@ -272,7 +286,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
@ -307,12 +320,10 @@ endif
ifeq ($(BR2_PACKAGE_MPD_UPNP_PUPNP),y)
MPD_DEPENDENCIES += \
expat \
libupnp
MPD_CONF_OPTS += -Dupnp=pupnp
else ifeq ($(BR2_PACKAGE_MPD_UPNP_NPUPNP),y)
MPD_DEPENDENCIES += \
expat \
libnpupnp
MPD_CONF_OPTS += -Dupnp=npupnp
else ifeq ($(BR2_PACKAGE_MPD_UPNP_DISABLED),y)