* [PATCH][meta-gplv2] gnutls: add use-pkg-config-to-locate-zlib.patch
@ 2017-06-12 16:22 Martin Jansa
2017-06-12 19:04 ` Andre McCurdy
0 siblings, 1 reply; 5+ messages in thread
From: Martin Jansa @ 2017-06-12 16:22 UTC (permalink / raw)
To: yocto
* it was modified in oe-core/master in this commit:
commit ba7e5f51327d9833776aa066f30c5e46606be374
Author: Fan Xin <fan.xin@jp.fujitsu.com>
Date: Fri Jun 9 15:49:18 2017 +0900
gnutls: Upgrade to 3.5.13
1. Upgrade gnutls from 3.5.9 to 3.5.13
2. Rebase the following patch file.
use-pkg-config-to-locate-zlib.patch
Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
and no longer applies for this version.
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
.../gnutls/use-pkg-config-to-locate-zlib.patch | 67 ++++++++++++++++++++++
recipes-support/gnutls/gnutls_3.3.27.bb | 2 +-
2 files changed, 68 insertions(+), 1 deletion(-)
create mode 100644 recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch
diff --git a/recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch b/recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch
new file mode 100644
index 0000000..0e1b7c8
--- /dev/null
+++ b/recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch
@@ -0,0 +1,67 @@
+From cee80af1fe93f5b76765afeebfcc3b902768f5d6 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 26 May 2015 21:41:24 -0700
+Subject: [PATCH] use pkg-config to locate zlib
+
+AC_LIB_HAVE_LINKFLAGS can sometimes find host libs and is therefore not
+robust when cross-compiling. Remove it for zlib and use PKG_CHECK_MODULES
+instead.
+
+Removing AC_LIB_HAVE_LINKFLAGS for zlib also removes the --with-libz-prefix
+configure option. If zlib support is enabled, then failure to find zlib via
+pkg-config is now treated as a fatal error.
+
+Change based on ChromeOS gnutls 2.12.23 cross-compile fixes patch:
+
+ https://chromium-review.googlesource.com/#/c/271661/
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ configure.ac | 24 ++++++++++--------------
+ 1 file changed, 10 insertions(+), 14 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1b561d5..0c787dc 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -508,25 +508,21 @@ AC_ARG_WITH(zlib, AS_HELP_STRING([--without-zlib],
+ AC_MSG_CHECKING([whether to include zlib compression support])
+ if test x$ac_zlib != xno; then
+ AC_MSG_RESULT(yes)
+- AC_LIB_HAVE_LINKFLAGS(z,, [#include <zlib.h>], [compress (0, 0, 0, 0);])
+- if test x$ac_cv_libz != xyes; then
+- AC_MSG_WARN(
+-***
+-*** ZLIB was not found. You will not be able to use ZLIB compression.)
+- fi
+ else
+ AC_MSG_RESULT(no)
+ fi
+
+-PKG_CHECK_EXISTS(zlib, ZLIB_HAS_PKGCONFIG=y, ZLIB_HAS_PKGCONFIG=n)
+-
+ if test x$ac_zlib != xno; then
+- if test "$ZLIB_HAS_PKGCONFIG" = "y" ; then
+- if test "x$GNUTLS_REQUIRES_PRIVATE" = x; then
+- GNUTLS_REQUIRES_PRIVATE="Requires.private: zlib"
+- else
+- GNUTLS_REQUIRES_PRIVATE="$GNUTLS_REQUIRES_PRIVATE, zlib"
+- fi
++ PKG_CHECK_MODULES(ZLIB, zlib)
++ HAVE_LIBZ=yes
++ AC_DEFINE([HAVE_LIBZ], [1], [zlib is enabled])
++ AC_SUBST(HAVE_LIBZ)
++ LTLIBZ=$ZLIB_LIBS
++ AC_SUBST(LTLIBZ)
++ if test "x$GNUTLS_REQUIRES_PRIVATE" = x; then
++ GNUTLS_REQUIRES_PRIVATE="Requires.private: zlib"
++ else
++ GNUTLS_REQUIRES_PRIVATE="$GNUTLS_REQUIRES_PRIVATE, zlib"
+ fi
+ fi
+ AC_SUBST(GNUTLS_REQUIRES_PRIVATE)
+--
+1.9.1
+
diff --git a/recipes-support/gnutls/gnutls_3.3.27.bb b/recipes-support/gnutls/gnutls_3.3.27.bb
index c98da34..9a8cd40 100644
--- a/recipes-support/gnutls/gnutls_3.3.27.bb
+++ b/recipes-support/gnutls/gnutls_3.3.27.bb
@@ -3,7 +3,7 @@ require recipes-support/gnutls/gnutls.inc
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
file://COPYING.LESSER;md5=a6f89e2100d9b6cdffcea4f398e37343"
-FILESEXTRAPATHS_prepend = "${COREBASE}/meta/recipes-support/${BPN}/${BPN}:"
+FILESEXTRAPATHS_prepend = "${THISDIR}/${BPN}:${COREBASE}/meta/recipes-support/${BPN}/${BPN}:"
SRC_URI += " \
file://correct_rpl_gettimeofday_signature.patch \
--
2.13.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH][meta-gplv2] gnutls: add use-pkg-config-to-locate-zlib.patch
2017-06-12 16:22 [PATCH][meta-gplv2] gnutls: add use-pkg-config-to-locate-zlib.patch Martin Jansa
@ 2017-06-12 19:04 ` Andre McCurdy
2017-06-12 19:13 ` Burton, Ross
0 siblings, 1 reply; 5+ messages in thread
From: Andre McCurdy @ 2017-06-12 19:04 UTC (permalink / raw)
To: Martin Jansa; +Cc: yocto
On Mon, Jun 12, 2017 at 9:22 AM, Martin Jansa <martin.jansa@gmail.com> wrote:
> * it was modified in oe-core/master in this commit:
> commit ba7e5f51327d9833776aa066f30c5e46606be374
> Author: Fan Xin <fan.xin@jp.fujitsu.com>
> Date: Fri Jun 9 15:49:18 2017 +0900
>
> gnutls: Upgrade to 3.5.13
>
> 1. Upgrade gnutls from 3.5.9 to 3.5.13
>
> 2. Rebase the following patch file.
> use-pkg-config-to-locate-zlib.patch
>
> Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
> Signed-off-by: Ross Burton <ross.burton@intel.com>
>
> and no longer applies for this version.
Would it be better to just make the meta-gplv2 gnutls recipe self
contained and stop trying to share a .inc file and patches with
oe-core?
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
> .../gnutls/use-pkg-config-to-locate-zlib.patch | 67 ++++++++++++++++++++++
> recipes-support/gnutls/gnutls_3.3.27.bb | 2 +-
> 2 files changed, 68 insertions(+), 1 deletion(-)
> create mode 100644 recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch
>
> diff --git a/recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch b/recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch
> new file mode 100644
> index 0000000..0e1b7c8
> --- /dev/null
> +++ b/recipes-support/gnutls/gnutls/use-pkg-config-to-locate-zlib.patch
> @@ -0,0 +1,67 @@
> +From cee80af1fe93f5b76765afeebfcc3b902768f5d6 Mon Sep 17 00:00:00 2001
> +From: Andre McCurdy <armccurdy@gmail.com>
> +Date: Tue, 26 May 2015 21:41:24 -0700
> +Subject: [PATCH] use pkg-config to locate zlib
> +
> +AC_LIB_HAVE_LINKFLAGS can sometimes find host libs and is therefore not
> +robust when cross-compiling. Remove it for zlib and use PKG_CHECK_MODULES
> +instead.
> +
> +Removing AC_LIB_HAVE_LINKFLAGS for zlib also removes the --with-libz-prefix
> +configure option. If zlib support is enabled, then failure to find zlib via
> +pkg-config is now treated as a fatal error.
> +
> +Change based on ChromeOS gnutls 2.12.23 cross-compile fixes patch:
> +
> + https://chromium-review.googlesource.com/#/c/271661/
> +
> +Upstream-Status: Inappropriate [configuration]
> +
> +Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
> +---
> + configure.ac | 24 ++++++++++--------------
> + 1 file changed, 10 insertions(+), 14 deletions(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index 1b561d5..0c787dc 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -508,25 +508,21 @@ AC_ARG_WITH(zlib, AS_HELP_STRING([--without-zlib],
> + AC_MSG_CHECKING([whether to include zlib compression support])
> + if test x$ac_zlib != xno; then
> + AC_MSG_RESULT(yes)
> +- AC_LIB_HAVE_LINKFLAGS(z,, [#include <zlib.h>], [compress (0, 0, 0, 0);])
> +- if test x$ac_cv_libz != xyes; then
> +- AC_MSG_WARN(
> +-***
> +-*** ZLIB was not found. You will not be able to use ZLIB compression.)
> +- fi
> + else
> + AC_MSG_RESULT(no)
> + fi
> +
> +-PKG_CHECK_EXISTS(zlib, ZLIB_HAS_PKGCONFIG=y, ZLIB_HAS_PKGCONFIG=n)
> +-
> + if test x$ac_zlib != xno; then
> +- if test "$ZLIB_HAS_PKGCONFIG" = "y" ; then
> +- if test "x$GNUTLS_REQUIRES_PRIVATE" = x; then
> +- GNUTLS_REQUIRES_PRIVATE="Requires.private: zlib"
> +- else
> +- GNUTLS_REQUIRES_PRIVATE="$GNUTLS_REQUIRES_PRIVATE, zlib"
> +- fi
> ++ PKG_CHECK_MODULES(ZLIB, zlib)
> ++ HAVE_LIBZ=yes
> ++ AC_DEFINE([HAVE_LIBZ], [1], [zlib is enabled])
> ++ AC_SUBST(HAVE_LIBZ)
> ++ LTLIBZ=$ZLIB_LIBS
> ++ AC_SUBST(LTLIBZ)
> ++ if test "x$GNUTLS_REQUIRES_PRIVATE" = x; then
> ++ GNUTLS_REQUIRES_PRIVATE="Requires.private: zlib"
> ++ else
> ++ GNUTLS_REQUIRES_PRIVATE="$GNUTLS_REQUIRES_PRIVATE, zlib"
> + fi
> + fi
> + AC_SUBST(GNUTLS_REQUIRES_PRIVATE)
> +--
> +1.9.1
> +
> diff --git a/recipes-support/gnutls/gnutls_3.3.27.bb b/recipes-support/gnutls/gnutls_3.3.27.bb
> index c98da34..9a8cd40 100644
> --- a/recipes-support/gnutls/gnutls_3.3.27.bb
> +++ b/recipes-support/gnutls/gnutls_3.3.27.bb
> @@ -3,7 +3,7 @@ require recipes-support/gnutls/gnutls.inc
> LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
> file://COPYING.LESSER;md5=a6f89e2100d9b6cdffcea4f398e37343"
>
> -FILESEXTRAPATHS_prepend = "${COREBASE}/meta/recipes-support/${BPN}/${BPN}:"
> +FILESEXTRAPATHS_prepend = "${THISDIR}/${BPN}:${COREBASE}/meta/recipes-support/${BPN}/${BPN}:"
>
> SRC_URI += " \
> file://correct_rpl_gettimeofday_signature.patch \
> --
> 2.13.0
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][meta-gplv2] gnutls: add use-pkg-config-to-locate-zlib.patch
2017-06-12 19:04 ` Andre McCurdy
@ 2017-06-12 19:13 ` Burton, Ross
2017-06-23 9:25 ` Martin Jansa
0 siblings, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2017-06-12 19:13 UTC (permalink / raw)
To: Andre McCurdy; +Cc: yocto
[-- Attachment #1: Type: text/plain, Size: 239 bytes --]
On 12 June 2017 at 20:04, Andre McCurdy <armccurdy@gmail.com> wrote:
> Would it be better to just make the meta-gplv2 gnutls recipe self
> contained and stop trying to share a .inc file and patches with
> oe-core?
>
Yes.
Ross
[-- Attachment #2: Type: text/html, Size: 641 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][meta-gplv2] gnutls: add use-pkg-config-to-locate-zlib.patch
2017-06-12 19:13 ` Burton, Ross
@ 2017-06-23 9:25 ` Martin Jansa
2017-06-23 9:25 ` Martin Jansa
0 siblings, 1 reply; 5+ messages in thread
From: Martin Jansa @ 2017-06-23 9:25 UTC (permalink / raw)
To: Burton, Ross; +Cc: yocto
[-- Attachment #1: Type: text/plain, Size: 393 bytes --]
Probably yes as it got broken again yesterday:
On Mon, Jun 12, 2017 at 9:13 PM, Burton, Ross <ross.burton@intel.com> wrote:
>
> On 12 June 2017 at 20:04, Andre McCurdy <armccurdy@gmail.com> wrote:
>
>> Would it be better to just make the meta-gplv2 gnutls recipe self
>> contained and stop trying to share a .inc file and patches with
>> oe-core?
>>
>
> Yes.
>
> Ross
>
>
[-- Attachment #2: Type: text/html, Size: 1245 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][meta-gplv2] gnutls: add use-pkg-config-to-locate-zlib.patch
2017-06-23 9:25 ` Martin Jansa
@ 2017-06-23 9:25 ` Martin Jansa
0 siblings, 0 replies; 5+ messages in thread
From: Martin Jansa @ 2017-06-23 9:25 UTC (permalink / raw)
To: Burton, Ross; +Cc: yocto
[-- Attachment #1: Type: text/plain, Size: 656 bytes --]
ERROR: gnutls-3.3.27-r0 do_fetch: Fetcher failure for URL:
'file://correct_rpl_gettimeofday_signature.patch'. Unable to fetch URL
from any source.
On Fri, Jun 23, 2017 at 11:25 AM, Martin Jansa <martin.jansa@gmail.com>
wrote:
> Probably yes as it got broken again yesterday:
>
>
> On Mon, Jun 12, 2017 at 9:13 PM, Burton, Ross <ross.burton@intel.com>
> wrote:
>
>>
>> On 12 June 2017 at 20:04, Andre McCurdy <armccurdy@gmail.com> wrote:
>>
>>> Would it be better to just make the meta-gplv2 gnutls recipe self
>>> contained and stop trying to share a .inc file and patches with
>>> oe-core?
>>>
>>
>> Yes.
>>
>> Ross
>>
>>
>
[-- Attachment #2: Type: text/html, Size: 2181 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-06-23 9:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-12 16:22 [PATCH][meta-gplv2] gnutls: add use-pkg-config-to-locate-zlib.patch Martin Jansa
2017-06-12 19:04 ` Andre McCurdy
2017-06-12 19:13 ` Burton, Ross
2017-06-23 9:25 ` Martin Jansa
2017-06-23 9:25 ` Martin Jansa
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.