commit:     bd171538ea6c76c689150c983ad4069b4b5a2549
Author:     Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  6 19:24:53 2019 +0000
Commit:     Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
CommitDate: Sun Jan  6 19:26:26 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd171538

net-libs/gnutls: build with libidn2-2.1.0

Closes: https://bugs.gentoo.org/show_bug.cgi?id=674690
Signed-off-by: Alon Bar-Lev <alonbl <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 net-libs/gnutls/files/gnutls-3.5.19-idn2.patch | 47 ++++++++++++++++++++++++++
 net-libs/gnutls/gnutls-3.5.19-r1.ebuild        |  6 +++-
 net-libs/gnutls/gnutls-3.5.19.ebuild           |  6 +++-
 3 files changed, 57 insertions(+), 2 deletions(-)

diff --git a/net-libs/gnutls/files/gnutls-3.5.19-idn2.patch 
b/net-libs/gnutls/files/gnutls-3.5.19-idn2.patch
new file mode 100644
index 00000000000..1f16302c81b
--- /dev/null
+++ b/net-libs/gnutls/files/gnutls-3.5.19-idn2.patch
@@ -0,0 +1,47 @@
+From b0dfccd2149086cf5d2db44c329664a56b126216 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.bar...@gmail.com>
+Date: Sun, 6 Jan 2019 20:02:50 +0200
+Subject: [PATCH] idn2: do not use deprecated idn2_to_unicode_8z8z in
+ idn2-2.1.0
+
+Signed-off-by: Alon Bar-Lev <alon.bar...@gmail.com>
+---
+ lib/str-idna.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+https://gitlab.com/gnutls/gnutls/merge_requests/864
+
+diff --git a/lib/str-idna.c b/lib/str-idna.c
+index 3bf2db877..95ca9b769 100644
+--- a/lib/str-idna.c
++++ b/lib/str-idna.c
+@@ -145,7 +145,7 @@ int gnutls_idna_map(const char *input, unsigned ilen, 
gnutls_datum_t *out, unsig
+       return ret;
+ }
+ 
+-#ifdef HAVE_LIBIDN2
++#if defined(HAVE_LIBIDN2) && IDN2_VERSION_NUMBER < 0x02000000
+ int _idn2_punycode_decode(
+       size_t input_length,
+       const char input[],
+@@ -153,7 +153,7 @@ int _idn2_punycode_decode(
+       uint32_t output[],
+       unsigned char case_flags[]);
+ 
+-static int _idn2_to_unicode_8z8z(const char *src, char **dst)
++static int idn2_to_unicode_8z8z(const char *src, char **dst, int flags)
+ {
+       int rc, run;
+       size_t out_len = 0;
+@@ -253,7 +253,7 @@ int gnutls_idna_reverse_map(const char *input, unsigned 
ilen, gnutls_datum_t *ou
+ 
+ #ifdef HAVE_LIBIDN2
+       /* currently libidn2 just converts single labels, thus a wrapper 
function */
+-      rc = _idn2_to_unicode_8z8z((char*)istr.data, &u8);
++      rc = idn2_to_unicode_8z8z((char*)istr.data, &u8, 0);
+       if (rc != IDN2_OK) {
+               gnutls_assert();
+               _gnutls_debug_log("unable to convert ACE name '%s' to UTF-8 
format: %s\n", istr.data, idn2_strerror(rc));
+-- 
+2.19.2
+

diff --git a/net-libs/gnutls/gnutls-3.5.19-r1.ebuild 
b/net-libs/gnutls/gnutls-3.5.19-r1.ebuild
index 9fc06eac7ed..379e758cd88 100644
--- a/net-libs/gnutls/gnutls-3.5.19-r1.ebuild
+++ b/net-libs/gnutls/gnutls-3.5.19-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -54,6 +54,10 @@ DOCS=(
 
 HTML_DOCS=()
 
+PATCHES=(
+       "${FILESDIR}/${P}-idn2.patch"
+)
+
 pkg_setup() {
        # bug#520818
        export TZ=UTC

diff --git a/net-libs/gnutls/gnutls-3.5.19.ebuild 
b/net-libs/gnutls/gnutls-3.5.19.ebuild
index 39244f5c2a3..77cc3480387 100644
--- a/net-libs/gnutls/gnutls-3.5.19.ebuild
+++ b/net-libs/gnutls/gnutls-3.5.19.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -54,6 +54,10 @@ DOCS=(
 
 HTML_DOCS=()
 
+PATCHES=(
+       "${FILESDIR}/${P}-idn2.patch"
+)
+
 pkg_setup() {
        # bug#520818
        export TZ=UTC

Reply via email to