Message ID | 1413379134-28918-8-git-send-email-jkrause@posteo.de |
---|---|
State | Superseded |
Headers | show |
Dear Jörg Krause, On Wed, 15 Oct 2014 15:18:54 +0200, Jörg Krause wrote: > # Some options need an explicit --disable or --enable > -ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y) > + > +# Zeroconf support depends on libdns_sd from avahi. > +ifeq ($(BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY),y) > MPD_DEPENDENCIES += avahi > else > MPD_CONF_OPTS += --with-zeroconf=no It doesn't seem really obvious for the user that BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY should be enabled to get avahi support in mpd. So, in such situations, I would suggest to add a Config.in option to explicitly enable the Avahi support in mpd: config BR2_PACKAGE_MPD_AVAHI_SUPPORT bool "avahi support" depends on ... # all the dependencies of avahi select BR2_PACKAGE_AVAHI select BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY help Some help text Best regards, Thomas
Dear Thomas Petazzoni, On 10/16/2014 11:50 AM, Thomas Petazzoni wrote: > Dear Jörg Krause, > > On Wed, 15 Oct 2014 15:18:54 +0200, Jörg Krause wrote: > >> # Some options need an explicit --disable or --enable >> -ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y) >> + >> +# Zeroconf support depends on libdns_sd from avahi. >> +ifeq ($(BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY),y) >> MPD_DEPENDENCIES += avahi >> else >> MPD_CONF_OPTS += --with-zeroconf=no > It doesn't seem really obvious for the user that > BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY should be enabled to get avahi > support in mpd. So, in such situations, I would suggest to add a > Config.in option to explicitly enable the Avahi support in mpd: > > config BR2_PACKAGE_MPD_AVAHI_SUPPORT > bool "avahi support" > depends on ... # all the dependencies of avahi > select BR2_PACKAGE_AVAHI > select BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY > help > Some help text Looks good!
diff --git a/package/mpd/mpd.mk b/package/mpd/mpd.mk index 3370bc7..a0d582c 100644 --- a/package/mpd/mpd.mk +++ b/package/mpd/mpd.mk @@ -13,7 +13,9 @@ MPD_LICENSE = GPLv2+ MPD_LICENSE_FILES = COPYING # Some options need an explicit --disable or --enable -ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y) + +# Zeroconf support depends on libdns_sd from avahi. +ifeq ($(BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY),y) MPD_DEPENDENCIES += avahi else MPD_CONF_OPTS += --with-zeroconf=no
Support for zeroconf depends on libdns_sd from avahi. This library is build by avahi if avahi-daemon is enabled and dbus is selected. Checking for symbol BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY instead of BR2_PACKAGE_AVAHI_DAEMON ensures that dbus has been selected and therefore libdns_sd has been built. Signed-off-by: Jörg Krause <jkrause@posteo.de> --- Changes v1 -> v2: - none --- package/mpd/mpd.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)