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/ppx_typerep_conv/files/, dev-ml/ppx_typerep_conv/
Date: Tue, 03 May 2016 17:45:02
Message-Id: 1462297462.a0ca56728fff0d9013c13e4e86bcdf8f89b5c85d.aballier@gentoo
1 commit: a0ca56728fff0d9013c13e4e86bcdf8f89b5c85d
2 Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 3 15:06:41 2016 +0000
4 Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
5 CommitDate: Tue May 3 17:44:22 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0ca5672
7
8 dev-ml/ppx_typerep_conv: fix build with ocaml 4.03
9
10 Package-Manager: portage-2.2.28
11 Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>
12
13 dev-ml/ppx_typerep_conv/files/oc43.patch | 61 ++++++++++++++++++++++
14 .../ppx_typerep_conv-113.33.00.ebuild | 4 ++
15 2 files changed, 65 insertions(+)
16
17 diff --git a/dev-ml/ppx_typerep_conv/files/oc43.patch b/dev-ml/ppx_typerep_conv/files/oc43.patch
18 new file mode 100644
19 index 0000000..3f3a641
20 --- /dev/null
21 +++ b/dev-ml/ppx_typerep_conv/files/oc43.patch
22 @@ -0,0 +1,61 @@
23 +diff -uNr ppx_typerep_conv-113.33.00/_oasis ppx_typerep_conv-113.33.00+4.03/_oasis
24 +--- ppx_typerep_conv-113.33.00/_oasis 2016-03-09 16:44:55.000000000 +0100
25 ++++ ppx_typerep_conv-113.33.00+4.03/_oasis 2016-03-22 15:13:51.000000000 +0100
26 +@@ -1,8 +1,8 @@
27 + OASISFormat: 0.4
28 +-OCamlVersion: >= 4.02.3
29 ++OCamlVersion: >= 4.03.0
30 + FindlibVersion: >= 1.3.2
31 + Name: ppx_typerep_conv
32 +-Version: 113.33.00
33 ++Version: 113.33.00+4.03
34 + Synopsis: Generation of runtime types from type declarations
35 + Authors: Jane Street Group, LLC <opensource@××××××××××.com>
36 + Copyrights: (C) 2015-2016 Jane Street Group LLC <opensource@××××××××××.com>
37 +diff -uNr ppx_typerep_conv-113.33.00/opam ppx_typerep_conv-113.33.00+4.03/opam
38 +--- ppx_typerep_conv-113.33.00/opam 2016-03-18 12:08:01.000000000 +0100
39 ++++ ppx_typerep_conv-113.33.00+4.03/opam 2016-03-22 17:51:38.000000000 +0100
40 +@@ -17,4 +17,4 @@
41 + "ppx_type_conv"
42 + "typerep"
43 + ]
44 +-available: [ ocaml-version >= "4.02.3" ]
45 ++available: [ ocaml-version >= "4.03.0" ]
46 +diff -uNr ppx_typerep_conv-113.33.00/src/ppx_typerep_conv.ml ppx_typerep_conv-113.33.00+4.03/src/ppx_typerep_conv.ml
47 +--- ppx_typerep_conv-113.33.00/src/ppx_typerep_conv.ml 2016-03-09 16:44:55.000000000 +0100
48 ++++ ppx_typerep_conv-113.33.00+4.03/src/ppx_typerep_conv.ml 2016-03-22 15:13:51.000000000 +0100
49 +@@ -134,7 +134,7 @@
50 + let label = cd.pcd_name.txt in
51 + let loc = cd.pcd_loc in
52 + match cd.pcd_args with
53 +- | [] ->
54 ++ | Pcstr_tuple [] ->
55 + { label;
56 + ctyp = None;
57 + poly = false;
58 +@@ -142,7 +142,7 @@
59 + index;
60 + arity_index = no_arg ();
61 + }
62 +- | args ->
63 ++ | Pcstr_tuple args ->
64 + let arity = List.length args in
65 + let ctyp = ptyp_tuple ~loc args in
66 + { label;
67 +@@ -152,6 +152,7 @@
68 + index;
69 + arity_index = with_arg ();
70 + }
71 ++ | Pcstr_record _ -> failwith "Pcstr_record not supported"
72 + in
73 + List.mapi cds ~f:mapi
74 + end
75 +@@ -263,7 +264,7 @@
76 + [%stri let name = [%e estring ~loc full_type_name] ]
77 + in
78 + pmod_structure ~loc
79 +- [ pstr_type ~loc [td]
80 ++ [ pstr_type ~loc Nonrecursive [td]
81 + ; name_def
82 + ]
83 +
84
85 diff --git a/dev-ml/ppx_typerep_conv/ppx_typerep_conv-113.33.00.ebuild b/dev-ml/ppx_typerep_conv/ppx_typerep_conv-113.33.00.ebuild
86 index b6501cc..cbf58ec 100644
87 --- a/dev-ml/ppx_typerep_conv/ppx_typerep_conv-113.33.00.ebuild
88 +++ b/dev-ml/ppx_typerep_conv/ppx_typerep_conv-113.33.00.ebuild
89 @@ -24,6 +24,10 @@ DEPEND="
90 RDEPEND="${DEPEND}"
91 DEPEND="${DEPEND} dev-ml/opam"
92
93 +src_prepare() {
94 + has_version '>=dev-lang/ocaml-4.03' && epatch "${FILESDIR}/oc43.patch"
95 +}
96 +
97 src_configure() {
98 emake setup.exe
99 OASIS_SETUP_COMMAND="./setup.exe" oasis_src_configure