util-linux: fix build with locale in toolchain
authorPeter Korsgaard <jacmet@sunsite.dk>
Sun, 30 Aug 2009 20:01:23 +0000 (22:01 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sun, 30 Aug 2009 20:08:21 +0000 (22:08 +0200)
Closes #529.

util-linux needs to link with libintl when locale support is available /
requested in the toolchain, similar to how it is done for avahi.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
CHANGES
package/util-linux/Config.in
package/util-linux/util-linux.mk

diff --git a/CHANGES b/CHANGES
index 01f6cb19be5c4843e7fb46a3dd4b55ab15bbc7e4..a0e39f7ec248c8f085a5a914cc0cf3e6d2110da8 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,9 @@
+2009.08, Not yet released:
+
+       Issues resolved (http://bugs.uclibc.org):
+
+       #529: util-linux doesn't find headers and include libs correctly
+
 2009.08-rc3, Released August 26th, 2009:
 
        Additional fixes and cleanups.
index 227d74e71a847eff04a3b15c065e00763c130cc7..f8af6bb4fb809b0993d7944010140e0359d33324 100644 (file)
@@ -1,5 +1,7 @@
 config BR2_PACKAGE_UTIL-LINUX
        bool "util-linux"
+       select BR2_PACKAGE_GETTEXT if BR2_ENABLE_LOCALE
+       select BR2_PACKAGE_LIBINTL if BR2_ENABLE_LOCALE
        help
          Various useful/essential Linux utilities.
 
index c9bae16281a31b5226690d0b8b20b3064e00f35e..ad5a62ccb1e693bb581a7025e28d2094ec3de7eb 100644 (file)
@@ -18,6 +18,11 @@ else
 UTIL-LINUX_SCHED_UTILS:=--disable-schedutils
 endif
 
+ifeq ($(BR2_PACKAGE_LIBINTL),y)
+UTIL-LINUX_DEPENDENCIES += libintl
+UTIL-LINUX_MAKE_OPT = LIBS=-lintl
+endif
+
 $(DL_DIR)/$(UTIL-LINUX_SOURCE):
        $(call DOWNLOAD,$(UTIL-LINUX_SITE),$(UTIL-LINUX_SOURCE))
 
@@ -56,6 +61,7 @@ $(UTIL-LINUX_BINARY): $(UTIL-LINUX_DIR)/.configured
                ARCH=$(ARCH) \
                CC=$(TARGET_CC) \
                OPT="$(TARGET_CFLAGS)" \
+               $(UTIL-LINUX_MAKE_OPT) \
                HAVE_SLANG="NO"
 
 $(UTIL-LINUX_TARGET_BINARY): $(UTIL-LINUX_BINARY)
@@ -66,11 +72,10 @@ $(UTIL-LINUX_TARGET_BINARY): $(UTIL-LINUX_BINARY)
 #If both util-linux and busybox are selected, make certain util-linux
 #wins the fight over who gets to have their utils actually installed
 ifeq ($(BR2_PACKAGE_BUSYBOX),y)
-util-linux: uclibc busybox $(UTIL-LINUX_TARGET_BINARY)
-else
-util-linux: uclibc $(UTIL-LINUX_TARGET_BINARY)
+UTIL-LINUX_DEPENDENCIES = busybox $(UTIL-LINUX_DEPENDENCIES)
 endif
 
+util-linux: uclibc $(UTIL-LINUX_DEPENDENCIES) $(UTIL-LINUX_TARGET_BINARY)
 
 util-linux-source: $(DL_DIR)/$(UTIL-LINUX_SOURCE)