Patchwork [v2] libxml2: depend on zlib and libiconv if appropriate

login
register
mail settings
Submitter Simon Dawson
Date May 15, 2013, 10:18 a.m.
Message ID <1368613115-13584-1-git-send-email-spdawson@gmail.com>
Download mbox | patch
Permalink /patch/243965/
State Accepted
Commit e5b1da184625d25fe0618ab0a0d5549207f3a64c
Headers show

Comments

Simon Dawson - May 15, 2013, 10:18 a.m.
From: Simon Dawson <spdawson@gmail.com>

Signed-off-by: Simon Dawson <spdawson@gmail.com>
---
 v2: As suggested by Peter Korsgaard, correct iconv handling to cope with
 the case where iconv() is provided by the toolchain, rather than by
 libiconv.

 package/libxml2/libxml2.mk | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
Peter Korsgaard - May 17, 2013, 9:59 a.m.
>>>>> "spdawson" == spdawson  <spdawson@gmail.com> writes:

 spdawson> From: Simon Dawson <spdawson@gmail.com>
 spdawson> Signed-off-by: Simon Dawson <spdawson@gmail.com>

 spdawson> ---
 spdawson>  v2: As suggested by Peter Korsgaard, correct iconv handling
 spdawson>  to cope with the case where iconv() is provided by the
 spdawson>  toolchain, rather than by libiconv.

Committed, thanks.

Patch

diff --git a/package/libxml2/libxml2.mk b/package/libxml2/libxml2.mk
index 6a974ef..7800d94 100644
--- a/package/libxml2/libxml2.mk
+++ b/package/libxml2/libxml2.mk
@@ -34,6 +34,21 @@  else
 HOST_LIBXML2_CONF_OPT += --without-python
 endif
 
+ifeq ($(BR2_PACKAGE_ZLIB),y)
+LIBXML2_DEPENDENCIES += zlib
+LIBXML2_CONF_OPT += --with-zlib
+else
+LIBXML2_CONF_OPT += --without-zlib
+endif
+
+LIBXML2_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv)
+
+ifeq ($(BR2_ENABLE_LOCALE)$(BR2_PACKAGE_LIBICONV),y)
+LIBXML2_CONF_OPT += --with-iconv
+else
+LIBXML2_CONF_OPT += --without-iconv
+endif
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))