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

index 32283198e600143203e5147b2e17b0d054fcd3f0..ad86c313d613f26733bc78bfd8c5b4dcd594eda8 100644 (file)
@@ -14,7 +14,6 @@ config BR2_PACKAGE_ELFUTILS
        depends on !BR2_bfin
        select BR2_PACKAGE_ZLIB
        select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC
-       select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
        help
          Libraries/utilities to handle ELF objects (drop in
          replacement for libelf).
index e43d0367ad8614d421027906504778a89807abc5..5570a3b37fea35b6603c25d26d62b092e8489b33 100644 (file)
@@ -10,7 +10,7 @@ ELFUTILS_SITE = https://sourceware.org/elfutils/ftp/$(ELFUTILS_VERSION)
 ELFUTILS_INSTALL_STAGING = YES
 ELFUTILS_LICENSE = GPL-2.0+ or LGPL-3.0+ (library)
 ELFUTILS_LICENSE_FILES = COPYING-GPLV2 COPYING-LGPLV3
-ELFUTILS_DEPENDENCIES = zlib
+ELFUTILS_DEPENDENCIES = zlib $(TARGET_NLS_DEPENDENCIES)
 HOST_ELFUTILS_DEPENDENCIES = host-zlib host-bzip2 host-xz
 
 # We patch configure.ac
@@ -40,13 +40,8 @@ ELFUTILS_CONF_ENV += \
        CFLAGS="$(ELFUTILS_CFLAGS)" \
        CPPFLAGS="$(ELFUTILS_CPPFLAGS)"
 
-ELFUTILS_LDFLAGS = $(TARGET_LDFLAGS)
-
-# Unconditionnally requires gettext.
-ifeq ($(BR2_NEEDS_GETTEXT),y)
-ELFUTILS_DEPENDENCIES += gettext
-ELFUTILS_LDFLAGS += -lintl
-endif
+ELFUTILS_LDFLAGS = $(TARGET_LDFLAGS) \
+       $(TARGET_NLS_LIBS)
 
 ELFUTILS_CONF_ENV += \
        LDFLAGS="$(ELFUTILS_LDFLAGS)"