summaryrefslogtreecommitdiff
path: root/dev-ml
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2016-05-03 19:20:53 +0200
committerAlexis Ballier <aballier@gentoo.org>2016-05-03 19:44:22 +0200
commite873d8de7f7e999e597ce5a35384185612a52f1c (patch)
treec64a6f2eb4c36cb30c0d42204d09f97aa1ba8e33 /dev-ml
parentdev-ml/ppx_fail: fix build with ocaml 4.03 (diff)
downloadgentoo-e873d8de7f7e999e597ce5a35384185612a52f1c.tar.gz
gentoo-e873d8de7f7e999e597ce5a35384185612a52f1c.tar.bz2
gentoo-e873d8de7f7e999e597ce5a35384185612a52f1c.zip
dev-ml/ppx_expect: 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_expect/files/oc43.patch49
-rw-r--r--dev-ml/ppx_expect/ppx_expect-113.33.01.ebuild4
2 files changed, 53 insertions, 0 deletions
diff --git a/dev-ml/ppx_expect/files/oc43.patch b/dev-ml/ppx_expect/files/oc43.patch
new file mode 100644
index 000000000000..3606d2963380
--- /dev/null
+++ b/dev-ml/ppx_expect/files/oc43.patch
@@ -0,0 +1,49 @@
+diff -uNr ppx_expect-113.33.01/expect_payload/ppx_expect_payload.ml ppx_expect-113.33.01+4.03/expect_payload/ppx_expect_payload.ml
+--- ppx_expect-113.33.01/expect_payload/ppx_expect_payload.ml 2016-03-22 17:09:17.000000000 +0100
++++ ppx_expect-113.33.01+4.03/expect_payload/ppx_expect_payload.ml 2016-04-06 12:35:50.000000000 +0200
+@@ -63,7 +63,7 @@
+
+ let pattern () =
+ Ast_pattern.(
+- map (single_expr_payload (pexp_loc __ (pexp_constant (const_string __ __))))
++ map (single_expr_payload (pexp_loc __ (pexp_constant (pconst_string __ __))))
+ ~f:(fun f loc s tag -> f (Some (loc, s, tag)))
+ |||
+ map (pstr nil)
+diff -uNr ppx_expect-113.33.01/_oasis ppx_expect-113.33.01+4.03/_oasis
+--- ppx_expect-113.33.01/_oasis 2016-03-22 17:09:17.000000000 +0100
++++ ppx_expect-113.33.01+4.03/_oasis 2016-04-06 12:35:50.000000000 +0200
+@@ -1,8 +1,8 @@
+ OASISFormat: 0.4
+-OCamlVersion: >= 4.02.3
++OCamlVersion: >= 4.03.0
+ FindlibVersion: >= 1.3.2
+ Name: ppx_expect
+-Version: 113.33.01
++Version: 113.33.01+4.03
+ Synopsis: Cram like framework for OCaml
+ Authors: Jane Street Group, LLC <opensource@janestreet.com>
+ Copyrights: (C) 2015-2016 Jane Street Group LLC <opensource@janestreet.com>
+diff -uNr ppx_expect-113.33.01/opam ppx_expect-113.33.01+4.03/opam
+--- ppx_expect-113.33.01/opam 2016-03-22 18:31:21.000000000 +0100
++++ ppx_expect-113.33.01+4.03/opam 2016-04-06 12:54:27.000000000 +0200
+@@ -27,4 +27,4 @@
+ "sexplib"
+ "variantslib"
+ ]
+-available: [ ocaml-version >= "4.02.3" ]
++available: [ ocaml-version >= "4.03.0" ]
+diff -uNr ppx_expect-113.33.01/src/expect_extension.ml ppx_expect-113.33.01+4.03/src/expect_extension.ml
+--- ppx_expect-113.33.01/src/expect_extension.ml 2016-03-22 17:09:17.000000000 +0100
++++ ppx_expect-113.33.01+4.03/src/expect_extension.ml 2016-04-06 12:35:50.000000000 +0200
+@@ -24,9 +24,8 @@
+ pstr ((
+ pstr_value nonrecursive (
+ value_binding
+- ~pat:(map (pstring __) ~f:(fun f x -> f (Some x)))
++ ~pat:(alt_option (pstring __) ppat_any)
+ ~expr ^:: nil)
+- ||| map (pstr_eval expr nil) ~f:(fun f -> f None)
+ ) ^:: nil)
+
+ let expect_test =
diff --git a/dev-ml/ppx_expect/ppx_expect-113.33.01.ebuild b/dev-ml/ppx_expect/ppx_expect-113.33.01.ebuild
index c605caa63581..4bb651b677f7 100644
--- a/dev-ml/ppx_expect/ppx_expect-113.33.01.ebuild
+++ b/dev-ml/ppx_expect/ppx_expect-113.33.01.ebuild
@@ -34,6 +34,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