avahi: use new gettext logic
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 3 Jul 2017 20:39:02 +0000 (22:39 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 4 Jul 2017 23:27:20 +0000 (01:27 +0200)
This commit switches to use the new gettext logic, which involves:

 - using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies
   on gettext/host-gettext

 - using TARGET_NLS_LIBS to force linking against libintl

 - dropping BR2_PACKAGE_GETTEXT selection

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/avahi/Config.in
package/avahi/avahi.mk

index a6b4ac83f1592cbb07917f5019df640cefd12ec1..5e303d044e83d22c07d5e2502a9cadf8c3dc83eb 100644 (file)
@@ -4,7 +4,6 @@ config BR2_PACKAGE_AVAHI
        depends on BR2_USE_MMU
        depends on BR2_TOOLCHAIN_HAS_THREADS
        depends on !BR2_STATIC_LIBS
-       select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
        help
          Avahi is a system which facilitates service
          discovery on a local network.
index a356a08291593b8ffb3a0978e2709cd0e0dac284..94b6292b5d37b590e659e02cc79a01dbe4ded26d 100644 (file)
@@ -97,8 +97,8 @@ AVAHI_CONF_OPTS = \
        --with-autoipd-group=avahi
 
 AVAHI_DEPENDENCIES = \
-       $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-intltool \
-       host-pkgconf host-gettext
+       host-intltool host-pkgconf \
+       $(TARGET_NLS_DEPENDENCIES)
 
 AVAHI_CFLAGS = $(TARGET_CFLAGS)
 
@@ -168,7 +168,7 @@ endif
 
 AVAHI_CONF_ENV += CFLAGS="$(AVAHI_CFLAGS)"
 
-AVAHI_MAKE_OPTS += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),LIBS=-lintl)
+AVAHI_MAKE_OPTS += LIBS=$(TARGET_NLS_LIBS)
 
 define AVAHI_USERS
        avahi -1 avahi -1 * - - -