summaryrefslogtreecommitdiff
path: root/dev-ml/zarith/zarith-1.7.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-17 17:51:45 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-17 17:51:45 +0100
commit420eeee727d39d869d864caddb04a80dafda7160 (patch)
tree87f15d7467082dd92fce78a6cc2f56fa8d0774af /dev-ml/zarith/zarith-1.7.ebuild
parent0fdd4074ff3dc0c507a9867380a4f91250a0b610 (diff)
gentoo resync : 17.10.2017
Diffstat (limited to 'dev-ml/zarith/zarith-1.7.ebuild')
-rw-r--r--dev-ml/zarith/zarith-1.7.ebuild52
1 files changed, 52 insertions, 0 deletions
diff --git a/dev-ml/zarith/zarith-1.7.ebuild b/dev-ml/zarith/zarith-1.7.ebuild
new file mode 100644
index 000000000000..857c5026e9d6
--- /dev/null
+++ b/dev-ml/zarith/zarith-1.7.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit findlib eutils toolchain-funcs
+
+DESCRIPTION="Arithmetic and logic operations over arbitrary-precision integers"
+HOMEPAGE="https://github.com/ocaml/Zarith"
+SRC_URI="https://github.com/ocaml/Zarith/archive/release-${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1-with-linking-exception"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="doc mpir +ocamlopt"
+
+RDEPEND="
+ >=dev-lang/ocaml-4:=[ocamlopt?]
+ !mpir? ( dev-libs/gmp:0= )
+ mpir? ( sci-libs/mpir )"
+
+DEPEND="${RDEPEND} dev-lang/perl"
+
+S="${WORKDIR}/Zarith-release-${PV}"
+
+src_configure() {
+ tc-export CC
+ ./configure -host "${CHOST}" \
+ -ocamllibdir "/usr/$(get_libdir)" \
+ -installdir "${ED}/usr/$(get_libdir)/ocaml" \
+ $(usex mpir "-mpir" "-gmp") || die
+}
+
+src_compile() {
+ emake HASOCAMLOPT=$(usex ocamlopt yes no) HASDYNLINK=$(usex ocamlopt yes no) all
+ use doc && emake doc
+}
+
+src_test() {
+ if use ocamlopt ; then
+ emake HASOCAMLOPT=$(usex ocamlopt yes no) HASDYNLINK=$(usex ocamlopt yes no) tests
+ else
+ ewarn "Tests require USE=ocamlopt. Skipping them."
+ fi
+}
+
+src_install() {
+ findlib_src_preinst
+ emake HASOCAMLOPT=$(usex ocamlopt yes no) HASDYNLINK=$(usex ocamlopt yes no) install
+ dodoc Changes README.md
+ use doc && dohtml html/*
+}