package/libxml2: add optional LZMA support
authorYann E. MORIN <yann.morin.1998@free.fr>
Tue, 24 Mar 2015 22:19:47 +0000 (23:19 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 24 Mar 2015 23:31:26 +0000 (00:31 +0100)
LZMA support is provided by xz, since liblzma is long dead.

Contrary to zlib, liblzma uses pkg-config, so we do not need to add the
full path to libzma.

Reported-by: vdm on IRC
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/libxml2/libxml2.mk

index 354c17853ad6a57532bc0f34cd50337ee16d9abb..264e43765f5d4da4467e16023b38924996926e7c 100644 (file)
@@ -16,7 +16,7 @@ ifneq ($(BR2_LARGEFILE),y)
 LIBXML2_CONF_ENV = CC="$(TARGET_CC) $(TARGET_CFLAGS) -DNO_LARGEFILE_SOURCE"
 endif
 
-LIBXML2_CONF_OPTS = --with-gnu-ld --without-python --without-debug --without-lzma
+LIBXML2_CONF_OPTS = --with-gnu-ld --without-python --without-debug
 
 HOST_LIBXML2_DEPENDENCIES = host-pkgconf
 LIBXML2_DEPENDENCIES = host-pkgconf
@@ -30,6 +30,13 @@ else
 LIBXML2_CONF_OPTS += --without-zlib
 endif
 
+ifeq ($(BR2_PACKAGE_XZ),y)
+LIBXML2_DEPENDENCIES += xz
+LIBXML2_CONF_OPTS += --with-lzma
+else
+LIBXML2_CONF_OPTS += --without-lzma
+endif
+
 LIBXML2_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv)
 
 ifeq ($(BR2_ENABLE_LOCALE)$(BR2_PACKAGE_LIBICONV),y)