summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2016-05-03 15:54:14 +0200
committerAlexis Ballier <aballier@gentoo.org>2016-05-03 16:17:38 +0200
commit411ae34eb1cccbca5fc1825c728c1e7d31115493 (patch)
tree0de3e823ab97795af4e4c72fffbe79c8be104a65 /dev-ml/ppx_inline_test
parentsys-apps/gentoo-functions: remove old version (diff)
downloadgentoo-411ae34eb1cccbca5fc1825c728c1e7d31115493.tar.gz
gentoo-411ae34eb1cccbca5fc1825c728c1e7d31115493.tar.bz2
gentoo-411ae34eb1cccbca5fc1825c728c1e7d31115493.zip
dev-ml/ppx_inline_test: 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/ppx_inline_test')
-rw-r--r--dev-ml/ppx_inline_test/files/oc43.patch59
-rw-r--r--dev-ml/ppx_inline_test/ppx_inline_test-113.33.00.ebuild6
2 files changed, 64 insertions, 1 deletions
diff --git a/dev-ml/ppx_inline_test/files/oc43.patch b/dev-ml/ppx_inline_test/files/oc43.patch
new file mode 100644
index 000000000000..b5fbe1178e95
--- /dev/null
+++ b/dev-ml/ppx_inline_test/files/oc43.patch
@@ -0,0 +1,59 @@
+diff -uNr ppx_inline_test-113.33.00/_oasis ppx_inline_test-113.33.00+4.03/_oasis
+--- ppx_inline_test-113.33.00/_oasis 2016-03-09 16:44:54.000000000 +0100
++++ ppx_inline_test-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_inline_test
+-Version: 113.33.00
++Version: 113.33.00+4.03
+ Synopsis: Syntax extension for writing in-line tests in ocaml code
+ Authors: Jane Street Group, LLC <opensource@janestreet.com>
+ Copyrights: (C) 2015-2016 Jane Street Group LLC <opensource@janestreet.com>
+diff -uNr ppx_inline_test-113.33.00/opam ppx_inline_test-113.33.00+4.03/opam
+--- ppx_inline_test-113.33.00/opam 2016-03-18 12:08:01.000000000 +0100
++++ ppx_inline_test-113.33.00+4.03/opam 2016-03-22 17:51:37.000000000 +0100
+@@ -16,4 +16,4 @@
+ "ppx_driver"
+ "ppx_tools" {>= "0.99.3"}
+ ]
+-available: [ ocaml-version >= "4.02.3" ]
++available: [ ocaml-version >= "4.03.0" ]
+diff -uNr ppx_inline_test-113.33.00/src/ppx_inline_test.ml ppx_inline_test-113.33.00+4.03/src/ppx_inline_test.ml
+--- ppx_inline_test-113.33.00/src/ppx_inline_test.ml 2016-03-09 16:44:54.000000000 +0100
++++ ppx_inline_test-113.33.00+4.03/src/ppx_inline_test.ml 2016-03-22 15:13:50.000000000 +0100
+@@ -96,18 +96,18 @@
+
+ let expand_test ~loc ~path:_ id e =
+ assert_enabled loc;
+- apply_to_descr "test" ~loc (Some e) id (pexp_fun ~loc "" None (punit ~loc) e)
++ apply_to_descr "test" ~loc (Some e) id (pexp_fun ~loc Nolabel None (punit ~loc) e)
+ ;;
+
+ let expand_test_unit ~loc ~path:_ id e =
+ assert_enabled loc;
+- apply_to_descr "test_unit" ~loc (Some e) id (pexp_fun ~loc "" None (punit ~loc) e)
++ apply_to_descr "test_unit" ~loc (Some e) id (pexp_fun ~loc Nolabel None (punit ~loc) e)
+ ;;
+
+ let expand_test_module ~loc ~path:_ id m =
+ assert_enabled loc;
+ apply_to_descr "test_module" ~loc ~inner_loc:m.pmod_loc None id
+- (pexp_fun ~loc "" None (punit ~loc)
++ (pexp_fun ~loc Nolabel None (punit ~loc)
+ (pexp_letmodule ~loc (Located.mk ~loc "M")
+ m
+ (eunit ~loc)))
+@@ -120,9 +120,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 test =
diff --git a/dev-ml/ppx_inline_test/ppx_inline_test-113.33.00.ebuild b/dev-ml/ppx_inline_test/ppx_inline_test-113.33.00.ebuild
index 65a421984f33..79eb843afe0b 100644
--- a/dev-ml/ppx_inline_test/ppx_inline_test-113.33.00.ebuild
+++ b/dev-ml/ppx_inline_test/ppx_inline_test-113.33.00.ebuild
@@ -4,7 +4,7 @@
EAPI="5"
-inherit oasis
+inherit oasis eutils
MY_P=${PN/-/_}-${PV}
DESCRIPTION="Syntax extension for writing in-line tests in ocaml code"
@@ -25,6 +25,10 @@ DEPEND="${DEPEND} dev-ml/opam"
S="${WORKDIR}/${MY_P}"
+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