summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-ml/obrowser/ChangeLog6
-rw-r--r--dev-ml/obrowser/files/obrowser-1.1.1-ocaml4.patch61
-rw-r--r--dev-ml/obrowser/obrowser-1.1.1.ebuild8
3 files changed, 72 insertions, 3 deletions
diff --git a/dev-ml/obrowser/ChangeLog b/dev-ml/obrowser/ChangeLog
index 953463420f7e..c40d7464cee6 100644
--- a/dev-ml/obrowser/ChangeLog
+++ b/dev-ml/obrowser/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-ml/obrowser
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ml/obrowser/ChangeLog,v 1.7 2012/05/04 12:29:20 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ml/obrowser/ChangeLog,v 1.8 2012/10/10 12:43:55 aballier Exp $
+
+ 10 Oct 2012; Alexis Ballier <aballier@gentoo.org> obrowser-1.1.1.ebuild,
+ +files/obrowser-1.1.1-ocaml4.patch:
+ fix build with ocaml-4
04 May 2012; Alexis Ballier <aballier@gentoo.org> obrowser-1.1.1.ebuild:
depend on lwt, by Sergey Kishchenko in bug #413885
diff --git a/dev-ml/obrowser/files/obrowser-1.1.1-ocaml4.patch b/dev-ml/obrowser/files/obrowser-1.1.1-ocaml4.patch
new file mode 100644
index 000000000000..634255247a57
--- /dev/null
+++ b/dev-ml/obrowser/files/obrowser-1.1.1-ocaml4.patch
@@ -0,0 +1,61 @@
+Index: obrowser-1.1.1/rt/caml/pervasives.ml
+===================================================================
+--- obrowser-1.1.1.orig/rt/caml/pervasives.ml
++++ obrowser-1.1.1/rt/caml/pervasives.ml
+@@ -91,6 +90,8 @@ external acos : float -> float = "caml_a
+ external asin : float -> float = "caml_asin_float" "asin" "float"
+ external atan : float -> float = "caml_atan_float" "atan" "float"
+ external atan2 : float -> float -> float = "caml_atan2_float" "atan2" "float"
++external hypot : float -> float -> float
++ = "caml_hypot_float" "caml_hypot" "float"
+ external cos : float -> float = "caml_cos_float" "cos" "float"
+ external cosh : float -> float = "caml_cosh_float" "cosh" "float"
+ external log : float -> float = "caml_log_float" "log" "float"
+@@ -104,6 +105,8 @@ external tanh : float -> float = "caml_t
+ external ceil : float -> float = "caml_ceil_float" "ceil" "float"
+ external floor : float -> float = "caml_floor_float" "floor" "float"
+ external abs_float : float -> float = "%absfloat"
++external copysign : float -> float -> float
++ = "caml_copysign_float" "caml_copysign" "float"
+ external mod_float : float -> float -> float = "caml_fmod_float" "fmod" "float"
+ external frexp : float -> float * int = "caml_frexp_float"
+ external ldexp : float -> int -> float = "caml_ldexp_float"
+Index: obrowser-1.1.1/rt/caml/pervasives.mli
+===================================================================
+--- obrowser-1.1.1.orig/rt/caml/pervasives.mli
++++ obrowser-1.1.1/rt/caml/pervasives.mli
+@@ -310,10 +310,18 @@ external atan : float -> float = "caml_a
+ Result is in radians and is between [-pi/2] and [pi/2]. *)
+
+ external atan2 : float -> float -> float = "caml_atan2_float" "atan2" "float"
+-(** [atan x y] returns the arc tangent of [y /. x]. The signs of [x]
++(** [atan2 y x] returns the arc tangent of [y /. x]. The signs of [x]
+ and [y] are used to determine the quadrant of the result.
+ Result is in radians and is between [-pi] and [pi]. *)
+
++external hypot : float -> float -> float
++ = "caml_hypot_float" "caml_hypot" "float"
++(** [hypot x y] returns [sqrt(x *. x + y *. y)], that is, the length
++ of the hypotenuse of a right-angled triangle with sides of length
++ [x] and [y], or, equivalently, the distance of the point [(x,y)]
++ to origin.
++ @since 4.00.0 *)
++
+ external cosh : float -> float = "caml_cosh_float" "cosh" "float"
+ (** Hyperbolic cosine. Argument is in radians. *)
+
+@@ -337,6 +345,14 @@ external floor : float -> float = "caml_
+ external abs_float : float -> float = "%absfloat"
+ (** [abs_float f] returns the absolute value of [f]. *)
+
++external copysign : float -> float -> float
++ = "caml_copysign_float" "caml_copysign" "float"
++(** [copysign x y] returns a float whose absolute value is that of [x]
++ and whose sign is that of [y]. If [x] is [nan], returns [nan].
++ If [y] is [nan], returns either [x] or [-. x], but it is not
++ specified which.
++ @since 4.00.0 *)
++
+ external mod_float : float -> float -> float = "caml_fmod_float" "fmod" "float"
+ (** [mod_float a b] returns the remainder of [a] with respect to
+ [b]. The returned value is [a -. n *. b], where [n]
diff --git a/dev-ml/obrowser/obrowser-1.1.1.ebuild b/dev-ml/obrowser/obrowser-1.1.1.ebuild
index cba4b7666409..df5243e4339f 100644
--- a/dev-ml/obrowser/obrowser-1.1.1.ebuild
+++ b/dev-ml/obrowser/obrowser-1.1.1.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ml/obrowser/obrowser-1.1.1.ebuild,v 1.3 2012/05/04 12:29:20 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ml/obrowser/obrowser-1.1.1.ebuild,v 1.4 2012/10/10 12:43:55 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/"
@@ -20,6 +20,10 @@ RDEPEND=">=dev-lang/ocaml-3.12.0
DEPEND="${RDEPEND}
app-arch/sharutils"
+src_prepare() {
+ has_version '>=dev-lang/ocaml-4' && epatch "${FILESDIR}/${P}-ocaml4.patch"
+}
+
src_compile() {
touch .check_version
emake -j1 EXAMPLES_TARGETS="" || die