summaryrefslogtreecommitdiff
path: root/dev-ml
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2016-05-03 17:06:41 +0200
committerAlexis Ballier <aballier@gentoo.org>2016-05-03 19:44:22 +0200
commita0ca56728fff0d9013c13e4e86bcdf8f89b5c85d (patch)
tree9405a9014323f1a68b797df938c58965195e2ce3 /dev-ml
parentdev-ml/ppx_bin_prot: fix build with ocaml 4.03 (diff)
downloadgentoo-a0ca56728fff0d9013c13e4e86bcdf8f89b5c85d.tar.gz
gentoo-a0ca56728fff0d9013c13e4e86bcdf8f89b5c85d.tar.bz2
gentoo-a0ca56728fff0d9013c13e4e86bcdf8f89b5c85d.zip
dev-ml/ppx_typerep_conv: 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_typerep_conv/files/oc43.patch61
-rw-r--r--dev-ml/ppx_typerep_conv/ppx_typerep_conv-113.33.00.ebuild4
2 files changed, 65 insertions, 0 deletions
diff --git a/dev-ml/ppx_typerep_conv/files/oc43.patch b/dev-ml/ppx_typerep_conv/files/oc43.patch
new file mode 100644
index 000000000000..3f3a641df883
--- /dev/null
+++ b/dev-ml/ppx_typerep_conv/files/oc43.patch
@@ -0,0 +1,61 @@
+diff -uNr ppx_typerep_conv-113.33.00/_oasis ppx_typerep_conv-113.33.00+4.03/_oasis
+--- ppx_typerep_conv-113.33.00/_oasis 2016-03-09 16:44:55.000000000 +0100
++++ ppx_typerep_conv-113.33.00+4.03/_oasis 2016-03-22 15:13:51.000000000 +0100
+@@ -1,8 +1,8 @@
+ OASISFormat: 0.4
+-OCamlVersion: >= 4.02.3
++OCamlVersion: >= 4.03.0
+ FindlibVersion: >= 1.3.2
+ Name: ppx_typerep_conv
+-Version: 113.33.00
++Version: 113.33.00+4.03
+ Synopsis: Generation of runtime types from type declarations
+ Authors: Jane Street Group, LLC <opensource@janestreet.com>
+ Copyrights: (C) 2015-2016 Jane Street Group LLC <opensource@janestreet.com>
+diff -uNr ppx_typerep_conv-113.33.00/opam ppx_typerep_conv-113.33.00+4.03/opam
+--- ppx_typerep_conv-113.33.00/opam 2016-03-18 12:08:01.000000000 +0100
++++ ppx_typerep_conv-113.33.00+4.03/opam 2016-03-22 17:51:38.000000000 +0100
+@@ -17,4 +17,4 @@
+ "ppx_type_conv"
+ "typerep"
+ ]
+-available: [ ocaml-version >= "4.02.3" ]
++available: [ ocaml-version >= "4.03.0" ]
+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
+--- ppx_typerep_conv-113.33.00/src/ppx_typerep_conv.ml 2016-03-09 16:44:55.000000000 +0100
++++ ppx_typerep_conv-113.33.00+4.03/src/ppx_typerep_conv.ml 2016-03-22 15:13:51.000000000 +0100
+@@ -134,7 +134,7 @@
+ let label = cd.pcd_name.txt in
+ let loc = cd.pcd_loc in
+ match cd.pcd_args with
+- | [] ->
++ | Pcstr_tuple [] ->
+ { label;
+ ctyp = None;
+ poly = false;
+@@ -142,7 +142,7 @@
+ index;
+ arity_index = no_arg ();
+ }
+- | args ->
++ | Pcstr_tuple args ->
+ let arity = List.length args in
+ let ctyp = ptyp_tuple ~loc args in
+ { label;
+@@ -152,6 +152,7 @@
+ index;
+ arity_index = with_arg ();
+ }
++ | Pcstr_record _ -> failwith "Pcstr_record not supported"
+ in
+ List.mapi cds ~f:mapi
+ end
+@@ -263,7 +264,7 @@
+ [%stri let name = [%e estring ~loc full_type_name] ]
+ in
+ pmod_structure ~loc
+- [ pstr_type ~loc [td]
++ [ pstr_type ~loc Nonrecursive [td]
+ ; name_def
+ ]
+
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
index b6501cc92389..cbf58ecd5a8d 100644
--- 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
@@ -24,6 +24,10 @@ DEPEND="
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