From 94d2b228e511f29d299e724a7aa5bbff4cca713d Mon Sep 17 00:00:00 2001 From: Alexis Ballier Date: Tue, 11 Mar 2008 19:19:59 +0000 Subject: [PATCH] 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 --- dev-ml/ocaml-expat/ChangeLog | 10 ++++- dev-ml/ocaml-expat/Manifest | 15 ++++++- .../files/ocaml-expat-0.9.1-test.patch | 35 ++++++++++++++++ dev-ml/ocaml-expat/ocaml-expat-0.9.1.ebuild | 42 +++++++++++++++---- 4 files changed, 91 insertions(+), 11 deletions(-) create mode 100644 dev-ml/ocaml-expat/files/ocaml-expat-0.9.1-test.patch 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 + +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 ocaml-expat-0.9.1.ebuild: diff --git a/dev-ml/ocaml-expat/Manifest b/dev-ml/ocaml-expat/Manifest index ebb23cbbf7dc..f3a7f5b28206 100644 --- a/dev-ml/ocaml-expat/Manifest +++ b/dev-ml/ocaml-expat/Manifest @@ -1,4 +1,15 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +AUX ocaml-expat-0.9.1-test.patch 870 RMD160 1c4e82d0e55e9a5c9c956799b1e41154032bac8c SHA1 4bad9d8a2579f3e0d88e9a2eaaa2613ab5cac200 SHA256 f53c0612c19d8b101dacedb7f737d22d4ba17249c9cfeb95783248d75cd0f15a DIST ocaml-expat-0.9.1.tar.gz 25223 RMD160 be731eacff0a114d948cfaedfafe9b9fc6dc54e7 SHA1 c0a65558cf996ac727fe5c61224d3e19dfd7d02a SHA256 5fbe8c38f3ab45da5f850aae6b37183f4a8b79a63771a83d7e3d3109fc90c29a -EBUILD ocaml-expat-0.9.1.ebuild 683 RMD160 c23177bafe8b1b0669cf468870ebdf79999b0b0c SHA1 3dc2343b0e9054160ed1b592fd624a905ac98f21 SHA256 53b748de7ee58cd27be35841b80dffa55efdcf494682ce236f350262ac80dac9 -MISC ChangeLog 578 RMD160 6d4773cfb8f5747fc431a15ed9c2ec78da939a71 SHA1 07d822a63506d7f821df6e48b4f5a303fbc33c70 SHA256 0612c195560fbe1f3b35833eb97ae9254a5ade071b218f6a0751dd4ecc38f573 +EBUILD ocaml-expat-0.9.1.ebuild 1433 RMD160 6700a0660fa450e821150096d18ed8af353188bb SHA1 a169e97f943c014aa5dfd97f0026533cbd160faf SHA256 382c3d1c8d0b4dec02ba187b890131a2ed59fd4b2157169fb64c868d7823f48e +MISC ChangeLog 870 RMD160 e77c5f9f1ce81cd54d2c71cce8f17790530d2594 SHA1 3fe99bbbd5ec4f4182633a886c26aab90c8178e1 SHA256 4ab29c470d2a927041ddb013dd092f5e98205e1695ab21a93b9642d65d1ab677 MISC metadata.xml 157 RMD160 30153301a2a5cca5547a6e47941aae2895837613 SHA1 66e87d50f913856e703f3ee29841b03332af40db SHA256 d14b8b08774f2a40f42d70ff40b1b4f1c4725e7095d702143a32909553eac799 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.7 (GNU/Linux) + +iD8DBQFH1ttpvFcC4BYPU0oRAl5QAKC2yJybGEWyAc9L70QTiIoN1C6kOACdGfFb +54F+4f1k7anq1CNCsvH2kuM= +=fxp+ +-----END PGP SIGNATURE----- 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 -- 2.26.2