1 |
commit: e85e19067f4629b655709bee6376bcafb993b7db |
2 |
Author: Hanno <hanno <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Nov 2 13:07:18 2019 +0000 |
4 |
Commit: Hanno Boeck <hanno <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Nov 2 13:07:18 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e85e1906 |
7 |
|
8 |
dev-erlang/idna: Initial commit |
9 |
|
10 |
Dependency of latest dev-erlang/xmpp version. |
11 |
Use upstream patch to avoid adding a compatibility package |
12 |
for older erlang versions. |
13 |
|
14 |
Signed-off-by: Hanno Boeck <hanno <AT> gentoo.org> |
15 |
Package-Manager: Portage-2.3.78, Repoman-2.3.17 |
16 |
|
17 |
dev-erlang/idna/Manifest | 1 + |
18 |
.../files/idna-remove-unicode_util_compat.diff | 103 +++++++++++++++++++++ |
19 |
dev-erlang/idna/idna-6.0.0.ebuild | 25 +++++ |
20 |
dev-erlang/idna/metadata.xml | 10 ++ |
21 |
4 files changed, 139 insertions(+) |
22 |
|
23 |
diff --git a/dev-erlang/idna/Manifest b/dev-erlang/idna/Manifest |
24 |
new file mode 100644 |
25 |
index 00000000000..7d3a68b0157 |
26 |
--- /dev/null |
27 |
+++ b/dev-erlang/idna/Manifest |
28 |
@@ -0,0 +1 @@ |
29 |
+DIST idna-6.0.0.tar.gz 740802 BLAKE2B 91bc6ee4031450b00659415125e8cec3f034f988bb7d307d323b0a7ca53450d42f0e84a044ccb6c198107c253b70e54466e77b2b0b4e9dd7f7051da49872be33 SHA512 59f8996199f7e3391b1da1b8fb1ebb70e442838eab1f26af9a8a8545f3e1b9f72f0afd65108272a51d846b34e0e8abe9623f10c89156ebca3d87b6b3eb63a066 |
30 |
|
31 |
diff --git a/dev-erlang/idna/files/idna-remove-unicode_util_compat.diff b/dev-erlang/idna/files/idna-remove-unicode_util_compat.diff |
32 |
new file mode 100644 |
33 |
index 00000000000..d369cefbf2a |
34 |
--- /dev/null |
35 |
+++ b/dev-erlang/idna/files/idna-remove-unicode_util_compat.diff |
36 |
@@ -0,0 +1,103 @@ |
37 |
+diff --git a/rebar.config b/rebar.config |
38 |
+index 84fd954..cd02013 100644 |
39 |
+--- a/rebar.config |
40 |
++++ b/rebar.config |
41 |
+@@ -1,3 +1,3 @@ |
42 |
+ {erl_opts, []}. |
43 |
+ |
44 |
+-{deps, [{unicode_util_compat, "0.4.1"}]}. |
45 |
++{deps, []}. |
46 |
+diff --git a/rebar.config.script b/rebar.config.script |
47 |
+deleted file mode 100644 |
48 |
+index d2bce94..0000000 |
49 |
+--- a/rebar.config.script |
50 |
++++ /dev/null |
51 |
+@@ -1,11 +0,0 @@ |
52 |
+-IsRebar3 = erlang:function_exported(rebar3, main, 1), |
53 |
+-Rebar2Deps = [{unicode_util_compat, ".*", |
54 |
+- {git, "https://github.com/benoitc/unicode_util_compat.git", |
55 |
+- {tag, "0.3.1"}}} |
56 |
+- ], |
57 |
+-case IsRebar3 of |
58 |
+- true -> |
59 |
+- CONFIG; |
60 |
+- false -> |
61 |
+- lists:keyreplace(deps, 1, CONFIG, {deps, Rebar2Deps}) |
62 |
+-end. |
63 |
+diff --git a/rebar.lock b/rebar.lock |
64 |
+deleted file mode 100644 |
65 |
+index 15fc8a1..0000000 |
66 |
+--- a/rebar.lock |
67 |
++++ /dev/null |
68 |
+@@ -1,6 +0,0 @@ |
69 |
+-{"1.1.0", |
70 |
+-[{<<"unicode_util_compat">>,{pkg,<<"unicode_util_compat">>,<<"0.4.1">>},0}]}. |
71 |
+-[ |
72 |
+-{pkg_hash,[ |
73 |
+- {<<"unicode_util_compat">>, <<"D869E4C68901DD9531385BB0C8C40444EBF624E60B6962D95952775CAC5E90CD">>}]} |
74 |
+-]. |
75 |
+diff --git a/src/idna.erl b/src/idna.erl |
76 |
+index 5f010b3..32b1745 100644 |
77 |
+--- a/src/idna.erl |
78 |
++++ b/src/idna.erl |
79 |
+@@ -333,7 +333,7 @@ lowercase_list([], true) -> |
80 |
+ lowercase_list([], false) -> |
81 |
+ throw(unchanged); |
82 |
+ lowercase_list(CPs0, Changed) -> |
83 |
+- case unicode_util_compat:lowercase(CPs0) of |
84 |
++ case unicode_util:lowercase(CPs0) of |
85 |
+ [Char|CPs] when Char =:= hd(CPs0) -> [Char|lowercase_list(CPs, Changed)]; |
86 |
+ [Char|CPs] -> append(Char,lowercase_list(CPs, true)); |
87 |
+ [] -> lowercase_list([], Changed) |
88 |
+@@ -346,9 +346,9 @@ lowercase_bin(CP1, <<CP2/utf8, Bin/binary>>, Changed) |
89 |
+ when CP1 < 128, CP2 < 256 -> |
90 |
+ [CP1|lowercase_bin(CP2, Bin, Changed)]; |
91 |
+ lowercase_bin(CP1, Bin, Changed) -> |
92 |
+- case unicode_util_compat:lowercase([CP1|Bin]) of |
93 |
++ case unicode_util:lowercase([CP1|Bin]) of |
94 |
+ [CP1|CPs] -> |
95 |
+- case unicode_util_compat:cp(CPs) of |
96 |
++ case unicode_util:cp(CPs) of |
97 |
+ [Next|Rest] -> |
98 |
+ [CP1|lowercase_bin(Next, Rest, Changed)]; |
99 |
+ [] when Changed -> |
100 |
+@@ -357,7 +357,7 @@ lowercase_bin(CP1, Bin, Changed) -> |
101 |
+ throw(unchanged) |
102 |
+ end; |
103 |
+ [Char|CPs] -> |
104 |
+- case unicode_util_compat:cp(CPs) of |
105 |
++ case unicode_util:cp(CPs) of |
106 |
+ [Next|Rest] -> |
107 |
+ [Char|lowercase_bin(Next, Rest, true)]; |
108 |
+ [] -> |
109 |
+@@ -374,7 +374,7 @@ append(GC, Str) when is_list(GC) -> GC ++ Str. |
110 |
+ |
111 |
+ |
112 |
+ characters_to_nfc_list(CD) -> |
113 |
+- case unicode_util_compat:nfc(CD) of |
114 |
++ case unicode_util:nfc(CD) of |
115 |
+ [CPs|Str] when is_list(CPs) -> CPs ++ characters_to_nfc_list(Str); |
116 |
+ [CP|Str] -> [CP|characters_to_nfc_list(Str)]; |
117 |
+ [] -> [] |
118 |
+diff --git a/src/idna_context.erl b/src/idna_context.erl |
119 |
+index afcb814..a09ff1f 100644 |
120 |
+--- a/src/idna_context.erl |
121 |
++++ b/src/idna_context.erl |
122 |
+@@ -28,7 +28,7 @@ valid_contextj(Label, Pos) -> |
123 |
+ valid_contextj(16#200c, Label, Pos) -> |
124 |
+ if |
125 |
+ Pos > 0 -> |
126 |
+- case unicode_util_compat:lookup(lists:nth(Pos, Label)) of |
127 |
++ case unicode_util:lookup(lists:nth(Pos, Label)) of |
128 |
+ #{ ccc := ?virama_combining_class } -> true; |
129 |
+ _ -> |
130 |
+ valid_contextj_1(Label, Pos) |
131 |
+@@ -38,7 +38,7 @@ valid_contextj(16#200c, Label, Pos) -> |
132 |
+ end; |
133 |
+ |
134 |
+ valid_contextj(16#200d, Label, Pos) when Pos > 0 -> |
135 |
+- case unicode_util_compat:lookup(lists:nth(Pos, Label)) of |
136 |
++ case unicode_util:lookup(lists:nth(Pos, Label)) of |
137 |
+ #{ ccc := ?virama_combining_class } -> true; |
138 |
+ _ -> false |
139 |
+ end; |
140 |
|
141 |
diff --git a/dev-erlang/idna/idna-6.0.0.ebuild b/dev-erlang/idna/idna-6.0.0.ebuild |
142 |
new file mode 100644 |
143 |
index 00000000000..24385454165 |
144 |
--- /dev/null |
145 |
+++ b/dev-erlang/idna/idna-6.0.0.ebuild |
146 |
@@ -0,0 +1,25 @@ |
147 |
+# Copyright 1999-2019 Gentoo Authors |
148 |
+# Distributed under the terms of the GNU General Public License v2 |
149 |
+ |
150 |
+EAPI=6 |
151 |
+ |
152 |
+inherit rebar |
153 |
+ |
154 |
+DESCRIPTION="Erlang IDNA implementation" |
155 |
+HOMEPAGE="https://github.com/benoitc/erlang-idna" |
156 |
+SRC_URI="https://github.com/benoitc/erlang-idna/archive/${PV}.tar.gz |
157 |
+ -> ${P}.tar.gz" |
158 |
+ |
159 |
+LICENSE="MIT" |
160 |
+SLOT="0" |
161 |
+KEYWORDS="~amd64" |
162 |
+ |
163 |
+DEPEND=">=dev-lang/erlang-21.0" |
164 |
+ |
165 |
+DOCS=( CHANGELOG README.md ) |
166 |
+ |
167 |
+S="${WORKDIR}/erlang-idna-${PV}" |
168 |
+ |
169 |
+# Removes dependency to workaround for older erlang versions. |
170 |
+# Patch from https://github.com/benoitc/erlang-idna/pull/31 |
171 |
+PATCHES=( "${FILESDIR}/idna-remove-unicode_util_compat.diff" ) |
172 |
|
173 |
diff --git a/dev-erlang/idna/metadata.xml b/dev-erlang/idna/metadata.xml |
174 |
new file mode 100644 |
175 |
index 00000000000..7d0a22a4d4f |
176 |
--- /dev/null |
177 |
+++ b/dev-erlang/idna/metadata.xml |
178 |
@@ -0,0 +1,10 @@ |
179 |
+<?xml version='1.0' encoding='UTF-8'?> |
180 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
181 |
+<pkgmetadata> |
182 |
+ <maintainer type="person"> |
183 |
+ <email>ejabberd@g.o</email> |
184 |
+ </maintainer> |
185 |
+ <upstream> |
186 |
+ <remote-id type="github">benoitc/erlang-idna</remote-id> |
187 |
+ </upstream> |
188 |
+</pkgmetadata> |