summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch67
-rw-r--r--meta/recipes-support/gnutls/gnutls_3.3.12.bb1
2 files changed, 68 insertions, 0 deletions
diff --git a/meta/recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch b/meta/recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch
new file mode 100644
index 0000000000..0e1b7c8f72
--- /dev/null
+++ b/meta/recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch
@@ -0,0 +1,67 @@
1From cee80af1fe93f5b76765afeebfcc3b902768f5d6 Mon Sep 17 00:00:00 2001
2From: Andre McCurdy <armccurdy@gmail.com>
3Date: Tue, 26 May 2015 21:41:24 -0700
4Subject: [PATCH] use pkg-config to locate zlib
5
6AC_LIB_HAVE_LINKFLAGS can sometimes find host libs and is therefore not
7robust when cross-compiling. Remove it for zlib and use PKG_CHECK_MODULES
8instead.
9
10Removing AC_LIB_HAVE_LINKFLAGS for zlib also removes the --with-libz-prefix
11configure option. If zlib support is enabled, then failure to find zlib via
12pkg-config is now treated as a fatal error.
13
14Change based on ChromeOS gnutls 2.12.23 cross-compile fixes patch:
15
16 https://chromium-review.googlesource.com/#/c/271661/
17
18Upstream-Status: Inappropriate [configuration]
19
20Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
21---
22 configure.ac | 24 ++++++++++--------------
23 1 file changed, 10 insertions(+), 14 deletions(-)
24
25diff --git a/configure.ac b/configure.ac
26index 1b561d5..0c787dc 100644
27--- a/configure.ac
28+++ b/configure.ac
29@@ -508,25 +508,21 @@ AC_ARG_WITH(zlib, AS_HELP_STRING([--without-zlib],
30 AC_MSG_CHECKING([whether to include zlib compression support])
31 if test x$ac_zlib != xno; then
32 AC_MSG_RESULT(yes)
33- AC_LIB_HAVE_LINKFLAGS(z,, [#include <zlib.h>], [compress (0, 0, 0, 0);])
34- if test x$ac_cv_libz != xyes; then
35- AC_MSG_WARN(
36-***
37-*** ZLIB was not found. You will not be able to use ZLIB compression.)
38- fi
39 else
40 AC_MSG_RESULT(no)
41 fi
42
43-PKG_CHECK_EXISTS(zlib, ZLIB_HAS_PKGCONFIG=y, ZLIB_HAS_PKGCONFIG=n)
44-
45 if test x$ac_zlib != xno; then
46- if test "$ZLIB_HAS_PKGCONFIG" = "y" ; then
47- if test "x$GNUTLS_REQUIRES_PRIVATE" = x; then
48- GNUTLS_REQUIRES_PRIVATE="Requires.private: zlib"
49- else
50- GNUTLS_REQUIRES_PRIVATE="$GNUTLS_REQUIRES_PRIVATE, zlib"
51- fi
52+ PKG_CHECK_MODULES(ZLIB, zlib)
53+ HAVE_LIBZ=yes
54+ AC_DEFINE([HAVE_LIBZ], [1], [zlib is enabled])
55+ AC_SUBST(HAVE_LIBZ)
56+ LTLIBZ=$ZLIB_LIBS
57+ AC_SUBST(LTLIBZ)
58+ if test "x$GNUTLS_REQUIRES_PRIVATE" = x; then
59+ GNUTLS_REQUIRES_PRIVATE="Requires.private: zlib"
60+ else
61+ GNUTLS_REQUIRES_PRIVATE="$GNUTLS_REQUIRES_PRIVATE, zlib"
62 fi
63 fi
64 AC_SUBST(GNUTLS_REQUIRES_PRIVATE)
65--
661.9.1
67
diff --git a/meta/recipes-support/gnutls/gnutls_3.3.12.bb b/meta/recipes-support/gnutls/gnutls_3.3.12.bb
index 0d6ec756e6..b310be0e58 100644
--- a/meta/recipes-support/gnutls/gnutls_3.3.12.bb
+++ b/meta/recipes-support/gnutls/gnutls_3.3.12.bb
@@ -2,6 +2,7 @@ require gnutls.inc
2 2
3SRC_URI += "file://correct_rpl_gettimeofday_signature.patch \ 3SRC_URI += "file://correct_rpl_gettimeofday_signature.patch \
4 file://configure.ac-fix-sed-command.patch \ 4 file://configure.ac-fix-sed-command.patch \
5 file://use-pkg-config-to-locate-zlib.patch \
5 " 6 "
6SRC_URI[md5sum] = "a37b20b4352a5f542367ded904729c90" 7SRC_URI[md5sum] = "a37b20b4352a5f542367ded904729c90"
7SRC_URI[sha256sum] = "67ab3e92c5d48f3323b897d7c1aa0bb2af6f3a84f5bd9931cda163a7ff32299b" 8SRC_URI[sha256sum] = "67ab3e92c5d48f3323b897d7c1aa0bb2af6f3a84f5bd9931cda163a7ff32299b"