aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan-Christofer Demay <jcdemay@gmail.com>2014-06-22 20:49:27 +0200
committerJonathan-Christofer Demay <jcdemay@gmail.com>2014-06-22 20:49:27 +0200
commit901dfcb7c29bb1b78e4667c7832411d8b12d0df5 (patch)
tree7f0248c2db218bf1ac232ba2fd75907492b72e3e /dev-ml/zarith/zarith-1.2.1.ebuild
parentmultiple version bumps (diff)
downloadsci-901dfcb7c29bb1b78e4667c7832411d8b12d0df5.tar.gz
sci-901dfcb7c29bb1b78e4667c7832411d8b12d0df5.tar.bz2
sci-901dfcb7c29bb1b78e4667c7832411d8b12d0df5.zip
zarith no longer asks ocamlc for libdir
Diffstat (limited to 'dev-ml/zarith/zarith-1.2.1.ebuild')
-rw-r--r--dev-ml/zarith/zarith-1.2.1.ebuild23
1 files changed, 14 insertions, 9 deletions
diff --git a/dev-ml/zarith/zarith-1.2.1.ebuild b/dev-ml/zarith/zarith-1.2.1.ebuild
index 2822592e2..90b518341 100644
--- a/dev-ml/zarith/zarith-1.2.1.ebuild
+++ b/dev-ml/zarith/zarith-1.2.1.ebuild
@@ -2,7 +2,9 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: $
-EAPI=4
+EAPI=5
+
+inherit eutils findlib multilib
DESCRIPTION="The Zarith library implements arithmetic and logical operations over arbitrary-precision integers"
HOMEPAGE="http://forge.ocamlcore.org/projects/zarith"
@@ -11,12 +13,11 @@ SRC_URI="http://forge.ocamlcore.org/frs/download.php/1199/${P}.tgz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="+ocamlopt"
-
-OCAMLDIR=`ocamlc -where`
+IUSE="+ocamlopt doc mpir"
DEPEND=">=dev-lang/ocaml-3.12.1[ocamlopt?]
- dev-libs/gmp"
+ !mpir? ( dev-libs/gmp )
+ mpir? ( sci-libs/mpir )"
RDEPEND="${DEPEND}"
src_prepare(){
@@ -24,17 +25,21 @@ src_prepare(){
}
src_configure(){
- ./configure -installdir "${D}${OCAMLDIR}" || die "configure failed"
+ MY_OPTS="-ocamllibdir /usr/$(get_libdir) -installdir ${D}/usr/$(get_libdir)/ocaml"
+ use mpir && MY_OPTS="${MY_OPTS} -mpir"
+ ./configure ${MY_OPTS}|| die || die "configure failed"
}
src_compile(){
emake || die "emake failed"
+ use doc && emake doc || die "emake doc failed"
}
src_install(){
- mkdir -p "${D}${OCAMLDIR}"
- cp "${OCAMLDIR}/ld.conf" "${D}${OCAMLDIR}/ld.conf"
+ findlib_src_preinst
+ cp /usr/$(get_libdir)/ocaml/ld.conf ${D}/usr/$(get_libdir)/ocaml/ld.conf
emake install || die "emake install failed"
- rm "${D}${OCAMLDIR}/ld.conf"
+ rm -f ${D}/usr/$(get_libdir)/ocaml/ld.conf
dodoc Changes README
+ use doc && dodoc -r html/
}