summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Bar-Lev <alonbl@gentoo.org>2019-01-06 21:24:53 +0200
committerAlon Bar-Lev <alonbl@gentoo.org>2019-01-06 21:26:26 +0200
commitbd171538ea6c76c689150c983ad4069b4b5a2549 (patch)
tree3bba33bc187892640e773e89a2e853a32da1a7f1 /net-libs
parentwww-client/otter: Old (diff)
downloadgentoo-bd171538ea6c76c689150c983ad4069b4b5a2549.tar.gz
gentoo-bd171538ea6c76c689150c983ad4069b4b5a2549.tar.bz2
gentoo-bd171538ea6c76c689150c983ad4069b4b5a2549.zip
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@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/gnutls/files/gnutls-3.5.19-idn2.patch47
-rw-r--r--net-libs/gnutls/gnutls-3.5.19-r1.ebuild6
-rw-r--r--net-libs/gnutls/gnutls-3.5.19.ebuild6
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 000000000000..1f16302c81be
--- /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.barlev@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.barlev@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 9fc06eac7ed6..379e758cd88f 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 39244f5c2a32..77cc34803870 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