summaryrefslogtreecommitdiff
path: root/dev-ml
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2008-01-03 23:43:12 +0000
committerAlexis Ballier <aballier@gentoo.org>2008-01-03 23:43:12 +0000
commitd3be0d5be490cf0a3d0dc09c9b64cd43fd30348b (patch)
treeb28d55e851528ff49081112039d44fcf22a3a7a8 /dev-ml
parentversion bump, ~amd64 (diff)
downloadgentoo-2-d3be0d5be490cf0a3d0dc09c9b64cd43fd30348b.tar.gz
gentoo-2-d3be0d5be490cf0a3d0dc09c9b64cd43fd30348b.tar.bz2
gentoo-2-d3be0d5be490cf0a3d0dc09c9b64cd43fd30348b.zip
allow building without ocamlopt
(Portage version: 2.1.4_rc14)
Diffstat (limited to 'dev-ml')
-rw-r--r--dev-ml/ocamlduce/ChangeLog7
-rw-r--r--dev-ml/ocamlduce/ocamlduce-3.10.0.ebuild28
2 files changed, 27 insertions, 8 deletions
diff --git a/dev-ml/ocamlduce/ChangeLog b/dev-ml/ocamlduce/ChangeLog
index 52f80a9fccdd..605bd688b3b0 100644
--- a/dev-ml/ocamlduce/ChangeLog
+++ b/dev-ml/ocamlduce/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for dev-ml/ocamlduce
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ml/ocamlduce/ChangeLog,v 1.4 2007/05/26 18:42:28 aballier Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ml/ocamlduce/ChangeLog,v 1.5 2008/01/03 23:43:12 aballier Exp $
+
+ 03 Jan 2008; Alexis Ballier <aballier@gentoo.org> ocamlduce-3.10.0.ebuild:
+ allow building without ocamlopt
*ocamlduce-3.10.0 (26 May 2007)
diff --git a/dev-ml/ocamlduce/ocamlduce-3.10.0.ebuild b/dev-ml/ocamlduce/ocamlduce-3.10.0.ebuild
index 8f24a9ee96a2..d568ec124377 100644
--- a/dev-ml/ocamlduce/ocamlduce-3.10.0.ebuild
+++ b/dev-ml/ocamlduce/ocamlduce-3.10.0.ebuild
@@ -1,9 +1,11 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ml/ocamlduce/ocamlduce-3.10.0.ebuild,v 1.1 2007/05/26 18:42:28 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ml/ocamlduce/ocamlduce-3.10.0.ebuild,v 1.2 2008/01/03 23:43:12 aballier Exp $
inherit eutils findlib
+EAPI="1"
+
MY_P="${P/_p/pl}"
DESCRIPTION="OCamlDuce is a merger between OCaml and CDuce"
HOMEPAGE="http://www.cduce.org/ocaml.html"
@@ -12,7 +14,7 @@ SRC_URI="http://gallium.inria.fr/~frisch/ocamlcduce/download/${MY_P}.tar.gz"
LICENSE="QPL-1.0 LGPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE=""
+IUSE="+ocamlopt"
DEPEND=">=dev-lang/ocaml-3.10.0
>=dev-ml/findlib-1.1.2"
@@ -21,11 +23,25 @@ RDEPEND="${DEPEND}"
S="${WORKDIR}/${MY_P}"
+pkg_setup() {
+ if use ocamlopt && ! built_with_use --missing true dev-lang/ocaml ocamlopt; then
+ eerror "In order to build ${PN} with native code support from ocaml"
+ eerror "You first need to have a native code ocaml compiler."
+ eerror "You need to install dev-lang/ocaml with ocamlopt useflag on."
+ die "Please install ocaml with ocamlopt useflag"
+ fi
+}
+
src_compile() {
- emake -j1 all opt || die "emake failed"
+ if use ocamlopt; then
+ emake -j1 all opt || die "emake failed"
+ else
+ emake CAMLC="ocamlc" CAMLDEP="ocamldep" -j1 all || die "emake failed"
+ fi
}
src_install() {
- mkdir -p "${D}/usr/bin"
- findlib_src_install BINDIR="${D}/usr/bin"
+ dodir /usr/bin
+ use ocamlopt && findlib_src_install BINDIR="${D}/usr/bin"
+ use ocamlopt || findlib_src_install BINDIR="${D}/usr/bin" CAMLC="ocamlc" CAMLDEP="ocamldep" OPT_VARIANTS=""
}