summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2013-08-19 16:19:50 +0000
committerAlexis Ballier <aballier@gentoo.org>2013-08-19 16:19:50 +0000
commita2a11d0f70ecd02e27e09fa1eacf6eb268b82c04 (patch)
tree0296bda9558e660a49fb0ae4d3d1cfbe9eeb429d /dev-ml/pomap
parentbump; Drop py3.1 support, update deps., re-add test phase which was seemingly... (diff)
downloadgentoo-2-a2a11d0f70ecd02e27e09fa1eacf6eb268b82c04.tar.gz
gentoo-2-a2a11d0f70ecd02e27e09fa1eacf6eb268b82c04.tar.bz2
gentoo-2-a2a11d0f70ecd02e27e09fa1eacf6eb268b82c04.zip
Fix build with ocaml 4.01.
(Portage version: 2.2.0/cvs/Linux x86_64, signed Manifest commit with key 160F534A)
Diffstat (limited to 'dev-ml/pomap')
-rw-r--r--dev-ml/pomap/ChangeLog6
-rw-r--r--dev-ml/pomap/files/pomap-3.0.1-ocaml-4.01.patch31
-rw-r--r--dev-ml/pomap/pomap-3.0.1.ebuild8
3 files changed, 42 insertions, 3 deletions
diff --git a/dev-ml/pomap/ChangeLog b/dev-ml/pomap/ChangeLog
index d45f2a5ac6d1..dc2f710b4ab1 100644
--- a/dev-ml/pomap/ChangeLog
+++ b/dev-ml/pomap/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-ml/pomap
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ml/pomap/ChangeLog,v 1.27 2013/03/10 10:27:23 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ml/pomap/ChangeLog,v 1.28 2013/08/19 16:19:50 aballier Exp $
+
+ 19 Aug 2013; Alexis Ballier <aballier@gentoo.org> pomap-3.0.1.ebuild,
+ +files/pomap-3.0.1-ocaml-4.01.patch:
+ Fix build with ocaml 4.01.
10 Mar 2013; Alexis Ballier <aballier@gentoo.org> -pomap-2.9.9.ebuild:
remove old
diff --git a/dev-ml/pomap/files/pomap-3.0.1-ocaml-4.01.patch b/dev-ml/pomap/files/pomap-3.0.1-ocaml-4.01.patch
new file mode 100644
index 000000000000..b0d7bfa42605
--- /dev/null
+++ b/dev-ml/pomap/files/pomap-3.0.1-ocaml-4.01.patch
@@ -0,0 +1,31 @@
+Dummy find implementation required by ocaml 4.01.
+
+https://bitbucket.org/mmottl/pomap/issue/1/pomap-301-does-not-build-with-ocaml-401
+
+
+Index: pomap-3.0.1/lib/ptset.ml
+===================================================================
+--- pomap-3.0.1.orig/lib/ptset.ml
++++ pomap-3.0.1/lib/ptset.ml
+@@ -336,6 +336,8 @@ let rec max_elt = function
+ | Leaf k -> k
+ | Branch (_,_,s,t) -> max (max_elt s) (max_elt t)
+
++let find e t = if exists (fun x -> (x = e)) t then e else raise Not_found
++
+ (*s Another nice property of Patricia trees is to be independent of the
+ order of insertion. As a consequence, two Patricia trees have the
+ same elements if and only if they are structurally equal. *)
+Index: pomap-3.0.1/lib/ptset.mli
+===================================================================
+--- pomap-3.0.1.orig/lib/ptset.mli
++++ pomap-3.0.1/lib/ptset.mli
+@@ -70,6 +70,8 @@ val partition : (elt -> bool) -> t -> t
+
+ val split : elt -> t -> t * bool * t
+
++val find : elt -> t -> elt
++
+ (*s Warning: [min_elt] and [max_elt] are linear w.r.t. the size of the
+ set. In other words, [min_elt t] is barely more efficient than [fold
+ min t (choose t)]. *)
diff --git a/dev-ml/pomap/pomap-3.0.1.ebuild b/dev-ml/pomap/pomap-3.0.1.ebuild
index b689a36741cc..748278f36141 100644
--- a/dev-ml/pomap/pomap-3.0.1.ebuild
+++ b/dev-ml/pomap/pomap-3.0.1.ebuild
@@ -1,12 +1,12 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ml/pomap/pomap-3.0.1.ebuild,v 1.5 2013/02/12 16:58:40 ago Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ml/pomap/pomap-3.0.1.ebuild,v 1.6 2013/08/19 16:19:50 aballier Exp $
EAPI=5
OASIS_BUILD_DOCS=1
-inherit oasis
+inherit eutils oasis
DESCRIPTION="Partially Ordered Map ADT for O'Caml"
HOMEPAGE="http://bitbucket.org/mmottl/pomap"
@@ -21,6 +21,10 @@ IUSE="examples"
DOCS=( "AUTHORS.txt" "CHANGES.txt" "README.md" )
+src_prepare() {
+ has_version '>=dev-lang/ocaml-4.01_beta' && epatch "${FILESDIR}/${P}-ocaml-4.01.patch"
+}
+
src_install() {
oasis_src_install
if use examples ; then