summaryrefslogtreecommitdiff
path: root/dev-ml
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2011-01-20 23:39:13 +0000
committerAlexis Ballier <aballier@gentoo.org>2011-01-20 23:39:13 +0000
commitdc1fd2ac5da721521304b4f832c6c4c3c6539278 (patch)
tree9670fd0ad4a10d9af0c4a47a54bd7b2922338f7c /dev-ml
parentFix build with boost-1.45. Bug #352123 (diff)
downloadgentoo-2-dc1fd2ac5da721521304b4f832c6c4c3c6539278.tar.gz
gentoo-2-dc1fd2ac5da721521304b4f832c6c4c3c6539278.tar.bz2
gentoo-2-dc1fd2ac5da721521304b4f832c6c4c3c6539278.zip
Fix pervasives conflict with ocaml 3.12
(Portage version: 2.2.0_alpha18/cvs/Linux x86_64)
Diffstat (limited to 'dev-ml')
-rw-r--r--dev-ml/obrowser/ChangeLog8
-rw-r--r--dev-ml/obrowser/files/obrowser-1.1-ocaml312.patch80
-rw-r--r--dev-ml/obrowser/obrowser-1.1.ebuild10
3 files changed, 93 insertions, 5 deletions
diff --git a/dev-ml/obrowser/ChangeLog b/dev-ml/obrowser/ChangeLog
index 86c5bdea0ae4..745da75f0a9c 100644
--- a/dev-ml/obrowser/ChangeLog
+++ b/dev-ml/obrowser/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-ml/obrowser
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ml/obrowser/ChangeLog,v 1.1 2010/11/07 19:22:39 aballier Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ml/obrowser/ChangeLog,v 1.2 2011/01/20 23:39:13 aballier Exp $
+
+ 20 Jan 2011; Alexis Ballier <aballier@gentoo.org> obrowser-1.1.ebuild,
+ +files/obrowser-1.1-ocaml312.patch:
+ Fix pervasives conflict with ocaml 3.12
*obrowser-1.1 (07 Nov 2010)
diff --git a/dev-ml/obrowser/files/obrowser-1.1-ocaml312.patch b/dev-ml/obrowser/files/obrowser-1.1-ocaml312.patch
new file mode 100644
index 000000000000..f4718d5b1525
--- /dev/null
+++ b/dev-ml/obrowser/files/obrowser-1.1-ocaml312.patch
@@ -0,0 +1,80 @@
+Sync the pervasives interface with ocaml 3.12.0
+
+--- obrowser-1.1.orig/rt/caml/pervasives.mli
++++ obrowser-1.1/rt/caml/pervasives.mli
+@@ -142,6 +145,11 @@ external ( or ) : bool -> bool -> bool =
+
+ external ( ~- ) : int -> int = "%negint"
+ (** Unary negation. You can also write [-e] instead of [~-e]. *)
++
++external ( ~+ ) : int -> int = "%identity"
++(** Unary addition. You can also write [+ e] instead of [~+ e].
++ @since 3.12.0
++*)
+
+ external succ : int -> int = "%succint"
+ (** [succ x] is [x+1]. *)
+@@ -230,6 +237,11 @@ external ( asr ) : int -> int -> int = "
+
+ external ( ~-. ) : float -> float = "%negfloat"
+ (** Unary negation. You can also write [-.e] instead of [~-.e]. *)
++
++external ( ~+. ) : float -> float = "%identity"
++(** Unary addition. You can also write [+. e] instead of [~+. e].
++ @since 3.12.0
++*)
+
+ external ( +. ) : float -> float -> float = "%addfloat"
+ (** Floating-point addition *)
+@@ -264,6 +276,18 @@ external log : float -> float = "caml_lo
+ external log10 : float -> float = "caml_log10_float" "log10" "float"
+ (** Base 10 logarithm. *)
+
++external expm1 : float -> float = "caml_expm1_float" "caml_expm1" "float"
++(** [expm1 x] computes [exp x -. 1.0], giving numerically-accurate results
++ even if [x] is close to [0.0].
++ @since 3.12.0
++*)
++
++external log1p : float -> float = "caml_log1p_float" "caml_log1p" "float"
++(** [log1p x] computes [log(1.0 +. x)] (natural logarithm),
++ giving numerically-accurate results even if [x] is close to [0.0].
++ @since 3.12.0
++*)
++
+ external cos : float -> float = "caml_cos_float" "cos" "float"
+ (** See {!Pervasives.atan2}. *)
+
+--- obrowser-1.1.orig/rt/caml/pervasives.ml
++++ obrowser-1.1/rt/caml/pervasives.ml
+@@ -51,6 +51,7 @@ external (||) : bool -> bool -> bool = "
+ (* Integer operations *)
+
+ external (~-) : int -> int = "%negint"
++external (~+) : int -> int = "%identity"
+ external succ : int -> int = "%succint"
+ external pred : int -> int = "%predint"
+ external (+) : int -> int -> int = "%addint"
+@@ -77,12 +78,14 @@ let max_int = min_int - 1
+ (* Floating-point operations *)
+
+ external (~-.) : float -> float = "%negfloat"
++external (~+.) : float -> float = "%identity"
+ external (+.) : float -> float -> float = "%addfloat"
+ external (-.) : float -> float -> float = "%subfloat"
+ external ( *. ) : float -> float -> float = "%mulfloat"
+ external (/.) : float -> float -> float = "%divfloat"
+ external ( ** ) : float -> float -> float = "caml_power_float" "pow" "float"
+ external exp : float -> float = "caml_exp_float" "exp" "float"
++external expm1 : float -> float = "caml_expm1_float" "caml_expm1" "float"
+ external acos : float -> float = "caml_acos_float" "acos" "float"
+ external asin : float -> float = "caml_asin_float" "asin" "float"
+ external atan : float -> float = "caml_atan_float" "atan" "float"
+@@ -91,6 +94,7 @@ external cos : float -> float = "caml_co
+ external cosh : float -> float = "caml_cosh_float" "cosh" "float"
+ external log : float -> float = "caml_log_float" "log" "float"
+ external log10 : float -> float = "caml_log10_float" "log10" "float"
++external log1p : float -> float = "caml_log1p_float" "caml_log1p" "float"
+ external sin : float -> float = "caml_sin_float" "sin" "float"
+ external sinh : float -> float = "caml_sinh_float" "sinh" "float"
+ external sqrt : float -> float = "caml_sqrt_float" "sqrt" "float"
diff --git a/dev-ml/obrowser/obrowser-1.1.ebuild b/dev-ml/obrowser/obrowser-1.1.ebuild
index 81c26c80e5a6..d7631edaa067 100644
--- a/dev-ml/obrowser/obrowser-1.1.ebuild
+++ b/dev-ml/obrowser/obrowser-1.1.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ml/obrowser/obrowser-1.1.ebuild,v 1.1 2010/11/07 19:22:39 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ml/obrowser/obrowser-1.1.ebuild,v 1.2 2011/01/20 23:39:13 aballier Exp $
EAPI=3
-inherit findlib
+inherit findlib eutils
DESCRIPTION="OCaml virtual machine written in Javascript, to run OCaml program in browsers"
HOMEPAGE="http://ocsigen.org/obrowser/"
@@ -21,6 +21,10 @@ DEPEND="${RDEPEND}
S=${WORKDIR}/${PN}
+src_prepare() {
+ has_version '>=dev-lang/ocaml-3.12' && epatch "${FILESDIR}/${P}-ocaml312.patch"
+}
+
src_compile() {
emake -j1 EXAMPLES_TARGETS="" || die
}