xerces: fix dependency on iconv
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 29 Jul 2010 07:49:42 +0000 (09:49 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 29 Jul 2010 14:04:38 +0000 (16:04 +0200)
All "select BR2_PACKAGE_LIBICONV" must use the "if !BR2_ENABLE_LOCALE"
condition, otherwise we can end up with a toolchain suppoting locales
*and* the libiconv package being compiled, which confuses other
packages. Example with glib:

gconvert.c:52:2: error: #error GNU libiconv in use but included
iconv.h not from libiconv

In addition to that, in xerces.mk, we add the dependency on libiconv
when it is available, to make sure it gets compiled before xerces.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/xerces/Config.in
package/xerces/xerces.mk

index 85bd96cf1c89804ffd2af48b86c60ed4de9f6555..123f0c166650ba122ffc8d0f7d274b44ec10f736 100644 (file)
@@ -1,7 +1,7 @@
 config BR2_PACKAGE_XERCES
        bool "xerces-c++"
        depends on BR2_INSTALL_LIBSTDCPP
-       select BR2_PACKAGE_LIBICONV
+       select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
        help
          Xerces-C++ is a validating XML parser written in portable C++.
 
index 9f77be6f7ff0fbc5c8eb426182a4b70626edac74..8a1f693a2929987398ef06bb57f1c80605cd45b3 100644 (file)
@@ -87,7 +87,7 @@ $(TARGET_DIR)/usr/lib/$(LIBXERCES_BINARY): $(STAGING_DIR)/usr/lib/$(LIBXERCES_BI
        cp -a $(STAGING_DIR)/usr/lib/$(LIBXERCES_BINARY)* $(TARGET_DIR)/usr/lib
        $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/$(LIBXERCES_BINARY)
 
-xerces: $(TARGET_DIR)/usr/lib/$(LIBXERCES_BINARY)
+xerces: $(if $(BR2_PACKAGE_LIBICONV),libiconv) $(TARGET_DIR)/usr/lib/$(LIBXERCES_BINARY)
 
 xerces-bin: $(XERCES_DIR)/usr/lib/$(LIBXERCES_BINARY)