package/xerces: add optional support for icu
authorBernd Kuhls <bernd.kuhls@t-online.de>
Sat, 20 Feb 2016 23:40:25 +0000 (00:40 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 21 Feb 2016 11:24:50 +0000 (12:24 +0100)
When icu was compiled before, xerces will use it as optional dependency:

$ output/host/usr/bin/x86_64-linux-readelf -a output/target/usr/lib/libxerces-c-3.1.so | grep NEEDED | sort
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libicudata.so.56]
 0x0000000000000001 (NEEDED)             Shared library: [libicui18n.so.56]
 0x0000000000000001 (NEEDED)             Shared library: [libicuuc.so.56]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/xerces/xerces.mk

index cf3618378a424798e4cbc145907dbb31f81f46cd..e57949a1ad35ecff9771227b50831e6986661850 100644 (file)
@@ -21,6 +21,13 @@ endef
 
 XERCES_POST_PATCH_HOOKS += XERCES_DISABLE_SAMPLES
 
+ifeq ($(BR2_PACKAGE_ICU),y)
+XERCES_CONF_OPTS += --with-icu=$(STAGING_DIR)/usr
+XERCES_DEPENDENCIES += icu
+else
+XERCES_CONF_OPTS += --without-icu
+endif
+
 ifeq ($(BR2_PACKAGE_LIBICONV),y)
 XERCES_CONF_ENV += LIBS=-liconv
 XERCES_DEPENDENCIES += libiconv