Squashed 'yocto-poky/' content from commit ea562de

git-subtree-dir: yocto-poky
git-subtree-split: ea562de57590c966cd5a75fda8defecd397e6436
diff --git a/meta/recipes-support/neon/neon/gnutls_4.3_fixup.patch b/meta/recipes-support/neon/neon/gnutls_4.3_fixup.patch
new file mode 100644
index 0000000..459f5e3
--- /dev/null
+++ b/meta/recipes-support/neon/neon/gnutls_4.3_fixup.patch
@@ -0,0 +1,68 @@
+replace deprecated GnuTLS functions with newer ones if available 
+
+Upstream-Status: Pending
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+Index: neon-0.30.1/macros/neon.m4
+===================================================================
+--- neon-0.30.1.orig/macros/neon.m4
++++ neon-0.30.1/macros/neon.m4
+@@ -987,6 +987,10 @@ gnutls)
+                   gnutls_certificate_get_x509_cas \
+                   gnutls_x509_crt_sign2])
+ 
++   # gnutls 4.3 check
++   AC_CHECK_LIB(gnutls, gnutls_global_init)
++   AC_CHECK_FUNCS(gnutls_certificate_set_retrieve_function,,)
++
+    # fail if gnutls_x509_crt_sign2 is not found (it was introduced in 1.2.0, which is required)
+    if test x${ac_cv_func_gnutls_x509_crt_sign2} != xyes; then
+        AC_MSG_ERROR([GnuTLS version predates gnutls_x509_crt_sign2, newer version required (at least 1.2.0)])
+Index: neon-0.30.1/src/ne_gnutls.c
+===================================================================
+--- neon-0.30.1.orig/src/ne_gnutls.c
++++ neon-0.30.1/src/ne_gnutls.c
+@@ -553,7 +553,13 @@ dup_error:
+ static int provide_client_cert(gnutls_session_t session,
+                                const gnutls_datum_t *req_ca_rdn, int nreqs,
+                                const gnutls_pk_algorithm_t *sign_algos,
+-                               int sign_algos_length, gnutls_retr_st *st)
++                               int sign_algos_length,
++#if HAVE_GNUTLS_CERTIFICATE_SET_RETRIEVE_FUNCTION
++    gnutls_retr2_st* st
++#else
++    gnutls_retr_st *st
++#endif
++    )
+ {
+     ne_session *sess = gnutls_session_get_ptr(session);
+     
+@@ -617,8 +623,11 @@ static int provide_client_cert(gnutls_se
+ #endif
+             ) {
+             NE_DEBUG(NE_DBG_SSL, "Supplying client certificate.\n");
+-
++#if HAVE_GNUTLS_CERTIFICATE_SET_RETRIEVE_FUNCTION
++            st->cert_type = type;
++#else
+             st->type = type;
++#endif
+             st->ncerts = 1;
+             st->cert.x509 = &sess->client_cert->cert.subject;
+             st->key.x509 = sess->client_cert->pkey;
+@@ -649,8 +658,14 @@ ne_ssl_context *ne_ssl_context_create(in
+     ne_ssl_context *ctx = ne_calloc(sizeof *ctx);
+     gnutls_certificate_allocate_credentials(&ctx->cred);
+     if (flags == NE_SSL_CTX_CLIENT) {
++
++#if HAVE_GNUTLS_CERTIFICATE_SET_RETRIEVE_FUNCTION
++        gnutls_certificate_set_retrieve_function(ctx->cred,
++                                                       provide_client_cert);
++#else
+         gnutls_certificate_client_set_retrieve_function(ctx->cred,
+                                                         provide_client_cert);
++#endif
+     }
+     gnutls_certificate_set_verify_flags(ctx->cred, 
+                                         GNUTLS_VERIFY_ALLOW_X509_V1_CA_CRT);
diff --git a/meta/recipes-support/neon/neon/pkgconfig.patch b/meta/recipes-support/neon/neon/pkgconfig.patch
new file mode 100644
index 0000000..239dba8
--- /dev/null
+++ b/meta/recipes-support/neon/neon/pkgconfig.patch
@@ -0,0 +1,15 @@
+Upstream-Status: Inappropriate [configuration]
+
+---
+ neon.pc.in |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- neon-0.30.1.orig/neon.pc.in
++++ neon-0.30.1/neon.pc.in
+@@ -7,5 +7,5 @@ Name: neon
+ Description: HTTP/WebDAV client library
+ Version: @NEON_VERSION@
+ Libs: -L${libdir} -lneon @NEON_PC_LIBS@
+-Libs.private: @NEON_LIBS@
++Libs.private: -L${libdir} -lz -lgcrypt -lgpg-error -lexpat -lgnutls
+ Cflags: -I${includedir}/neon @NEON_CFLAGS@
diff --git a/meta/recipes-support/neon/neon_0.30.1.bb b/meta/recipes-support/neon/neon_0.30.1.bb
new file mode 100644
index 0000000..0244314
--- /dev/null
+++ b/meta/recipes-support/neon/neon_0.30.1.bb
@@ -0,0 +1,27 @@
+SUMMARY = "An HTTP and WebDAV client library with a C interface"
+HOMEPAGE = "http://www.webdav.org/neon/"
+SECTION = "libs"
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://src/COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a \
+                    file://src/ne_utils.h;beginline=1;endline=20;md5=2caca609538eddaa6f6adf120a218037"
+DEPENDS = "zlib libxml2 expat time gnutls libproxy"
+DEPENDS_class-native = "zlib-native libxml2-native expat-native gnutls-native"
+
+BBCLASSEXTEND = "native"
+
+SRC_URI = "http://www.webdav.org/${BPN}/${BPN}-${PV}.tar.gz \
+           file://pkgconfig.patch \
+           file://gnutls_4.3_fixup.patch"
+SRC_URI[md5sum] = "231adebe5c2f78fded3e3df6e958878e"
+SRC_URI[sha256sum] = "00c626c0dc18d094ab374dbd9a354915bfe4776433289386ed489c2ec0845cdd"
+
+BINCONFIG = "${bindir}/neon-config"
+
+inherit autotools binconfig-disabled lib_package pkgconfig
+
+EXTRA_OECONF = "--with-ssl=gnutls --with-libxml2 --with-expat --enable-shared"
+EXTRA_OECONF += "--without-gssapi"
+
+do_compile_append() {
+	oe_runmake -C test
+}