summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanno <hanno@gentoo.org>2019-11-02 14:07:18 +0100
committerHanno <hanno@gentoo.org>2019-11-02 14:07:18 +0100
commite85e19067f4629b655709bee6376bcafb993b7db (patch)
tree1c7156945f4de4c05b195fd1c8e48ae19ecb9eb5 /dev-erlang/idna
parentdev-erlang/eimp: Assign to ejabberd project. (diff)
downloadgentoo-e85e19067f4629b655709bee6376bcafb993b7db.tar.gz
gentoo-e85e19067f4629b655709bee6376bcafb993b7db.tar.bz2
gentoo-e85e19067f4629b655709bee6376bcafb993b7db.zip
dev-erlang/idna: Initial commit
Dependency of latest dev-erlang/xmpp version. Use upstream patch to avoid adding a compatibility package for older erlang versions. Signed-off-by: Hanno Boeck <hanno@gentoo.org> Package-Manager: Portage-2.3.78, Repoman-2.3.17
Diffstat (limited to 'dev-erlang/idna')
-rw-r--r--dev-erlang/idna/Manifest1
-rw-r--r--dev-erlang/idna/files/idna-remove-unicode_util_compat.diff103
-rw-r--r--dev-erlang/idna/idna-6.0.0.ebuild25
-rw-r--r--dev-erlang/idna/metadata.xml10
4 files changed, 139 insertions, 0 deletions
diff --git a/dev-erlang/idna/Manifest b/dev-erlang/idna/Manifest
new file mode 100644
index 000000000000..7d3a68b0157c
--- /dev/null
+++ b/dev-erlang/idna/Manifest
@@ -0,0 +1 @@
+DIST idna-6.0.0.tar.gz 740802 BLAKE2B 91bc6ee4031450b00659415125e8cec3f034f988bb7d307d323b0a7ca53450d42f0e84a044ccb6c198107c253b70e54466e77b2b0b4e9dd7f7051da49872be33 SHA512 59f8996199f7e3391b1da1b8fb1ebb70e442838eab1f26af9a8a8545f3e1b9f72f0afd65108272a51d846b34e0e8abe9623f10c89156ebca3d87b6b3eb63a066
diff --git a/dev-erlang/idna/files/idna-remove-unicode_util_compat.diff b/dev-erlang/idna/files/idna-remove-unicode_util_compat.diff
new file mode 100644
index 000000000000..d369cefbf2a6
--- /dev/null
+++ b/dev-erlang/idna/files/idna-remove-unicode_util_compat.diff
@@ -0,0 +1,103 @@
+diff --git a/rebar.config b/rebar.config
+index 84fd954..cd02013 100644
+--- a/rebar.config
++++ b/rebar.config
+@@ -1,3 +1,3 @@
+ {erl_opts, []}.
+
+-{deps, [{unicode_util_compat, "0.4.1"}]}.
++{deps, []}.
+diff --git a/rebar.config.script b/rebar.config.script
+deleted file mode 100644
+index d2bce94..0000000
+--- a/rebar.config.script
++++ /dev/null
+@@ -1,11 +0,0 @@
+-IsRebar3 = erlang:function_exported(rebar3, main, 1),
+-Rebar2Deps = [{unicode_util_compat, ".*",
+- {git, "https://github.com/benoitc/unicode_util_compat.git",
+- {tag, "0.3.1"}}}
+- ],
+-case IsRebar3 of
+- true ->
+- CONFIG;
+- false ->
+- lists:keyreplace(deps, 1, CONFIG, {deps, Rebar2Deps})
+-end.
+diff --git a/rebar.lock b/rebar.lock
+deleted file mode 100644
+index 15fc8a1..0000000
+--- a/rebar.lock
++++ /dev/null
+@@ -1,6 +0,0 @@
+-{"1.1.0",
+-[{<<"unicode_util_compat">>,{pkg,<<"unicode_util_compat">>,<<"0.4.1">>},0}]}.
+-[
+-{pkg_hash,[
+- {<<"unicode_util_compat">>, <<"D869E4C68901DD9531385BB0C8C40444EBF624E60B6962D95952775CAC5E90CD">>}]}
+-].
+diff --git a/src/idna.erl b/src/idna.erl
+index 5f010b3..32b1745 100644
+--- a/src/idna.erl
++++ b/src/idna.erl
+@@ -333,7 +333,7 @@ lowercase_list([], true) ->
+ lowercase_list([], false) ->
+ throw(unchanged);
+ lowercase_list(CPs0, Changed) ->
+- case unicode_util_compat:lowercase(CPs0) of
++ case unicode_util:lowercase(CPs0) of
+ [Char|CPs] when Char =:= hd(CPs0) -> [Char|lowercase_list(CPs, Changed)];
+ [Char|CPs] -> append(Char,lowercase_list(CPs, true));
+ [] -> lowercase_list([], Changed)
+@@ -346,9 +346,9 @@ lowercase_bin(CP1, <<CP2/utf8, Bin/binary>>, Changed)
+ when CP1 < 128, CP2 < 256 ->
+ [CP1|lowercase_bin(CP2, Bin, Changed)];
+ lowercase_bin(CP1, Bin, Changed) ->
+- case unicode_util_compat:lowercase([CP1|Bin]) of
++ case unicode_util:lowercase([CP1|Bin]) of
+ [CP1|CPs] ->
+- case unicode_util_compat:cp(CPs) of
++ case unicode_util:cp(CPs) of
+ [Next|Rest] ->
+ [CP1|lowercase_bin(Next, Rest, Changed)];
+ [] when Changed ->
+@@ -357,7 +357,7 @@ lowercase_bin(CP1, Bin, Changed) ->
+ throw(unchanged)
+ end;
+ [Char|CPs] ->
+- case unicode_util_compat:cp(CPs) of
++ case unicode_util:cp(CPs) of
+ [Next|Rest] ->
+ [Char|lowercase_bin(Next, Rest, true)];
+ [] ->
+@@ -374,7 +374,7 @@ append(GC, Str) when is_list(GC) -> GC ++ Str.
+
+
+ characters_to_nfc_list(CD) ->
+- case unicode_util_compat:nfc(CD) of
++ case unicode_util:nfc(CD) of
+ [CPs|Str] when is_list(CPs) -> CPs ++ characters_to_nfc_list(Str);
+ [CP|Str] -> [CP|characters_to_nfc_list(Str)];
+ [] -> []
+diff --git a/src/idna_context.erl b/src/idna_context.erl
+index afcb814..a09ff1f 100644
+--- a/src/idna_context.erl
++++ b/src/idna_context.erl
+@@ -28,7 +28,7 @@ valid_contextj(Label, Pos) ->
+ valid_contextj(16#200c, Label, Pos) ->
+ if
+ Pos > 0 ->
+- case unicode_util_compat:lookup(lists:nth(Pos, Label)) of
++ case unicode_util:lookup(lists:nth(Pos, Label)) of
+ #{ ccc := ?virama_combining_class } -> true;
+ _ ->
+ valid_contextj_1(Label, Pos)
+@@ -38,7 +38,7 @@ valid_contextj(16#200c, Label, Pos) ->
+ end;
+
+ valid_contextj(16#200d, Label, Pos) when Pos > 0 ->
+- case unicode_util_compat:lookup(lists:nth(Pos, Label)) of
++ case unicode_util:lookup(lists:nth(Pos, Label)) of
+ #{ ccc := ?virama_combining_class } -> true;
+ _ -> false
+ end;
diff --git a/dev-erlang/idna/idna-6.0.0.ebuild b/dev-erlang/idna/idna-6.0.0.ebuild
new file mode 100644
index 000000000000..243854541657
--- /dev/null
+++ b/dev-erlang/idna/idna-6.0.0.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit rebar
+
+DESCRIPTION="Erlang IDNA implementation"
+HOMEPAGE="https://github.com/benoitc/erlang-idna"
+SRC_URI="https://github.com/benoitc/erlang-idna/archive/${PV}.tar.gz
+ -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND=">=dev-lang/erlang-21.0"
+
+DOCS=( CHANGELOG README.md )
+
+S="${WORKDIR}/erlang-idna-${PV}"
+
+# Removes dependency to workaround for older erlang versions.
+# Patch from https://github.com/benoitc/erlang-idna/pull/31
+PATCHES=( "${FILESDIR}/idna-remove-unicode_util_compat.diff" )
diff --git a/dev-erlang/idna/metadata.xml b/dev-erlang/idna/metadata.xml
new file mode 100644
index 000000000000..7d0a22a4d4fe
--- /dev/null
+++ b/dev-erlang/idna/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>ejabberd@gentoo.org</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">benoitc/erlang-idna</remote-id>
+ </upstream>
+</pkgmetadata>