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

index a532302a64f39ce03ff804d8334eff7a3c1204f9..36701f8c646f7efd0407eb1221f6be0a5a640f84 100644 (file)
@@ -7,7 +7,6 @@ config BR2_PACKAGE_POWERTOP
        select BR2_PACKAGE_NCURSES
        select BR2_PACKAGE_PCIUTILS
        select BR2_PACKAGE_LIBNL
-       select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
        help
          A tool to diagnose issues with power consumption and power management
 
index 62b716f0f1a916844cd810557a9b2f5d856949df..ce7a11875894fbb4de1b5501227734cf97cd1e43 100644 (file)
@@ -7,14 +7,11 @@
 POWERTOP_VERSION = 2.9
 POWERTOP_SITE = https://01.org/sites/default/files/downloads/powertop
 POWERTOP_SOURCE = powertop-v$(POWERTOP_VERSION).tar.gz
-POWERTOP_DEPENDENCIES = pciutils ncurses libnl host-gettext host-pkgconf
+POWERTOP_DEPENDENCIES = pciutils ncurses libnl host-pkgconf \
+       $(TARGET_NLS_DEPENDENCIES)
 POWERTOP_LICENSE = GPL-2.0
 POWERTOP_LICENSE_FILES = COPYING
-
-ifeq ($(BR2_NEEDS_GETTEXT),y)
-POWERTOP_DEPENDENCIES += gettext
-POWERTOP_CONF_ENV += LIBS='-lintl'
-endif
+POWERTOP_CONF_ENV = LIBS=$(TARGET_NLS_LIBS)
 
 # Help powertop at finding the right ncurses library depending on
 # which one is available.