summaryrefslogtreecommitdiff
path: root/dev-ml
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2008-01-06 18:11:08 +0000
committerAlexis Ballier <aballier@gentoo.org>2008-01-06 18:11:08 +0000
commitadfb9df27faea1a37622a1f6665ec9e6eae0667f (patch)
tree9e5fef2ac29d3c5065a22b933dbda1e8c7bdf0c4 /dev-ml
parentStable for HPPA (if any, bug #202771). (diff)
downloadgentoo-2-adfb9df27faea1a37622a1f6665ec9e6eae0667f.tar.gz
gentoo-2-adfb9df27faea1a37622a1f6665ec9e6eae0667f.tar.bz2
gentoo-2-adfb9df27faea1a37622a1f6665ec9e6eae0667f.zip
allow to build without ocamlopt, dont install license
(Portage version: 2.1.4_rc14)
Diffstat (limited to 'dev-ml')
-rw-r--r--dev-ml/facile/ChangeLog7
-rw-r--r--dev-ml/facile/facile-1.1.ebuild34
2 files changed, 33 insertions, 8 deletions
diff --git a/dev-ml/facile/ChangeLog b/dev-ml/facile/ChangeLog
index 0023f0cf22fe..6893291f0d2b 100644
--- a/dev-ml/facile/ChangeLog
+++ b/dev-ml/facile/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for dev-ml/facile
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-ml/facile/ChangeLog,v 1.7 2007/10/23 21:17:52 jer Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-ml/facile/ChangeLog,v 1.8 2008/01/06 18:11:08 aballier Exp $
+
+ 06 Jan 2008; Alexis Ballier <aballier@gentoo.org> facile-1.1.ebuild:
+ allow to build without ocamlopt, dont install license
23 Oct 2007; Jeroen Roovers <jer@gentoo.org> facile-1.1.ebuild:
Marked ~hppa (bug #196551). Added src_test (because it works).
diff --git a/dev-ml/facile/facile-1.1.ebuild b/dev-ml/facile/facile-1.1.ebuild
index 15530f829859..e27341552e7e 100644
--- a/dev-ml/facile/facile-1.1.ebuild
+++ b/dev-ml/facile/facile-1.1.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/facile/facile-1.1.ebuild,v 1.7 2007/10/23 21:17:52 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-ml/facile/facile-1.1.ebuild,v 1.8 2008/01/06 18:11:08 aballier Exp $
inherit eutils
+EAPI="1"
+
DESCRIPTION="FaCiLe is a constraint programming library on integer and integer set finite domains written in OCaml."
HOMEPAGE="http://www.recherche.enac.fr/log/facile/"
SRC_URI="http://www.recherche.enac.fr/log/facile/distrib/${P}.tar.gz"
@@ -13,10 +15,20 @@ LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
-IUSE=""
+IUSE="+ocamlopt"
+
+RDEPEND=">=dev-lang/ocaml-3.09.3-r1"
+DEPEND="${RDEPEND}
+ sys-apps/sed"
-DEPEND=">=dev-lang/ocaml-3.09.3-r1"
-RDEPEND="${DEPEND}"
+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}
@@ -24,6 +36,16 @@ src_unpack() {
# Fix building on FreeBSD
epatch "${FILESDIR}/${P}"-make.patch
+ # Disable building native code objects if we dont have/want ocamlopt
+ if ! use ocamlopt; then
+ sed -i -e 's/\.opt//' src/Makefile || die "failed to change native code compiler to bytecode ones"
+ sed -i -e 's/ facile\.cmxa//' src/Makefile || die "failed to remove native code objects"
+ sed -i -e 's/\.opt/.out/g' \
+ -e 's: src/facile\.cmxa::'\
+ -e 's: src/facile\.a::'\
+ -e 's:^.*facile\.cmxa::'\
+ -e 's:^.*facile\.a::' Makefile || die "failed to remove native code objects"
+ fi
}
src_compile(){
@@ -39,5 +61,5 @@ src_test() {
src_install(){
dodir $(ocamlc -where)
emake install || die "Installation failed"
- dodoc LICENSE README || die "installing docs failed"
+ dodoc README || die "installing docs failed"
}