diff mbox

libxml2: depend on zlib and libiconv if appropriate

Message ID 1368520183-8049-1-git-send-email-spdawson@gmail.com
State Superseded
Headers show

Commit Message

Simon Dawson May 14, 2013, 8:29 a.m. UTC
From: Simon Dawson <spdawson@gmail.com>

Signed-off-by: Simon Dawson <spdawson@gmail.com>
---
 package/libxml2/libxml2.mk | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Peter Korsgaard May 14, 2013, 8:13 p.m. UTC | #1
>>>>> "spdawson" == spdawson  <spdawson@gmail.com> writes:

 spdawson> From: Simon Dawson <spdawson@gmail.com>
 spdawson> Signed-off-by: Simon Dawson <spdawson@gmail.com>
 spdawson> ---
 spdawson>  package/libxml2/libxml2.mk | 14 ++++++++++++++
 spdawson>  1 file changed, 14 insertions(+)

 spdawson> diff --git a/package/libxml2/libxml2.mk b/package/libxml2/libxml2.mk
 spdawson> index 6a974ef..1a98cdd 100644
 spdawson> --- a/package/libxml2/libxml2.mk
 spdawson> +++ b/package/libxml2/libxml2.mk
 spdawson> @@ -34,6 +34,20 @@ else
 spdawson>  HOST_LIBXML2_CONF_OPT += --without-python
 spdawson>  endif
 
 spdawson> +ifeq ($(BR2_PACKAGE_ZLIB),y)
 spdawson> +LIBXML2_DEPENDENCIES += zlib
 spdawson> +LIBXML2_CONF_OPT += --with-zlib
 spdawson> +else
 spdawson> +LIBXML2_CONF_OPT += --without-zlib
 spdawson> +endif
 spdawson> +
 spdawson> +ifeq ($(BR2_PACKAGE_LIBICONV),y)
 spdawson> +LIBXML2_DEPENDENCIES += libiconv
 spdawson> +LIBXML2_CONF_OPT += --with-iconv
 spdawson> +else
 spdawson> +LIBXML2_CONF_OPT += --without-iconv
 spdawson> +endif

Hmm, that seems wrong. If the toolchain has locale support, then it has
iconv(), so we shouldn't disable iconv support.

Something like:

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
Simon Dawson May 15, 2013, 10:15 a.m. UTC | #2
On 14 May 2013 21:13, Peter Korsgaard <jacmet@uclibc.org> wrote:
>  spdawson> +ifeq ($(BR2_PACKAGE_LIBICONV),y)
>  spdawson> +LIBXML2_DEPENDENCIES += libiconv
>  spdawson> +LIBXML2_CONF_OPT += --with-iconv
>  spdawson> +else
>  spdawson> +LIBXML2_CONF_OPT += --without-iconv
>  spdawson> +endif
>
> Hmm, that seems wrong. If the toolchain has locale support, then it has
> iconv(), so we shouldn't disable iconv support.
>
> Something like:
>
> 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

Okay; thanks Peter. Will fix and resubmit.

Simon.
diff mbox

Patch

diff --git a/package/libxml2/libxml2.mk b/package/libxml2/libxml2.mk
index 6a974ef..1a98cdd 100644
--- a/package/libxml2/libxml2.mk
+++ b/package/libxml2/libxml2.mk
@@ -34,6 +34,20 @@  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
+
+ifeq ($(BR2_PACKAGE_LIBICONV),y)
+LIBXML2_DEPENDENCIES += libiconv
+LIBXML2_CONF_OPT += --with-iconv
+else
+LIBXML2_CONF_OPT += --without-iconv
+endif
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))