rhash: use the new gettext logic
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 3 Jul 2017 21:16:58 +0000 (23:16 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 4 Jul 2017 23:34:17 +0000 (01:34 +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/rhash/Config.in
package/rhash/rhash.mk

index 46f6ca7a9ac425357a42ec5af7b9afc7975ae038..2ddcb00feb66b5512697beaf6210037fcb1fc7ca 100644 (file)
@@ -1,6 +1,5 @@
 config BR2_PACKAGE_RHASH
        bool "rhash"
-       select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
        help
          LibRHash is a professional, portable, thread-safe C library
          for computing a wide variety of hash sums, such as CRC32,
index 6cfc271ec02f8eb7b4d85570eebf775aad40c19f..53f49d8d3c290f1328b808d95779db3ea40608d3 100644 (file)
@@ -10,12 +10,9 @@ RHASH_SITE = https://sourceforge.net/projects/rhash/files/rhash/$(RHASH_VERSION)
 RHASH_LICENSE = MIT
 RHASH_LICENSE_FILES = COPYING
 RHASH_INSTALL_STAGING = YES
-
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-RHASH_DEPENDENCIES += gettext
-RHASH_ADDCFLAGS += -DUSE_GETTEXT
-RHASH_ADDLDFLAGS += -lintl
-endif
+RHASH_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
+RHASH_ADDLDFLAGS = $(TARGET_NLS_LIBS)
+RHASH_ADDCFLAGS = $(if $(BR2_SYSTEM_ENABLE_NLS),-DUSE_GETTEXT)
 
 ifeq ($(BR2_PACKAGE_OPENSSL)x$(BR2_STATIC_LIBS),yx)
 RHASH_DEPENDENCIES += openssl