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

index a2216155bf3f5cc59a6fa5251a3f74bd60ae693a..c59af1cd1959525cac45b5654af74af7215814c3 100644 (file)
@@ -5,7 +5,6 @@ config BR2_PACKAGE_NEWT
        depends on !BR2_STATIC_LIBS # unconditionally creates .so
        select BR2_PACKAGE_SLANG
        select BR2_PACKAGE_POPT
-       select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
        help
          Programming library for color text mode, widget based user interfaces.
 
index 1764bbcea835328199741ac124c2cbdb2762a776..456dd699c96f51b138ee0d378ed1fb67a8b61e19 100644 (file)
@@ -7,8 +7,10 @@
 NEWT_VERSION = 0.52.19
 NEWT_SITE = https://pagure.io/releases/newt
 NEWT_INSTALL_STAGING = YES
-NEWT_DEPENDENCIES = popt slang \
-       $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
+NEWT_DEPENDENCIES = popt slang $(TARGET_NLS_DEPENDENCIES)
+# Force to use libintl, otherwise it finds gettext functions in the C
+# library, and does not link against libintl.
+NEWT_CONF_ENV = LIBS=$(TARGET_NLS_LIBS)
 NEWT_CONF_OPTS = --without-python --without-tcl
 NEWT_MAKE = $(MAKE1)
 NEWT_LICENSE = GPL-2.0