Patchwork curl: control ipv6 support based on DISTRO feature

login
register
mail settings
Submitter Andre McCurdy
Date June 12, 2014, 5:29 p.m.
Message ID <1402594142-26539-1-git-send-email-armccurdy@gmail.com>
Download mbox | patch
Permalink /patch/73675/
State Accepted
Commit a7d0c856db0ebc77a3feeb1a0c900ce116247e89
Headers show

Comments

Andre McCurdy - June 12, 2014, 5:29 p.m.
By default ipv6 is auto detected for native builds but disabled when
cross compiling.

This commit adds a PACKAGECONFIG option, unconditionally enabled for
native and nativesdk builds and controlled by the ipv6 DISTRO feature
for target builds.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
 meta/recipes-support/curl/curl_7.36.0.bb | 6 ++++++
 1 file changed, 6 insertions(+)

Patch

diff --git a/meta/recipes-support/curl/curl_7.36.0.bb b/meta/recipes-support/curl/curl_7.36.0.bb
index 56eb1a2..54ea6d4 100644
--- a/meta/recipes-support/curl/curl_7.36.0.bb
+++ b/meta/recipes-support/curl/curl_7.36.0.bb
@@ -40,6 +40,12 @@  CURLGNUTLS = " --with-gnutls=${STAGING_LIBDIR}/../ --without-ssl"
 CURLGNUTLS_class-native = "--without-gnutls --with-ssl"
 CURLGNUTLS_class-nativesdk = "--without-gnutls --without-ssl"
 
+PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "ipv6", "", d)}"
+PACKAGECONFIG_class-native = "ipv6"
+PACKAGECONFIG_class-nativesdk = "ipv6"
+
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
 do_configure_prepend() {
 	sed -i s:OPT_GNUTLS/bin:OPT_GNUTLS:g ${S}/configure.ac
 }