summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2008-01-02 19:56:51 +0000
committerAlexis Ballier <aballier@gentoo.org>2008-01-02 19:56:51 +0000
commit00a49f47d03bae215c05e197fa54c887ca1eeedd (patch)
tree6a8abb56538b9ff6279f05762a0f2e3ceb1dd8ce /dev-ml/camlzip
parentcamlzip ocamlopt useflag (diff)
downloadgentoo-2-00a49f47d03bae215c05e197fa54c887ca1eeedd.tar.gz
gentoo-2-00a49f47d03bae215c05e197fa54c887ca1eeedd.tar.bz2
gentoo-2-00a49f47d03bae215c05e197fa54c887ca1eeedd.zip
Add support to not build with ocamlopt
(Portage version: 2.1.4_rc14)
Diffstat (limited to 'dev-ml/camlzip')
-rw-r--r--dev-ml/camlzip/ChangeLog7
-rw-r--r--dev-ml/camlzip/camlzip-1.03-r1.ebuild21
2 files changed, 22 insertions, 6 deletions
diff --git a/dev-ml/camlzip/ChangeLog b/dev-ml/camlzip/ChangeLog
index 01ba13ae3f28..dccf1ca3883a 100644
--- a/dev-ml/camlzip/ChangeLog
+++ b/dev-ml/camlzip/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for dev-ml/camlzip
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ml/camlzip/ChangeLog,v 1.9 2007/11/10 14:35:46 aballier Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ml/camlzip/ChangeLog,v 1.10 2008/01/02 19:56:51 aballier Exp $
+
+ 02 Jan 2008; Alexis Ballier <aballier@gentoo.org> camlzip-1.03-r1.ebuild:
+ Add support to not build with ocamlopt
10 Nov 2007; Alexis Ballier <aballier@gentoo.org>
files/camlzip-1.03-Makefile-findlib.patch:
diff --git a/dev-ml/camlzip/camlzip-1.03-r1.ebuild b/dev-ml/camlzip/camlzip-1.03-r1.ebuild
index 645cebe040b6..c6623de3ea01 100644
--- a/dev-ml/camlzip/camlzip-1.03-r1.ebuild
+++ b/dev-ml/camlzip/camlzip-1.03-r1.ebuild
@@ -1,10 +1,12 @@
-# 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/camlzip/camlzip-1.03-r1.ebuild,v 1.1 2007/11/10 14:18:20 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ml/camlzip/camlzip-1.03-r1.ebuild,v 1.2 2008/01/02 19:56:51 aballier Exp $
inherit findlib eutils
-IUSE=""
+EAPI="1"
+
+IUSE="+ocamlopt"
DESCRIPTION="Compressed file access ML library (ZIP, GZIP and JAR)"
HOMEPAGE="http://cristal.inria.fr/~xleroy/software.html#camlzip"
@@ -17,6 +19,15 @@ KEYWORDS="~amd64 ~ppc ~x86"
DEPEND=">=dev-lang/ocaml-3.04 \
>=sys-libs/zlib-1.1.3"
+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_unpack() {
unpack ${A}
cd "${S}"
@@ -26,7 +37,9 @@ src_unpack() {
src_compile() {
emake all || die "Failed at compilation step !!!"
- emake allopt || die "Failed at ML compilation step !!!"
+ if use ocamlopt; then
+ emake allopt || die "Failed at ML compilation step !!!"
+ fi
}
src_install() {