whois: use the new gettext logic
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 3 Jul 2017 21:23:43 +0000 (23:23 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 4 Jul 2017 23:36:34 +0000 (01:36 +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, which means we no longer
   need to depend on BR2_USE_WCHAR, so this dependency is dropped

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

index 0fbaf904d2f8eea588b1d3631d1f89c1e4f236e3..9505d583205622c129049ee093214ac34a66b90b 100644 (file)
@@ -1,13 +1,7 @@
 config BR2_PACKAGE_WHOIS
        bool "whois"
-       depends on BR2_USE_WCHAR # gettext
        depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
-       select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
        help
          Improved whois client.
 
          http://www.linux.it/~md/software/
-
-comment "whois needs a toolchain w/ wchar"
-       depends on !BR2_USE_WCHAR
-       depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
index 24b6b69c93ae0f46ea68db97fefd93f96bd69e8c..b7734999788336f7c38a76580b62bee6749fd102 100644 (file)
@@ -8,17 +8,13 @@ WHOIS_VERSION = 5.2.14
 WHOIS_SITE = http://snapshot.debian.org/archive/debian/20161230T032015Z/pool/main/w/whois
 WHOIS_SOURCE = whois_$(WHOIS_VERSION).tar.xz
 # take precedence over busybox implementation
-WHOIS_DEPENDENCIES = host-gettext $(if $(BR2_PACKAGE_BUSYBOX),busybox)
+WHOIS_DEPENDENCIES = $(if $(BR2_PACKAGE_BUSYBOX),busybox) $(TARGET_NLS_DEPENDENCIES)
 WHOIS_MAKE_ENV = $(TARGET_MAKE_ENV)
 WHOIS_MAKE_OPTS = CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
        LIBS="$(WHOIS_EXTRA_LIBS)"
 WHOIS_LICENSE = GPL-2.0+
 WHOIS_LICENSE_FILES = COPYING
-
-ifeq ($(BR2_NEEDS_GETTEXT),y)
-WHOIS_DEPENDENCIES += gettext
-WHOIS_EXTRA_LIBS += -lintl
-endif
+WHOIS_EXTRA_LIBS = $(TARGET_NLS_LIBS)
 
 ifeq ($(BR2_PACKAGE_LIBICONV),y)
 WHOIS_DEPENDENCIES += libiconv