This patch updates avahi to latest version -- 0.6.31. From the avahi release notes: "This is a bugfix release and mostly makes things work with current autoconf again."
It allows us to remove the OpenWrt-specific automake patch. This patch also ensures that when you change from omitting D-Bus support to including it, or vice-versa, the correct packages are actually generated. Until now, you had to do a make clean when you made such changes. Signed-off-by Mike Brady <mikebr...@eircom.net> Index: libs/avahi/patches/020-automake-compat.patch =================================================================== --- libs/avahi/patches/020-automake-compat.patch (revision 31439) +++ libs/avahi/patches/020-automake-compat.patch (working copy) @@ -1,26 +0,0 @@ ---- a/service-type-database/Makefile.am -+++ b/service-type-database/Makefile.am -@@ -18,13 +18,12 @@ - EXTRA_DIST=build-db.in service-types - - pkgdata_DATA=service-types --pkglib_DATA= - - if HAVE_PYTHON - if HAVE_GDBM - - noinst_SCRIPTS=build-db --pkglib_DATA+=service-types.db -+pkgdata_DATA+=service-types.db - - build-db: build-db.in - $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \ -@@ -41,7 +40,7 @@ endif - if HAVE_DBM - - noinst_SCRIPTS=build-db --pkglib_DATA+=service-types.db.pag service-types.db.dir -+pkgdata_DATA+=service-types.db.pag service-types.db.dir - - build-db: build-db.in - $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \ Index: libs/avahi/Config.in =================================================================== --- libs/avahi/Config.in (revision 0) +++ libs/avahi/Config.in (revision 0) @@ -0,0 +1,14 @@ +# avahi dbus config +config AVAHI_INCLUDE_DBUS_SUPPORT + bool "include D-Bus support" + depends PACKAGE_libavahi + select PACKAGE_dbus + default n + help + D-Bus support is needed for the libavahi-client library and + for the command line utilities avahi-browse, avahi-publish, + avahi-resolve and friends, collectively called the 'avahi-utils' package. + If selected, the dbus package will be included in the build, + libavahi will be compiled with D-Bus support and + avahi-daemon will be built requiring D-Bus. + Leave un-selected for minimum build size. Index: libs/avahi/Makefile =================================================================== --- libs/avahi/Makefile (revision 31439) +++ libs/avahi/Makefile (working copy) @@ -7,18 +7,20 @@ include $(TOPDIR)/rules.mk -ifeq ($(BUILD_VARIANT),dbus) -PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-dbus/$(PKG_NAME)-$(PKG_VERSION) +# Avahi comes in two flavours -- with and without D-Bus support built in. + +ifdef CONFIG_AVAHI_INCLUDE_DBUS_SUPPORT + PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)/dbus/$(PKG_NAME)-$(PKG_VERSION) + PKG_ALT_DIR=$(BUILD_DIR)/$(PKG_NAME)/nodbus/$(PKG_NAME)-$(PKG_VERSION) else -PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-nodbus/$(PKG_NAME)-$(PKG_VERSION) + PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)/nodbus/$(PKG_NAME)-$(PKG_VERSION) + PKG_ALT_DIR=$(BUILD_DIR)/$(PKG_NAME)/dbus/$(PKG_NAME)-$(PKG_VERSION) endif - PKG_NAME:=avahi -PKG_VERSION:=0.6.30 -PKG_RELEASE:=4 +PKG_VERSION:=0.6.31 +PKG_RELEASE:=1 - PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://avahi.org/download/ PKG_MD5SUM:=e4db89a2a403ff4c47d66ac66fad1f43 @@ -31,10 +33,12 @@ PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 - - include $(INCLUDE_DIR)/package.mk +define Build/Configure + $(call Build/Configure/Default,) +endef + define Package/avahi/Default SECTION:=net CATEGORY:=Network @@ -54,6 +58,10 @@ and is very convenient. endef +define Package/libavahi/config + source "$(SOURCE)/Config.in" +endef + define Package/libavahi $(call Package/avahi/Default) SECTION:=libs @@ -70,8 +78,9 @@ libavahi-core and libavahi-common libraries. By default, it is compiled without D-Bus support, i.e. the --disable-dbus compilation flag is set. - To enable D-Bus support, select the package - libavahi-dbus-support. + D-Bus support will be selected automatically by libavahi-client + and avahi-utils. To enable D-Bus support manually, + select the "include D-Bus support" option. endef define Package/avahi-autoipd @@ -125,34 +134,11 @@ in a DHCP-like fashion. Especially useful on IPv6. endef -define Package/libavahi-dbus-support - $(call Package/avahi/Default) - SECTION:=libs - CATEGORY:=Libraries - VARIANT:=dbus - DEPENDS:=+dbus +libavahi - TITLE+= (D-Bus support) -endef - -define Package/libavahi-dbus-support/description -$(call Package/libavahi/description) - . - The libavahi-dbus-support package enables - D-Bus support in libavahi, needed to support - the libavahi-client library and avahi-utils. - Selecting this package modifies the contents of the - libavahi package by setting the --enable-dbus compilation flag; - it does not generate a separate binary of its own. - It also automatically adds the D-Bus package to the build. - libavahi-dbus-support is selected automatically if you select - libavahi-client or avahi-utils. -endef - define Package/libavahi-client $(call Package/avahi/Default) SECTION:=libs CATEGORY:=Libraries - DEPENDS:=+libavahi-dbus-support +avahi-daemon + DEPENDS:=+dbus +libavahi +@AVAHI_INCLUDE_DBUS_SUPPORT TITLE+= (libavahi-client library) endef @@ -161,7 +147,7 @@ . This packages adds the libavahi-client library. It also automatically adds the required - libavahi-dbus-support and the avahi-daemon packages. + libavahi, avahi-daemon and dbus packages. For more information please see the avahi documentation. endef @@ -223,7 +209,7 @@ --disable-stack-protector endif -ifeq ($(BUILD_VARIANT),dbus) +ifdef CONFIG_AVAHI_INCLUDE_DBUS_SUPPORT CONFIGURE_ARGS += \ --enable-dbus else @@ -243,14 +229,17 @@ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/ endef -define Package/libavahi-dbus-support/install - $(INSTALL_DIR) $(1)/usr/lib -endef - define Package/libavahi/install + # The next line removes the ".build" file from the "other" build. + # The effect is that, if the other build is re-selected in the future, + # the build system will be forced to replace all the code in the + # installer packages, removng anything from the current build. + # "Other" means this: if the current build is "dbus", the other is "nodebus", + # and if the current build is "nodbus", the other is "dbus". + $(RM) -f $(PKG_ALT_DIR)/.built $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libavahi-{common,core}.so.* $(1)/usr/lib/ -ifeq ($(BUILD_VARIANT),dbus) +ifdef CONFIG_AVAHI_INCLUDE_DBUS_SUPPORT $(INSTALL_DIR) $(1)/etc/dbus-1/system.d $(CP) $(PKG_INSTALL_DIR)/etc/dbus-1/system.d/* $(1)/etc/dbus-1/system.d endif @@ -294,7 +283,6 @@ $(eval $(call BuildPackage,libavahi-client)) $(eval $(call BuildPackage,avahi-utils)) -$(eval $(call BuildPackage,libavahi-dbus-support)) $(eval $(call BuildPackage,libavahi)) $(eval $(call BuildPackage,avahi-autoipd)) $(eval $(call BuildPackage,avahi-daemon)) _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel