1 |
commit: 22b4d5b0c22cc0a4bc87165b21c3d158976cd677 |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 3 17:22:29 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=22b4d5b0 |
7 |
|
8 |
dev-ml/ppx_enumerate: 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_enumerate/files/oc43.patch | 40 ++++++++++++++++++++++ |
14 |
.../ppx_enumerate/ppx_enumerate-113.33.00.ebuild | 4 +++ |
15 |
2 files changed, 44 insertions(+) |
16 |
|
17 |
diff --git a/dev-ml/ppx_enumerate/files/oc43.patch b/dev-ml/ppx_enumerate/files/oc43.patch |
18 |
new file mode 100644 |
19 |
index 0000000..b04635f |
20 |
--- /dev/null |
21 |
+++ b/dev-ml/ppx_enumerate/files/oc43.patch |
22 |
@@ -0,0 +1,40 @@ |
23 |
+diff -uNr ppx_enumerate-113.33.00/_oasis ppx_enumerate-113.33.00+4.03/_oasis |
24 |
+--- ppx_enumerate-113.33.00/_oasis 2016-03-09 16:44:54.000000000 +0100 |
25 |
++++ ppx_enumerate-113.33.00+4.03/_oasis 2016-03-22 15:13:50.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_enumerate |
32 |
+-Version: 113.33.00 |
33 |
++Version: 113.33.00+4.03 |
34 |
+ Synopsis: Generate a list containing all values of a finite type |
35 |
+ Authors: Jane Street Group, LLC <opensource@××××××××××.com> |
36 |
+ Copyrights: (C) 2015-2016 Jane Street Group LLC <opensource@××××××××××.com> |
37 |
+diff -uNr ppx_enumerate-113.33.00/opam ppx_enumerate-113.33.00+4.03/opam |
38 |
+--- ppx_enumerate-113.33.00/opam 2016-03-18 12:08:01.000000000 +0100 |
39 |
++++ ppx_enumerate-113.33.00+4.03/opam 2016-03-22 17:51:36.000000000 +0100 |
40 |
+@@ -16,4 +16,4 @@ |
41 |
+ "ppx_tools" {>= "0.99.3"} |
42 |
+ "ppx_type_conv" |
43 |
+ ] |
44 |
+-available: [ ocaml-version >= "4.02.3" ] |
45 |
++available: [ ocaml-version >= "4.03.0" ] |
46 |
+diff -uNr ppx_enumerate-113.33.00/src/ppx_enumerate.ml ppx_enumerate-113.33.00+4.03/src/ppx_enumerate.ml |
47 |
+--- ppx_enumerate-113.33.00/src/ppx_enumerate.ml 2016-03-09 16:44:54.000000000 +0100 |
48 |
++++ ppx_enumerate-113.33.00+4.03/src/ppx_enumerate.ml 2016-03-22 15:13:50.000000000 +0100 |
49 |
+@@ -226,10 +226,11 @@ |
50 |
+ |
51 |
+ and constructor_case loc cd = |
52 |
+ match cd.pcd_args with |
53 |
+- | [] -> [%expr [ [%e econstruct cd None ] ] ] |
54 |
+- | tps -> |
55 |
++ | Pcstr_tuple [] -> [%expr [ [%e econstruct cd None ] ] ] |
56 |
++ | Pcstr_tuple tps -> |
57 |
+ product loc tps (fun x -> |
58 |
+ econstruct cd (Some (pexp_tuple ~loc x))) |
59 |
++ | Pcstr_record _ -> failwith "Pcstr_record not supported" |
60 |
+ |
61 |
+ and product loc tps f = |
62 |
+ let all = List.map tps ~f:(fun tp -> enum ~main_type:tp tp) in |
63 |
|
64 |
diff --git a/dev-ml/ppx_enumerate/ppx_enumerate-113.33.00.ebuild b/dev-ml/ppx_enumerate/ppx_enumerate-113.33.00.ebuild |
65 |
index 1f0f377..ac7565e 100644 |
66 |
--- a/dev-ml/ppx_enumerate/ppx_enumerate-113.33.00.ebuild |
67 |
+++ b/dev-ml/ppx_enumerate/ppx_enumerate-113.33.00.ebuild |
68 |
@@ -22,6 +22,10 @@ DEPEND="dev-ml/ppx_tools:= |
69 |
RDEPEND="${DEPEND}" |
70 |
DEPEND="${DEPEND} dev-ml/opam" |
71 |
|
72 |
+src_prepare() { |
73 |
+ has_version '>=dev-lang/ocaml-4.03' && epatch "${FILESDIR}/oc43.patch" |
74 |
+} |
75 |
+ |
76 |
src_configure() { |
77 |
emake setup.exe |
78 |
OASIS_SETUP_COMMAND="./setup.exe" oasis_src_configure |