diff options
author | Alexis Ballier <aballier@gentoo.org> | 2008-01-02 19:31:41 +0000 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2008-01-02 19:31:41 +0000 |
commit | 6539ce0f76f4838e8670758019f32f6a846a0075 (patch) | |
tree | 481c6a4cbd789e5cea33fbab945b63a58250fe6b /app-misc/ledit | |
parent | ledit ocamlopt useflag (diff) | |
download | gentoo-2-6539ce0f76f4838e8670758019f32f6a846a0075.tar.gz gentoo-2-6539ce0f76f4838e8670758019f32f6a846a0075.tar.bz2 gentoo-2-6539ce0f76f4838e8670758019f32f6a846a0075.zip |
Add support for disabling ocamlopt
(Portage version: 2.1.4_rc14)
Diffstat (limited to 'app-misc/ledit')
-rw-r--r-- | app-misc/ledit/ChangeLog | 7 | ||||
-rw-r--r-- | app-misc/ledit/ledit-1.15.ebuild | 31 |
2 files changed, 31 insertions, 7 deletions
diff --git a/app-misc/ledit/ChangeLog b/app-misc/ledit/ChangeLog index 41b8a1282c20..41ed54ade51a 100644 --- a/app-misc/ledit/ChangeLog +++ b/app-misc/ledit/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for app-misc/ledit -# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-misc/ledit/ChangeLog,v 1.15 2007/11/20 13:24:01 aballier Exp $ +# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-misc/ledit/ChangeLog,v 1.16 2008/01/02 19:31:41 aballier Exp $ + + 02 Jan 2008; Alexis Ballier <aballier@gentoo.org> ledit-1.15.ebuild: + Add support for disabling ocamlopt 20 Nov 2007; Alexis Ballier <aballier@gentoo.org> ledit-1.15.ebuild: take ocaml deps down to 3.09, works fine if camlp5 is installed diff --git a/app-misc/ledit/ledit-1.15.ebuild b/app-misc/ledit/ledit-1.15.ebuild index e733fe939bc6..69c4029005c7 100644 --- a/app-misc/ledit/ledit-1.15.ebuild +++ b/app-misc/ledit/ledit-1.15.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/app-misc/ledit/ledit-1.15.ebuild,v 1.3 2007/11/20 13:24:01 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-misc/ledit/ledit-1.15.ebuild,v 1.4 2008/01/02 19:31:41 aballier Exp $ inherit eutils -IUSE="" +EAPI="1" + +IUSE="+ocamlopt" DESCRIPTION="A line editor to be used with interactive commands." SRC_URI="http://pauillac.inria.fr/~ddr/ledit/${P}.tgz" @@ -17,15 +19,34 @@ SLOT="0" LICENSE="BSD" KEYWORDS="~amd64 ~ppc ~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_compile() { emake -j1 all || die "make failed" - emake -j1 ledit.opt || die "make failed" + if use ocamlopt; then + emake -j1 ledit.opt || die "make failed" + else + # If using bytecode we dont want to strip the binary as it would remove the + # bytecode and only leave ocamlrun... + export STRIP_MASK="*/bin/*" + fi } src_install() { - newbin ledit.opt ledit + if use ocamlopt; then + newbin ledit.opt ledit + else + newbin ledit.out ledit + fi doman ledit.1 dodoc CHANGES README } |