Gentoo Archives: gentoo-commits

From: "Andreas K. Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-perl/Net-LibIDN2/files/, dev-perl/Net-LibIDN2/
Date: Tue, 15 Jan 2019 16:56:40
Message-Id: 1547571386.8d74130f1f767338f76454fc15e7895361fd1c83.dilfridge@gentoo
1 commit: 8d74130f1f767338f76454fc15e7895361fd1c83
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 15 16:56:01 2019 +0000
4 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 15 16:56:26 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d74130f
7
8 dev-perl/Net-LibIDN2: Fix tests, patch from RH/upstream
9
10 Bug: https://rt.cpan.org/Public/Bug/Display.html?id=125440
11 Closes: https://bugs.gentoo.org/656288
12 Package-Manager: Portage-2.3.56, Repoman-2.3.12
13 Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
14
15 ...N2-1.0.0.ebuild => Net-LibIDN2-1.0.0-r1.ebuild} | 2 +
16 .../files/Net-LibIDN2-1.0.0-libidn-2.0.5.patch | 98 ++++++++++++++++++++++
17 2 files changed, 100 insertions(+)
18
19 diff --git a/dev-perl/Net-LibIDN2/Net-LibIDN2-1.0.0.ebuild b/dev-perl/Net-LibIDN2/Net-LibIDN2-1.0.0-r1.ebuild
20 similarity index 92%
21 rename from dev-perl/Net-LibIDN2/Net-LibIDN2-1.0.0.ebuild
22 rename to dev-perl/Net-LibIDN2/Net-LibIDN2-1.0.0-r1.ebuild
23 index d7df6b24a25..488f3283a24 100644
24 --- a/dev-perl/Net-LibIDN2/Net-LibIDN2-1.0.0.ebuild
25 +++ b/dev-perl/Net-LibIDN2/Net-LibIDN2-1.0.0-r1.ebuild
26 @@ -21,3 +21,5 @@ DEPEND="${RDEPEND}
27 >=virtual/perl-Test-Simple-0.10.0
28 )
29 "
30 +
31 +PATCHES=( "${FILESDIR}/${P}"-libidn-2.0.5.patch )
32
33 diff --git a/dev-perl/Net-LibIDN2/files/Net-LibIDN2-1.0.0-libidn-2.0.5.patch b/dev-perl/Net-LibIDN2/files/Net-LibIDN2-1.0.0-libidn-2.0.5.patch
34 new file mode 100644
35 index 00000000000..e7fb47bd0ac
36 --- /dev/null
37 +++ b/dev-perl/Net-LibIDN2/files/Net-LibIDN2-1.0.0-libidn-2.0.5.patch
38 @@ -0,0 +1,98 @@
39 +From 1fb29989acde21148e5c36b3bdccbf2a4a88059c Mon Sep 17 00:00:00 2001
40 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@××××××.com>
41 +Date: Thu, 31 May 2018 15:02:02 +0200
42 +Subject: [PATCH] Adapt to libidn-2.0.5
43 +MIME-Version: 1.0
44 +Content-Type: text/plain; charset=UTF-8
45 +Content-Transfer-Encoding: 8bit
46 +
47 +libidn-2.0.5 enabled non-transitional TR46 by default. This caused
48 +a test failure. This patch adds IDN2_NO_TR46 flag, document the
49 +change and adapts the test.
50 +
51 +CPAN RT#125440
52 +
53 +Signed-off-by: Petr Písař <ppisar@××××××.com>
54 +---
55 + lib/Net/LibIDN2.pm | 11 +++++++++--
56 + lib/Net/LibIDN2.xs | 3 +++
57 + t/001_basic.t | 6 +++++-
58 + 3 files changed, 17 insertions(+), 3 deletions(-)
59 +
60 +diff --git a/lib/Net/LibIDN2.pm b/lib/Net/LibIDN2.pm
61 +index b27aaa4..c6ca3bd 100644
62 +--- a/lib/Net/LibIDN2.pm
63 ++++ b/lib/Net/LibIDN2.pm
64 +@@ -32,6 +32,7 @@ our %EXPORT_TAGS = ( 'all' => [ qw(
65 + IDN2_NONTRANSITIONAL
66 + IDN2_ALLOW_UNASSIGNED
67 + IDN2_USE_STD3_ASCII_RULES
68 ++ IDN2_NO_TR46
69 + ) ] );
70 +
71 + our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
72 +@@ -50,6 +51,7 @@ our @EXPORT = qw(
73 + IDN2_NONTRANSITIONAL
74 + IDN2_ALLOW_UNASSIGNED
75 + IDN2_USE_STD3_ASCII_RULES
76 ++ IDN2_NO_TR46
77 + );
78 + our $VERSION = '1.00';
79 +
80 +@@ -102,8 +104,10 @@ Pass B<IDN2_ALABEL_ROUNDTRIP> in flags to convert any input A-labels
81 + to U-labels and perform additional testing (not yet implemented).
82 + Pass IDN2_TRANSITIONAL to enable Unicode
83 + TR46 transitional processing, and IDN2_NONTRANSITIONAL to enable Unicode TR46
84 +-non-transitional processing. Multiple flags may be specified
85 +-by binary or:ing them together, for example B<IDN2_NFC_INPUT> | B<IDN2_ALABEL_ROUNDTRIP>.
86 ++non-transitional processing. Pass IDN2_NO_TR46 (available since Libidn 2.0.5)
87 ++to disable any TR46 transitional or non-transitional processing. Multiple
88 ++flags may be specified by binary or:ing them together, for example
89 ++B<IDN2_NFC_INPUT> | B<IDN2_ALABEL_ROUNDTRIP>.
90 +
91 + If linked to library GNU Libidn version > 2.0.3: IDN2_USE_STD3_ASCII_RULES disabled by default.
92 + Previously we were eliminating non-STD3 characters from domain strings such as
93 +@@ -112,6 +116,9 @@ That was an unexpected regression for applications switching from libidn
94 + and thus it is no longer applied by default. Use IDN2_USE_STD3_ASCII_RULES
95 + to enable that behavior again.
96 +
97 ++If linked to library GNU Libidn version >= 2.0.5: IDNA2008 behavior amended by TR46
98 ++(non-transitional) is default.
99 ++
100 + On error, returns undef. If a scalar variable is provided in I<$rc>,
101 + returns the internal libidn2 C library result code as well.
102 +
103 +diff --git a/lib/Net/LibIDN2.xs b/lib/Net/LibIDN2.xs
104 +index 5b2f7c3..027285a 100644
105 +--- a/lib/Net/LibIDN2.xs
106 ++++ b/lib/Net/LibIDN2.xs
107 +@@ -25,6 +25,9 @@ BOOT:
108 + newCONSTSUB(stash, "IDN2_NONTRANSITIONAL", newSViv(IDN2_NONTRANSITIONAL));
109 + newCONSTSUB(stash, "IDN2_ALLOW_UNASSIGNED", newSViv(IDN2_ALLOW_UNASSIGNED));
110 + newCONSTSUB(stash, "IDN2_USE_STD3_ASCII_RULES", newSViv(IDN2_USE_STD3_ASCII_RULES));
111 ++#if IDN2_VERSION_NUMBER >= 0x02000005
112 ++ newCONSTSUB(stash, "IDN2_NO_TR46", newSViv(IDN2_NO_TR46));
113 ++#endif
114 +
115 +
116 + const char *
117 +diff --git a/t/001_basic.t b/t/001_basic.t
118 +index 3171478..ada1091 100644
119 +--- a/t/001_basic.t
120 ++++ b/t/001_basic.t
121 +@@ -76,7 +76,11 @@ my $muesli_dot_de_punycode = "xn--mli-5ka8l.de";
122 + my $rc = 0;
123 + my $result = Net::LibIDN2::idn2_lookup_u8(
124 + "\x65\x78\x61\x6d\x70\x6c\x65\x2e\xe1\x84\x80\xe1\x85\xa1\xe1\x86\xa8",
125 +- 0,
126 ++ (IDN2_VERSION_MAJOR > 2 ||
127 ++ (IDN2_VERSION_MAJOR == 2 && (IDN2_VERSION_MINOR > 0 ||
128 ++ IDN2_VERSION_MINOR == 0 && IDN2_VERSION_PATCH >= 5)
129 ++ )
130 ++ ) ? IDN2_NO_TR46 : 0,
131 + $rc);
132 +
133 + is(Net::LibIDN2::idn2_strerror_name($rc), "IDN2_NOT_NFC");
134 +--
135 +2.14.4
136 +