dev-ml/zarith: initial import, bug #388903
authorAlexis Ballier <aballier@gentoo.org>
Sat, 19 Sep 2015 13:43:56 +0000 (15:43 +0200)
committerAlexis Ballier <aballier@gentoo.org>
Sat, 19 Sep 2015 14:03:09 +0000 (16:03 +0200)
Package-Manager: portage-2.2.20.1

dev-ml/zarith/Manifest [new file with mode: 0644]
dev-ml/zarith/metadata.xml [new file with mode: 0644]
dev-ml/zarith/zarith-1.3.ebuild [new file with mode: 0644]

diff --git a/dev-ml/zarith/Manifest b/dev-ml/zarith/Manifest
new file mode 100644 (file)
index 0000000..d2705de
--- /dev/null
@@ -0,0 +1 @@
+DIST zarith-1.3.tgz 69415 SHA256 946687d6f032b96ab9db9661d876e39437bff783e0ad473ac463c06259b7a3d7 SHA512 c8b0b32ae3cae2808d0af701fbf134fd8bf7b1b3042fbd562edf4a54f958386b4b425117838e60033f51ee0e4ea22969ddc7a8968ba979a4ad70c725cf4357d4 WHIRLPOOL 363e9f973a2e8ebc305c66e6d8dcb6f68bb5599dfce3da906fe013e2d7acfd80b17e886de60f393b72538488dcfdba33b0656f2fe6b19aeeec88d6c0ec3bf21b
diff --git a/dev-ml/zarith/metadata.xml b/dev-ml/zarith/metadata.xml
new file mode 100644 (file)
index 0000000..444c6eb
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+  <herd>ml</herd>
+  <use>
+         <flag name="mpir">Use MPIR library instead of GMP.</flag>
+  </use>
+</pkgmetadata>
diff --git a/dev-ml/zarith/zarith-1.3.ebuild b/dev-ml/zarith/zarith-1.3.ebuild
new file mode 100644 (file)
index 0000000..a035529
--- /dev/null
@@ -0,0 +1,46 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit findlib eutils
+
+DESCRIPTION="Arithmetic and logic operations over arbitrary-precision integers"
+HOMEPAGE="https://forge.ocamlcore.org/projects/zarith/"
+SRC_URI="https://forge.ocamlcore.org/frs/download.php/1471/${P}.tgz"
+
+LICENSE="LGPL-2.1-with-linking-exception"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc mpir +ocamlopt"
+
+RDEPEND="
+       >=dev-lang/ocaml-4:=[ocamlopt?]
+       !mpir? ( dev-libs/gmp:0= )
+       mpir? ( sci-libs/mpir )"
+
+DEPEND="${RDEPEND} dev-lang/perl"
+
+src_configure() {
+       ./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() {
+       emake HASOCAMLOPT=$(usex ocamlopt yes no) HASDYNLINK=$(usex ocamlopt yes no) tests
+}
+
+src_install() {
+       findlib_src_preinst
+       emake HASOCAMLOPT=$(usex ocamlopt yes no) HASDYNLINK=$(usex ocamlopt yes no) install
+       dodoc Changes README
+       use doc && dohtml html/*
+}