Hi Mike,

On Monday 23 April 2012 18:18:48 Mike Brady wrote:
> I promise this is the last fix to this patch submission!
> 
> This patch updates avahi to latest version -- 0.6.31. From the 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 a change like that.
> 
> [V2 -- fixed MD5SUM calculation oops]
> [V3 -- removed non-functional Build/Configure stanza]

Apart from the bump and the patch removal, I do not see the point in having a 
configure time option to select avahi with or without dbus. The current 
approach, to use build variants, is imho the more flexible, since both flavors 
will be built.

Why would we need to have a configure-time option instead?

> 
> Signed-off-by Mike Brady <[email protected]>
> 
> Index: libs/avahi/patches/020-automake-compat.patch
> ===================================================================
> --- libs/avahi/patches/020-automake-compat.patch      (revision 31444)
> +++ 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/Makefile
> ===================================================================
> --- libs/avahi/Makefile       (revision 31444)
> +++ libs/avahi/Makefile       (working copy)
> @@ -7,21 +7,23 @@
>  
>  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
> +PKG_MD5SUM:=2f22745b8f7368ad5a0a3fddac343f2d
>  
>  PKG_BUILD_DEPENDS:=libexpat libdaemon libgdbm intltool/host libpthread dbus
>  
> @@ -31,8 +33,6 @@
>  PKG_INSTALL:=1
>  PKG_BUILD_PARALLEL:=1
>  
> -
> -
>  include $(INCLUDE_DIR)/package.mk
>  
>  define Package/avahi/Default
> @@ -54,6 +54,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 +74,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 +130,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 +143,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 +205,7 @@
>       --disable-stack-protector
>  endif
>  
> -ifeq ($(BUILD_VARIANT),dbus)
> +ifdef CONFIG_AVAHI_INCLUDE_DBUS_SUPPORT
>  CONFIGURE_ARGS += \
>       --enable-dbus
>  else
> @@ -243,14 +225,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 +279,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
> [email protected]
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to