diff options
author | 2008-03-11 19:19:59 +0000 | |
---|---|---|
committer | 2008-03-11 19:19:59 +0000 | |
commit | 94d2b228e511f29d299e724a7aa5bbff4cca713d (patch) | |
tree | 99a584c575e884e41e3fa1fc73c1ad239fed2040 /dev-ml/ocaml-expat/ocaml-expat-0.9.1.ebuild | |
parent | Initial import. Thanks Renato Caldas <seventhguardian@gmail.com> for his init... (diff) | |
download | historical-94d2b228e511f29d299e724a7aa5bbff4cca713d.tar.gz historical-94d2b228e511f29d299e724a7aa5bbff4cca713d.tar.bz2 historical-94d2b228e511f29d299e724a7aa5bbff4cca713d.zip |
Disable broken test that needs a non existant file, add ounit dep for tests, bug #212961, test native code version too, allow to build without ocamlopt, keyword ~amd64
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'dev-ml/ocaml-expat/ocaml-expat-0.9.1.ebuild')
-rw-r--r-- | dev-ml/ocaml-expat/ocaml-expat-0.9.1.ebuild | 42 |
1 files changed, 35 insertions, 7 deletions
diff --git a/dev-ml/ocaml-expat/ocaml-expat-0.9.1.ebuild b/dev-ml/ocaml-expat/ocaml-expat-0.9.1.ebuild index 4bfa27cac070..d84f18af21cb 100644 --- a/dev-ml/ocaml-expat/ocaml-expat-0.9.1.ebuild +++ b/dev-ml/ocaml-expat/ocaml-expat-0.9.1.ebuild @@ -1,27 +1,55 @@ -# 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/ocaml-expat/ocaml-expat-0.9.1.ebuild,v 1.2 2007/02/07 19:02:15 nattfodd Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ml/ocaml-expat/ocaml-expat-0.9.1.ebuild,v 1.3 2008/03/11 19:19:58 aballier Exp $ + +EAPI="1" inherit findlib eutils -IUSE="doc" +IUSE="doc +ocamlopt test" DESCRIPTION="OCaml bindings for expat" SRC_URI="http://www.xs4all.nl/~mmzeeman/ocaml/${P}.tar.gz" HOMEPAGE="http://www.xs4all.nl/~mmzeeman/ocaml/" -DEPEND="dev-libs/expat" +RDEPEND="dev-libs/expat" -RDEPEND="$DEPEND" +DEPEND="${RDEPEND} + test? ( dev-ml/ounit )" SLOT="0" LICENSE="MIT" -KEYWORDS="~x86" +KEYWORDS="~amd64 ~x86" + +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}" + epatch "${FILESDIR}/${P}-test.patch" +} src_compile() { - emake depend all allopt || die "make failed" + emake depend || die "make depend failed" + emake all || die "make failed" + if use ocamlopt; then + emake allopt || die "failed to build native code programs" + fi } +src_test() { + emake test || die "bytecode tests failed" + if use ocamlopt; then + emake testopt || die "native code tests failed" + fi +} src_install() { findlib_src_preinst emake install || die |