summaryrefslogtreecommitdiff
path: root/dev-ml
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2016-05-03 19:22:29 +0200
committerAlexis Ballier <aballier@gentoo.org>2016-05-03 19:44:22 +0200
commit22b4d5b0c22cc0a4bc87165b21c3d158976cd677 (patch)
tree6c674e2642a57b2273a88d79f29de627af6ee2f4 /dev-ml
parentdev-ml/ppx_expect: fix build with ocaml 4.03 (diff)
downloadgentoo-22b4d5b0c22cc0a4bc87165b21c3d158976cd677.tar.gz
gentoo-22b4d5b0c22cc0a4bc87165b21c3d158976cd677.tar.bz2
gentoo-22b4d5b0c22cc0a4bc87165b21c3d158976cd677.zip
dev-ml/ppx_enumerate: fix build with ocaml 4.03
Package-Manager: portage-2.2.28 Signed-off-by: Alexis Ballier <aballier@gentoo.org>
Diffstat (limited to 'dev-ml')
-rw-r--r--dev-ml/ppx_enumerate/files/oc43.patch40
-rw-r--r--dev-ml/ppx_enumerate/ppx_enumerate-113.33.00.ebuild4
2 files changed, 44 insertions, 0 deletions
diff --git a/dev-ml/ppx_enumerate/files/oc43.patch b/dev-ml/ppx_enumerate/files/oc43.patch
new file mode 100644
index 000000000000..b04635f97909
--- /dev/null
+++ b/dev-ml/ppx_enumerate/files/oc43.patch
@@ -0,0 +1,40 @@
+diff -uNr ppx_enumerate-113.33.00/_oasis ppx_enumerate-113.33.00+4.03/_oasis
+--- ppx_enumerate-113.33.00/_oasis 2016-03-09 16:44:54.000000000 +0100
++++ ppx_enumerate-113.33.00+4.03/_oasis 2016-03-22 15:13:50.000000000 +0100
+@@ -1,8 +1,8 @@
+ OASISFormat: 0.4
+-OCamlVersion: >= 4.02.3
++OCamlVersion: >= 4.03.0
+ FindlibVersion: >= 1.3.2
+ Name: ppx_enumerate
+-Version: 113.33.00
++Version: 113.33.00+4.03
+ Synopsis: Generate a list containing all values of a finite type
+ Authors: Jane Street Group, LLC <opensource@janestreet.com>
+ Copyrights: (C) 2015-2016 Jane Street Group LLC <opensource@janestreet.com>
+diff -uNr ppx_enumerate-113.33.00/opam ppx_enumerate-113.33.00+4.03/opam
+--- ppx_enumerate-113.33.00/opam 2016-03-18 12:08:01.000000000 +0100
++++ ppx_enumerate-113.33.00+4.03/opam 2016-03-22 17:51:36.000000000 +0100
+@@ -16,4 +16,4 @@
+ "ppx_tools" {>= "0.99.3"}
+ "ppx_type_conv"
+ ]
+-available: [ ocaml-version >= "4.02.3" ]
++available: [ ocaml-version >= "4.03.0" ]
+diff -uNr ppx_enumerate-113.33.00/src/ppx_enumerate.ml ppx_enumerate-113.33.00+4.03/src/ppx_enumerate.ml
+--- ppx_enumerate-113.33.00/src/ppx_enumerate.ml 2016-03-09 16:44:54.000000000 +0100
++++ ppx_enumerate-113.33.00+4.03/src/ppx_enumerate.ml 2016-03-22 15:13:50.000000000 +0100
+@@ -226,10 +226,11 @@
+
+ and constructor_case loc cd =
+ match cd.pcd_args with
+- | [] -> [%expr [ [%e econstruct cd None ] ] ]
+- | tps ->
++ | Pcstr_tuple [] -> [%expr [ [%e econstruct cd None ] ] ]
++ | Pcstr_tuple tps ->
+ product loc tps (fun x ->
+ econstruct cd (Some (pexp_tuple ~loc x)))
++ | Pcstr_record _ -> failwith "Pcstr_record not supported"
+
+ and product loc tps f =
+ let all = List.map tps ~f:(fun tp -> enum ~main_type:tp tp) in
diff --git a/dev-ml/ppx_enumerate/ppx_enumerate-113.33.00.ebuild b/dev-ml/ppx_enumerate/ppx_enumerate-113.33.00.ebuild
index 1f0f3773c892..ac7565ec307f 100644
--- a/dev-ml/ppx_enumerate/ppx_enumerate-113.33.00.ebuild
+++ b/dev-ml/ppx_enumerate/ppx_enumerate-113.33.00.ebuild
@@ -22,6 +22,10 @@ DEPEND="dev-ml/ppx_tools:=
RDEPEND="${DEPEND}"
DEPEND="${DEPEND} dev-ml/opam"
+src_prepare() {
+ has_version '>=dev-lang/ocaml-4.03' && epatch "${FILESDIR}/oc43.patch"
+}
+
src_configure() {
emake setup.exe
OASIS_SETUP_COMMAND="./setup.exe" oasis_src_configure