Skip to contentSkip to conversation

package/avahi: add hidden libavahi-client option

PATCH In review Fabrice Fontaine 2 participants 2 messages Jan 12, 2022 – Jan 13, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/avahi: add hidden libavahi-client option

This hidden option will simplify packages depending on libavahi-client

---
 package/avahi/Config.in                  | 6 ++++++
 package/cups-filters/cups-filters.mk     | 3 +--
 package/libiio/libiio.mk                 | 3 +--
 package/libostree/libostree.mk           | 6 +-----
 package/pipewire/pipewire.mk             | 3 +--
 package/shairport-sync/shairport-sync.mk | 6 +-----
 package/vlc/vlc.mk                       | 3 +--
 7 files changed, 12 insertions(+), 18 deletions(-)
package/avahi/Config.in +6 -0
index 95b01bfe92..67722d04a2 100644
@@ -34,6 +34,12 @@ config BR2_PACKAGE_AVAHI_DAEMON
 	  The daemon registers local IP addresses and services using
 	  mDNS/DNS-SD.
 
+config BR2_PACKAGE_AVAHI_LIBAVAHI_CLIENT
+	bool
+	default y
+	depends on BR2_PACKAGE_AVAHI_DAEMON
+	depends on BR2_PACKAGE_DBUS
+
 config BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY
 	bool "libdns_sd compatibility (Bonjour)"
 	depends on BR2_PACKAGE_AVAHI_DAEMON
package/cups-filters/cups-filters.mk +1 -2
index 63b85f0b8b..c8f2dd0aae 100644
@@ -45,8 +45,7 @@ else
 CUPS_FILTERS_CONF_OPTS += --disable-dbus
 endif
 
-# avahi support requires avahi-client, which needs avahi-daemon and dbus
-ifeq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yy)
+ifeq ($(BR2_PACKAGE_AVAHI_LIBAVAHI_CLIENT),y)
 CUPS_FILTERS_DEPENDENCIES += avahi
 CUPS_FILTERS_CONF_OPTS += --enable-avahi
 else
package/libiio/libiio.mk +1 -2
index 38b2f83e6e..a4fe0d4541 100644
@@ -65,8 +65,7 @@ else
 LIBIIO_CONF_OPTS += -DWITH_AIO=OFF
 endif
 
-# Avahi support in libiio requires avahi-client, which needs avahi-daemon and dbus
-ifeq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yy)
+ifeq ($(BR2_PACKAGE_AVAHI_LIBAVAHI_CLIENT),y)
 LIBIIO_DEPENDENCIES += avahi
 LIBIIO_CONF_OPTS += -DHAVE_DNS_SD=ON
 else
package/libostree/libostree.mk +1 -5
index 22cb83d039..9cbf2848c9 100644
@@ -37,11 +37,7 @@ else
 LIBOSTREE_CONF_OPTS += --without-openssl
 endif
 
-# Avahi support needs libavahi-client, which is built by avahi if avahi-daemon
-# and dbus is selected. Since there is no BR2_PACKAGE_LIBAVAHI_CLIENT config
-# option yet, use the avahi-daemon and dbus config symbols to check for
-# libavahi-client.
-ifeq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yy)
+ifeq ($(BR2_PACKAGE_AVAHI_LIBAVAHI_CLIENT),y)
 LIBOSTREE_CONF_OPTS += --with-avahi
 LIBOSTREE_DEPENDENCIES += avahi
 else
package/pipewire/pipewire.mk +1 -2
index 604d08f90d..b05ce2bcc2 100644
@@ -83,8 +83,7 @@ else
 PIPEWIRE_CONF_OPTS += -Dalsa=disabled -Dpipewire-alsa=disabled
 endif
 
-# avahi support needs avahi-client, which needs avahi-daemon and dbus
-ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yyy)
+ifeq ($(BR2_PACKAGE_AVAHI_LIBAVAHI_CLIENT),y)
 PIPEWIRE_CONF_OPTS += -Davahi=enabled
 PIPEWIRE_DEPENDENCIES += avahi
 else
package/shairport-sync/shairport-sync.mk +1 -5
index cf49f2b2ed..487e0c05e5 100644
@@ -22,11 +22,7 @@ SHAIRPORT_SYNC_CONF_OPTS = --with-alsa \
 SHAIRPORT_SYNC_CONF_ENV += LIBS="$(SHAIRPORT_SYNC_CONF_LIBS)"
 
 # Avahi or tinysvcmdns (shaiport-sync bundles its own version of tinysvcmdns).
-# Avahi support needs libavahi-client, which is built by avahi if avahi-daemon
-# and dbus is selected. Since there is no BR2_PACKAGE_LIBAVAHI_CLIENT config
-# option yet, use the avahi-daemon and dbus congig symbols to check for
-# libavahi-client.
-ifeq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yy)
+ifeq ($(BR2_PACKAGE_AVAHI_LIBAVAHI_CLIENT),y)
 SHAIRPORT_SYNC_DEPENDENCIES += avahi
 SHAIRPORT_SYNC_CONF_OPTS += --with-avahi --without-tinysvcmdns
 else
package/vlc/vlc.mk +1 -2
index fe338fcbe8..b793e0efe0 100644
@@ -117,8 +117,7 @@ else
 VLC_CONF_OPTS += --disable-alsa
 endif
 
-# avahi support needs avahi-client, which needs avahi-daemon and dbus
-ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yyy)
+ifeq ($(BR2_PACKAGE_AVAHI_LIBAVAHI_CLIENT),y)
 VLC_CONF_OPTS += --enable-avahi
 VLC_DEPENDENCIES += avahi
 else
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

package/avahi/Config.in config BR2_PACKAGE_AVAHI_DAEMON · line 41

Quoted 5 lines · On Wed, 12 Jan 2022 21:31:17 +0100 Fabrice Fontaine…
package/avahi/Config.in +5 -0
+config BR2_PACKAGE_AVAHI_LIBAVAHI_CLIENT
+	bool
+	default y
+	depends on BR2_PACKAGE_AVAHI_DAEMON
+	depends on BR2_PACKAGE_DBUS

Changed to:

	default y if BR2_PACKAGE_AVAHI_DAEMON && BR2_PACKAGE_DBUS

and applied to master. Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot