summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-03-03 14:22:17 +0000
committerSam James <sam@gentoo.org>2021-03-03 14:23:12 +0000
commit91b9c6d4bacb75bc1d68fb92e384252683e9e678 (patch)
tree8aa7a287e177a293cbbb9d93f5af0ab4a3076010 /dev-ml/zarith/zarith-1.12.ebuild
parentnet-misc/remmina: drop old (diff)
downloadgentoo-91b9c6d4bacb75bc1d68fb92e384252683e9e678.tar.gz
gentoo-91b9c6d4bacb75bc1d68fb92e384252683e9e678.tar.bz2
gentoo-91b9c6d4bacb75bc1d68fb92e384252683e9e678.zip
dev-ml/zarith: bump to 1.12
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-ml/zarith/zarith-1.12.ebuild')
-rw-r--r--dev-ml/zarith/zarith-1.12.ebuild57
1 files changed, 57 insertions, 0 deletions
diff --git a/dev-ml/zarith/zarith-1.12.ebuild b/dev-ml/zarith/zarith-1.12.ebuild
new file mode 100644
index 000000000000..baeb795af4c2
--- /dev/null
+++ b/dev-ml/zarith/zarith-1.12.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit findlib 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 ~arm ~arm64 ~ppc ~x86"
+IUSE="doc mpir +ocamlopt"
+RESTRICT="!ocamlopt? ( test )"
+
+RDEPEND="
+ >=dev-lang/ocaml-4.05:=[ocamlopt=]
+ !mpir? ( dev-libs/gmp:0= )
+ mpir? ( sci-libs/mpir:= )"
+
+DEPEND="${RDEPEND} dev-lang/perl"
+DOCS=( README.md Changes )
+
+S="${WORKDIR}/Zarith-release-${PV}"
+
+src_configure() {
+ tc-export CC AR
+ ./configure \
+ -ocamllibdir /usr/$(get_libdir)/ocaml \
+ -installdir "${ED}"/usr/$(get_libdir)/ocaml \
+ $(usex mpir "-mpir" "-gmp") || die
+}
+
+src_compile() {
+ emake -j 1 HASOCAMLOPT=$(usex ocamlopt yes no) HASDYNLINK=$(usex ocamlopt yes no) all
+ use doc && emake doc
+}
+
+src_test() {
+ emake HASOCAMLOPT=yes HASDYNLINK=yes tests
+}
+
+src_install() {
+ findlib_src_preinst
+
+ emake \
+ HASOCAMLOPT=$(usex ocamlopt yes no) \
+ HASDYNLINK=$(usex ocamlopt yes no) \
+ install
+
+ dosym zarith/libzarith.a /usr/$(get_libdir)/ocaml/libzarith.a
+
+ use doc && HTML_DOCS=( html/* )
+ einstalldocs
+}