Gentoo Archives: gentoo-commits

From: Alexis Ballier <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ml/tyxml/files/, dev-ml/tyxml/
Date: Mon, 28 Nov 2016 20:27:51
Message-Id: 1480364853.99a0680520e735a19f88fc2937a1c4ccd241442c.aballier@gentoo
1 commit: 99a0680520e735a19f88fc2937a1c4ccd241442c
2 Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 28 20:27:17 2016 +0000
4 Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 28 20:27:33 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99a06805
7
8 dev-ml/tyxml: fix build with uutf 1.0
9
10 Package-Manager: portage-2.3.2
11
12 dev-ml/tyxml/files/uutf.patch | 53 +++++++++++++++++++++++++++++++++++++++++
13 dev-ml/tyxml/tyxml-4.0.0.ebuild | 3 ++-
14 2 files changed, 55 insertions(+), 1 deletion(-)
15
16 diff --git a/dev-ml/tyxml/files/uutf.patch b/dev-ml/tyxml/files/uutf.patch
17 new file mode 100644
18 index 00000000..e7d0a3f
19 --- /dev/null
20 +++ b/dev-ml/tyxml/files/uutf.patch
21 @@ -0,0 +1,53 @@
22 +Index: tyxml-4.0.0/lib/xml_print.ml
23 +===================================================================
24 +--- tyxml-4.0.0.orig/lib/xml_print.ml
25 ++++ tyxml-4.0.0/lib/xml_print.ml
26 +@@ -154,15 +154,14 @@ module Utf8 = struct
27 + Uutf.String.fold_utf_8
28 + (fun _ _ d ->
29 + match d with
30 +- | `Uchar 34 ->
31 +- Buffer.add_string buffer "&quot;"
32 +- | `Uchar 38 ->
33 +- Buffer.add_string buffer "&amp;"
34 +- | `Uchar 60 ->
35 +- Buffer.add_string buffer "&lt;"
36 +- | `Uchar 62 ->
37 +- Buffer.add_string buffer "&gt;"
38 +- | `Uchar code ->
39 ++ | `Uchar ucode ->
40 ++ begin
41 ++ match Uchar.to_int ucode with
42 ++ | 34 -> Buffer.add_string buffer "&quot;"
43 ++ | 38 -> Buffer.add_string buffer "&amp;"
44 ++ | 60 -> Buffer.add_string buffer "&lt;"
45 ++ | 62 -> Buffer.add_string buffer "&gt;"
46 ++ | code ->
47 + let u =
48 + (* Illegal characters in html
49 + http://en.wikipedia.org/wiki/Character_encodings_in_HTML
50 +@@ -181,9 +180,10 @@ module Utf8 = struct
51 + || code land 0xFFFF = 0xFFFE
52 + || code land 0xFFFF = 0xFFFF
53 + then (warn:=true; Uutf.u_rep)
54 +- else code
55 ++ else ucode
56 + in
57 + Uutf.Buffer.add_utf_8 buffer u
58 ++ end
59 + | `Malformed _ ->
60 + Uutf.Buffer.add_utf_8 buffer Uutf.u_rep;
61 + warn:=true)
62 +Index: tyxml-4.0.0/ppx/ppx_attribute_value.ml
63 +===================================================================
64 +--- tyxml-4.0.0.orig/ppx/ppx_attribute_value.ml
65 ++++ tyxml-4.0.0/ppx/ppx_attribute_value.ml
66 +@@ -160,7 +160,7 @@ let char ?separated_by:_ ?default:_ loc
67 + let c =
68 + match next decoded with
69 + | None -> Ppx_common.error loc "No character in attribute %s" name
70 +- | Some i when i <= 255 -> Char.chr i
71 ++ | Some i when Uchar.to_int i <= 255 -> Char.chr (Uchar.to_int i)
72 + | Some _ ->
73 + Ppx_common.error loc "Character out of range in attribute %s" name
74 + in
75
76 diff --git a/dev-ml/tyxml/tyxml-4.0.0.ebuild b/dev-ml/tyxml/tyxml-4.0.0.ebuild
77 index 756ecbf..f18fea8 100644
78 --- a/dev-ml/tyxml/tyxml-4.0.0.ebuild
79 +++ b/dev-ml/tyxml/tyxml-4.0.0.ebuild
80 @@ -18,13 +18,14 @@ KEYWORDS="~amd64"
81 IUSE="+ppx +camlp4"
82
83 DEPEND="
84 - dev-ml/uutf:=
85 + >=dev-ml/uutf-1.0:=
86 dev-ml/ocaml-re:=
87 ppx? ( >=dev-ml/ppx_tools-5:= dev-ml/markup:= )
88 camlp4? ( dev-ml/camlp4:= )"
89 RDEPEND="${DEPEND}"
90
91 DOCS=( CHANGES README.md )
92 +PATCHES=( "${FILESDIR}/uutf.patch" )
93
94 src_configure() {
95 oasis_configure_opts="