cryptsetup: use new gettext logic
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 3 Jul 2017 20:40:58 +0000 (22:40 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 4 Jul 2017 23:27:24 +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>
package/cryptsetup/Config.in
package/cryptsetup/cryptsetup.mk

index 3ca23ba72137b48b9b713c6cda6065bf260e6c7c..5cd4676eaa2c3a6489d33187dfcc353e18e3c783 100644 (file)
@@ -8,7 +8,6 @@ config BR2_PACKAGE_CRYPTSETUP
        select BR2_PACKAGE_LVM2
        select BR2_PACKAGE_UTIL_LINUX
        select BR2_PACKAGE_UTIL_LINUX_LIBUUID
-       select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
        help
          This tool helps manipulate dm-crypt and luks partitions for
          on-disk encryption.
index 787331c14aa02afa77f1720ab2adbd369a94e4e0..5496583028763493a44dd6d0d7d2510b173cd855 100644 (file)
@@ -9,14 +9,11 @@ CRYPTSETUP_VERSION = $(CRYPTSETUP_VERSION_MAJOR).5
 CRYPTSETUP_SOURCE = cryptsetup-$(CRYPTSETUP_VERSION).tar.xz
 CRYPTSETUP_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/cryptsetup/v$(CRYPTSETUP_VERSION_MAJOR)
 CRYPTSETUP_DEPENDENCIES = lvm2 popt util-linux host-pkgconf \
-       $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
+       $(TARGET_NLS_DEPENDENCIES)
 CRYPTSETUP_LICENSE = GPL-2.0+ (programs), LGPL-2.1+ (library)
 CRYPTSETUP_LICENSE_FILES = COPYING COPYING.LGPL
 CRYPTSETUP_INSTALL_STAGING = YES
-
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-CRYPTSETUP_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -lintl"
-endif
+CRYPTSETUP_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) $(TARGET_NLS_LIBS)"
 
 # cryptsetup uses libgcrypt by default, but can be configured to use OpenSSL
 # or kernel crypto modules instead