diff options
author | Alexis Ballier <aballier@gentoo.org> | 2008-03-11 19:19:59 +0000 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2008-03-11 19:19:59 +0000 |
commit | 0b0c0baa29644611f3bfe6d98686b2264d4e5d5a (patch) | |
tree | f9a9f2cd61a53c0c15875207b9f016e6c1e3eada /dev-ml | |
parent | Initial import. Thanks Renato Caldas <seventhguardian@gmail.com> for his init... (diff) | |
download | gentoo-2-0b0c0baa29644611f3bfe6d98686b2264d4e5d5a.tar.gz gentoo-2-0b0c0baa29644611f3bfe6d98686b2264d4e5d5a.tar.bz2 gentoo-2-0b0c0baa29644611f3bfe6d98686b2264d4e5d5a.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
(Portage version: 2.1.4.4)
Diffstat (limited to 'dev-ml')
-rw-r--r-- | dev-ml/ocaml-expat/ChangeLog | 10 | ||||
-rw-r--r-- | dev-ml/ocaml-expat/files/ocaml-expat-0.9.1-test.patch | 35 | ||||
-rw-r--r-- | dev-ml/ocaml-expat/ocaml-expat-0.9.1.ebuild | 42 |
3 files changed, 78 insertions, 9 deletions
diff --git a/dev-ml/ocaml-expat/ChangeLog b/dev-ml/ocaml-expat/ChangeLog index 41497a8dc9fe..3071a2c797a9 100644 --- a/dev-ml/ocaml-expat/ChangeLog +++ b/dev-ml/ocaml-expat/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-ml/ocaml-expat -# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ml/ocaml-expat/ChangeLog,v 1.2 2007/02/07 19:02:15 nattfodd Exp $ +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ml/ocaml-expat/ChangeLog,v 1.3 2008/03/11 19:19:58 aballier Exp $ + + 11 Mar 2008; Alexis Ballier <aballier@gentoo.org> + +files/ocaml-expat-0.9.1-test.patch, ocaml-expat-0.9.1.ebuild: + 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 07 Feb 2007; Alexandre Buisse <nattfodd@gentoo.org> ocaml-expat-0.9.1.ebuild: diff --git a/dev-ml/ocaml-expat/files/ocaml-expat-0.9.1-test.patch b/dev-ml/ocaml-expat/files/ocaml-expat-0.9.1-test.patch new file mode 100644 index 000000000000..cbed5cbf2da0 --- /dev/null +++ b/dev-ml/ocaml-expat/files/ocaml-expat-0.9.1-test.patch @@ -0,0 +1,35 @@ +Index: ocaml-expat-0.9.1/Makefile +=================================================================== +--- ocaml-expat-0.9.1.orig/Makefile ++++ ocaml-expat-0.9.1/Makefile +@@ -67,7 +67,7 @@ doc: FORCE + testall: test testopt + .PHONY: test + test: unittest +- ./unittest ++ LD_LIBRARY_PATH=. ./unittest + .PHONY: testopt + testopt: unittest.opt + ./unittest.opt +Index: ocaml-expat-0.9.1/unittest.ml +=================================================================== +--- ocaml-expat-0.9.1.orig/unittest.ml ++++ ocaml-expat-0.9.1/unittest.ml +@@ -497,7 +497,7 @@ let suite = "expat" >::: + something obviously wrong. *) + loop do_stuff 10 + ); +- ++(* + "another garbage collection test" >:: + (fun _ -> + let parse _ = +@@ -530,7 +530,7 @@ let suite = "expat" >::: + close_in xml_spec + in + loop parse 10 +- ); ++ );*) + ];; + + let _ = 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 |