diff options
author | Alexis Ballier <aballier@gentoo.org> | 2017-07-14 00:39:19 +0200 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2017-07-14 01:24:40 +0200 |
commit | fec5a15d92a88b7a3143c0f9c43355ff9aa4fb34 (patch) | |
tree | ca1291b56a475d5ba76a83efb2b3a728ff0820e2 /dev-ml | |
parent | kde-apps/ksudoku: Drop 17.04.3 (r0) (diff) | |
download | gentoo-fec5a15d92a88b7a3143c0f9c43355ff9aa4fb34.tar.gz gentoo-fec5a15d92a88b7a3143c0f9c43355ff9aa4fb34.tar.bz2 gentoo-fec5a15d92a88b7a3143c0f9c43355ff9aa4fb34.zip |
dev-ml/js_of_ocaml: fix build with ocaml 4.05
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'dev-ml')
-rw-r--r-- | dev-ml/js_of_ocaml/files/ocaml405.patch | 41 | ||||
-rw-r--r-- | dev-ml/js_of_ocaml/js_of_ocaml-2.8.4-r1.ebuild | 1 |
2 files changed, 42 insertions, 0 deletions
diff --git a/dev-ml/js_of_ocaml/files/ocaml405.patch b/dev-ml/js_of_ocaml/files/ocaml405.patch new file mode 100644 index 000000000000..552dff425c46 --- /dev/null +++ b/dev-ml/js_of_ocaml/files/ocaml405.patch @@ -0,0 +1,41 @@ +Index: js_of_ocaml-2.8.4/lib/ppx/ppx_js.ml +=================================================================== +--- js_of_ocaml-2.8.4.orig/lib/ppx/ppx_js.ml ++++ js_of_ocaml-2.8.4/lib/ppx/ppx_js.ml +@@ -162,7 +162,8 @@ let invoker ?(extra_types = []) uplift d + {[ fun (type res t0 t1 ..) arg1 arg2 -> e ]} + *) + let local_types = +- res :: List.map Arg.name (extra_types @ arguments) ++ List.map Location.mknoloc ++ (res :: List.map Arg.name (extra_types @ arguments)) + in + let result = List.fold_right Exp.newtype local_types invoker in + +@@ -210,7 +211,7 @@ let method_call ~loc obj meth args = + (Exp.fun_ ~loc ~attrs:[merlin_noloc] Label.nolabel None + (Pat.var ~loc ~attrs:[merlin_noloc] (Location.mknoloc "x")) + (Exp.send ~loc ~attrs:[merlin_noloc] +- (Exp.ident ~loc:gloc (lid ~loc:gloc "x")) meth))] ++ (Exp.ident ~loc:gloc (lid ~loc:gloc "x")) (Location.mknoloc meth)))] + ) + + (* {[ obj##.prop ]} generates +@@ -244,7 +245,7 @@ let prop_get ~loc:_ ~prop_loc obj prop = + (Exp.fun_ ~loc:gloc Label.nolabel None + (Pat.var ~loc:gloc ~attrs:[merlin_noloc] (Location.mknoloc "x")) + (Exp.send ~loc:prop_loc ~attrs:[merlin_noloc] +- (Exp.ident ~loc:gloc (lid ~loc:gloc "x")) prop)) ++ (Exp.ident ~loc:gloc (lid ~loc:gloc "x")) (Location.mknoloc prop))) + ] + ) + +@@ -289,7 +290,7 @@ let prop_set ~loc ~prop_loc obj prop val + (Exp.fun_ ~loc Label.nolabel None + (Pat.var ~loc:gloc ~attrs:[merlin_noloc] (Location.mknoloc "x")) + (Exp.send ~loc:prop_loc ~attrs:[merlin_noloc] +- (Exp.ident ~loc:gloc (lid ~loc:gloc "x")) prop)) ++ (Exp.ident ~loc:gloc (lid ~loc:gloc "x")) (Location.mknoloc prop))) + ] + ) + diff --git a/dev-ml/js_of_ocaml/js_of_ocaml-2.8.4-r1.ebuild b/dev-ml/js_of_ocaml/js_of_ocaml-2.8.4-r1.ebuild index 9331122157d4..cac8f1d0da5c 100644 --- a/dev-ml/js_of_ocaml/js_of_ocaml-2.8.4-r1.ebuild +++ b/dev-ml/js_of_ocaml/js_of_ocaml-2.8.4-r1.ebuild @@ -41,6 +41,7 @@ DEPEND="${RDEPEND}" src_prepare() { epatch "${FILESDIR}/ppx.patch" + has_version '>=dev-lang/ocaml-4.05_rc' && epatch "${FILESDIR}/ocaml405.patch" } src_configure() { |