Răsfoiți Sursa

util-linux: use the new gettext logic

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: Carlos Santos <casantos@datacom.ind.br>
Thomas Petazzoni 8 ani în urmă
părinte
comite
7426b582f6
2 a modificat fișierele cu 2 adăugiri și 7 ștergeri
  1. 0 1
      package/util-linux/Config.in
  2. 2 6
      package/util-linux/util-linux.mk

+ 0 - 1
package/util-linux/Config.in

@@ -1,6 +1,5 @@
 menuconfig BR2_PACKAGE_UTIL_LINUX
 menuconfig BR2_PACKAGE_UTIL_LINUX
 	bool "util-linux"
 	bool "util-linux"
-	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	help
 	help
 	  Various useful/essential linux libraries and utilities.
 	  Various useful/essential linux libraries and utilities.
 
 

+ 2 - 6
package/util-linux/util-linux.mk

@@ -17,7 +17,7 @@ UTIL_LINUX_AUTORECONF = YES
 UTIL_LINUX_LICENSE = GPL-2.0+, BSD-4-Clause, LGPL-2.1+ (libblkid, libfdisk, libmount), BSD-3-Clause (libuuid)
 UTIL_LINUX_LICENSE = GPL-2.0+, BSD-4-Clause, LGPL-2.1+ (libblkid, libfdisk, libmount), BSD-3-Clause (libuuid)
 UTIL_LINUX_LICENSE_FILES = README.licensing Documentation/licenses/COPYING.GPLv2 Documentation/licenses/COPYING.UCB Documentation/licenses/COPYING.LGPLv2.1 Documentation/licenses/COPYING.BSD-3
 UTIL_LINUX_LICENSE_FILES = README.licensing Documentation/licenses/COPYING.GPLv2 Documentation/licenses/COPYING.UCB Documentation/licenses/COPYING.LGPLv2.1 Documentation/licenses/COPYING.BSD-3
 UTIL_LINUX_INSTALL_STAGING = YES
 UTIL_LINUX_INSTALL_STAGING = YES
-UTIL_LINUX_DEPENDENCIES = host-pkgconf
+UTIL_LINUX_DEPENDENCIES = host-pkgconf $(TARGET_NLS_DEPENDENCIES)
 # uClibc needs NTP_LEGACY for sys/timex.h -> ntp_gettime() support
 # uClibc needs NTP_LEGACY for sys/timex.h -> ntp_gettime() support
 # (used in logger.c), and the common default is N.
 # (used in logger.c), and the common default is N.
 UTIL_LINUX_CONF_ENV = scanf_cv_type_modifier=no \
 UTIL_LINUX_CONF_ENV = scanf_cv_type_modifier=no \
@@ -25,6 +25,7 @@ UTIL_LINUX_CONF_ENV = scanf_cv_type_modifier=no \
 UTIL_LINUX_CONF_OPTS += \
 UTIL_LINUX_CONF_OPTS += \
 	--disable-rpath \
 	--disable-rpath \
 	--disable-makeinstall-chown
 	--disable-makeinstall-chown
+UTIL_LINUX_LIBS = $(TARGET_NLS_LIBS)
 
 
 # system depends on util-linux so we enable systemd support
 # system depends on util-linux so we enable systemd support
 # (which needs systemd to be installed)
 # (which needs systemd to be installed)
@@ -62,11 +63,6 @@ endif
 UTIL_LINUX_CONF_OPTS += --without-ncursesw --without-ncurses
 UTIL_LINUX_CONF_OPTS += --without-ncursesw --without-ncurses
 endif
 endif
 
 
-ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
-UTIL_LINUX_DEPENDENCIES += gettext
-UTIL_LINUX_LIBS += -lintl
-endif
-
 ifeq ($(BR2_PACKAGE_LIBCAP_NG),y)
 ifeq ($(BR2_PACKAGE_LIBCAP_NG),y)
 UTIL_LINUX_DEPENDENCIES += libcap-ng
 UTIL_LINUX_DEPENDENCIES += libcap-ng
 endif
 endif