summaryrefslogtreecommitdiff
path: root/dev-ml
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2017-03-27 14:54:36 +0200
committerAlexis Ballier <aballier@gentoo.org>2017-03-27 15:59:25 +0200
commit10e1908cf37a3df1d04856cc5b426ede061195f5 (patch)
treed9679462770d39f04844623a51b12aec44d97068 /dev-ml
parentdev-ml/camomile: Backport upstream patch to build with ocaml 4.05 (diff)
downloadgentoo-10e1908cf37a3df1d04856cc5b426ede061195f5.tar.gz
gentoo-10e1908cf37a3df1d04856cc5b426ede061195f5.tar.bz2
gentoo-10e1908cf37a3df1d04856cc5b426ede061195f5.zip
dev-ml/extlib: Fix build with ocaml 4.05
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'dev-ml')
-rw-r--r--dev-ml/extlib/extlib-1.7.1.ebuild4
-rw-r--r--dev-ml/extlib/files/ocaml405.patch35
2 files changed, 39 insertions, 0 deletions
diff --git a/dev-ml/extlib/extlib-1.7.1.ebuild b/dev-ml/extlib/extlib-1.7.1.ebuild
index 17444f6a3568..50788c3c0540 100644
--- a/dev-ml/extlib/extlib-1.7.1.ebuild
+++ b/dev-ml/extlib/extlib-1.7.1.ebuild
@@ -19,6 +19,10 @@ KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos"
IUSE="doc +ocamlopt"
S="${WORKDIR}/ocaml-${P}"
+src_prepare() {
+ epatch "${FILESDIR}/ocaml405.patch"
+}
+
src_compile() {
cd src
emake -j1 all
diff --git a/dev-ml/extlib/files/ocaml405.patch b/dev-ml/extlib/files/ocaml405.patch
new file mode 100644
index 000000000000..4e3b04a1c8e5
--- /dev/null
+++ b/dev-ml/extlib/files/ocaml405.patch
@@ -0,0 +1,35 @@
+Index: ocaml-extlib-1.7.1/src/configure.ml
+===================================================================
+--- ocaml-extlib-1.7.1.orig/src/configure.ml
++++ ocaml-extlib-1.7.1/src/configure.ml
+@@ -3,5 +3,6 @@ let () =
+ print_endline (if Sys.ocaml_version >= "4.02.0" then "-D OCAML4_02 " else "");
+ print_endline (if Sys.ocaml_version >= "4.03.0" then "-D OCAML4_03 " else "");
+ print_endline (if Sys.ocaml_version >= "4.04.0" then "-D OCAML4_04 " else "");
++ print_endline (if Sys.ocaml_version >= "4.05.0" then "-D OCAML4_05 " else "");
+ let (_:int) = Sys.command "ocamlfind query -format \"-D WITH_BYTES\" bytes" in ();
+ exit 0
+Index: ocaml-extlib-1.7.1/src/extHashtbl.mli
+===================================================================
+--- ocaml-extlib-1.7.1.orig/src/extHashtbl.mli
++++ ocaml-extlib-1.7.1/src/extHashtbl.mli
+@@ -132,6 +132,9 @@ module type S =
+ val add : 'a t -> key -> 'a -> unit
+ val remove : 'a t -> key -> unit
+ val find : 'a t -> key -> 'a
++#ifdef OCAML4_05
++ val find_opt: 'a t -> key -> 'a option
++#endif
+ val find_all : 'a t -> key -> 'a list
+ val replace : 'a t -> key -> 'a -> unit
+ val mem : 'a t -> key -> bool
+@@ -167,6 +170,9 @@ module type SeededS =
+ val add : 'a t -> key -> 'a -> unit
+ val remove : 'a t -> key -> unit
+ val find : 'a t -> key -> 'a
++#ifdef OCAML4_05
++ val find_opt : 'a t -> key -> 'a option
++#endif
+ val find_all : 'a t -> key -> 'a list
+ val replace : 'a t -> key -> 'a -> unit
+ val mem : 'a t -> key -> bool