ushare: use the new gettext logic
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 3 Jul 2017 21:20:33 +0000 (23:20 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 4 Jul 2017 23:35:41 +0000 (01:35 +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

 - using BR2_SYSTEM_ENABLE_NLS instead of BR2_ENABLE_LOCALE to decide
   if NLS support should be enabled or not

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/ushare/Config.in
package/ushare/ushare.mk

index 70bf24a50d6fc5088903e5511bffe54599ca34d9..c3475b8465303672339a6e3639c83fbce57c85a5 100644 (file)
@@ -6,7 +6,6 @@ config BR2_PACKAGE_USHARE
        # linking.
        depends on !BR2_STATIC_LIBS
        select BR2_PACKAGE_LIBUPNP
-       select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
        help
          uShare is a UPnP (TM) A/V & DLNA Media Server.
          It implements the server component that provides UPnP media devices
index 32aa4451266f1433c86707c7f3992c7b8d282522..bb194f637461ac75e6c91ade3c55f43a67c19cab 100644 (file)
@@ -7,9 +7,10 @@
 USHARE_VERSION = 1.1a
 USHARE_SOURCE = ushare-$(USHARE_VERSION).tar.bz2
 USHARE_SITE = http://ushare.geexbox.org/releases
-USHARE_DEPENDENCIES = host-pkgconf libupnp
+USHARE_DEPENDENCIES = host-pkgconf libupnp $(TARGET_NLS_DEPENDENCIES)
 USHARE_LICENSE = GPL-2.0+
 USHARE_LICENSE_FILES = COPYING
+USHARE_LDFLAGS = $(TARGET_NLS_LIBS)
 
 USHARE_CONF_OPTS = \
        --prefix=/usr \
@@ -18,12 +19,7 @@ USHARE_CONF_OPTS = \
        --sysconfdir=/etc \
        --disable-strip
 
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-USHARE_DEPENDENCIES += gettext
-USHARE_LDFLAGS += -lintl
-endif
-
-ifeq ($(BR2_ENABLE_LOCALE),)
+ifeq ($(BR2_SYSTEM_ENABLE_NLS),)
 USHARE_CONF_OPTS += --disable-nls
 endif