summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2008-06-24 09:02:56 +0000
committerAlexis Ballier <aballier@gentoo.org>2008-06-24 09:02:56 +0000
commite9c00eaa2ff4a4ac9891f0f7a2a45c6cac5af5e1 (patch)
tree69a1937d08fbe000c8064fabc78a6f5d64c6a85d /net-misc/unison/unison-2.13.16-r1.ebuild
parentadded missing dependencies to X11 libraries (diff)
downloadhistorical-e9c00eaa2ff4a4ac9891f0f7a2a45c6cac5af5e1.tar.gz
historical-e9c00eaa2ff4a4ac9891f0f7a2a45c6cac5af5e1.tar.bz2
historical-e9c00eaa2ff4a4ac9891f0f7a2a45c6cac5af5e1.zip
Add support for no-ocamlopt installs, bug #229129
Package-Manager: portage-2.2_rc1/cvs/Linux 2.6.25.7 x86_64
Diffstat (limited to 'net-misc/unison/unison-2.13.16-r1.ebuild')
-rw-r--r--net-misc/unison/unison-2.13.16-r1.ebuild16
1 files changed, 14 insertions, 2 deletions
diff --git a/net-misc/unison/unison-2.13.16-r1.ebuild b/net-misc/unison/unison-2.13.16-r1.ebuild
index d3c0973d15a9..ed95a8946a9f 100644
--- a/net-misc/unison/unison-2.13.16-r1.ebuild
+++ b/net-misc/unison/unison-2.13.16-r1.ebuild
@@ -1,12 +1,12 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/unison/unison-2.13.16-r1.ebuild,v 1.1 2008/06/16 20:20:07 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/unison/unison-2.13.16-r1.ebuild,v 1.2 2008/06/24 09:02:56 aballier Exp $
EAPI=1
inherit eutils versionator
-IUSE="gtk doc static debug threads"
+IUSE="gtk doc static debug threads +ocamlopt"
DESCRIPTION="Two-way cross-platform file synchronizer"
HOMEPAGE="http://www.cis.upenn.edu/~bcpierce/unison/"
@@ -28,6 +28,15 @@ SRC_URI="http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}.t
doc? ( http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}-manual.pdf
http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}-manual.html )"
+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 ${P}.tar.gz
@@ -58,6 +67,8 @@ src_compile() {
myconf="$myconf UISTYLE=text"
fi
+ use ocamlopt || myconf="$myconf NATIVE=false"
+
# Discard cflags as it will try to pass them to ocamlc...
emake -j1 $myconf CFLAGS="" || die "error making unsion"
}
@@ -73,6 +84,7 @@ src_install () {
dohtml "${DISTDIR}/${P}-manual.html" || die
dodoc "${DISTDIR}/${P}-manual.pdf" || die
fi
+ use ocamlopt || export STRIP_MASK="*/bin/*"
}
pkg_postinst() {