commit:     ac1cc2e236cdae99f82232b00fafb0ae0b58ce91
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 15 13:42:36 2024 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Mon Jul 15 13:42:52 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac1cc2e2

dev-ml/zarith: add 1.14

Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 dev-ml/zarith/Manifest           |  1 +
 dev-ml/zarith/zarith-1.14.ebuild | 59 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+)

diff --git a/dev-ml/zarith/Manifest b/dev-ml/zarith/Manifest
index cfcf085547b5..023897c156f6 100644
--- a/dev-ml/zarith/Manifest
+++ b/dev-ml/zarith/Manifest
@@ -1 +1,2 @@
 DIST zarith-1.13.tar.gz 85994 BLAKE2B 
a5860319e17f4e660f248f3e724076b578d27dc3a06e8b54d68bcd6ed021a0354ad714dfcb06329bb9c4a3eadc3d08fd84fd76ef5d1a8902a06a7506d77addde
 SHA512 
a562fa8bf4f5ef44f2af6b9a8f028182fd184c89f8c41455acdc02851cc0fc3124d3776c0de930e8d09cd5d6d88cc689f80f4b597068a0611131f45d057b101f
+DIST zarith-1.14.tar.gz 91788 BLAKE2B 
e00b6ed0893a7a4b53c859edc02030336f1c35405202f87741d87288819bdb6562bb3728c6950074b625ad9e5a16cc4afd39c4e0e2486ba18f1a84e49339fdd3
 SHA512 
8a7f3e82dfa5699c8dda54dd5398c712f3ac4fe04f5208d43d8ba198fb8152de5f91cbb59c15c0a4ba010d4dfcc79f52e405bdd0abbf2798167e9e4216bcb3dd

diff --git a/dev-ml/zarith/zarith-1.14.ebuild b/dev-ml/zarith/zarith-1.14.ebuild
new file mode 100644
index 000000000000..7b1ddd25ed05
--- /dev/null
+++ b/dev-ml/zarith/zarith-1.14.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2024 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"
+
+S="${WORKDIR}/Zarith-release-${PV}"
+
+LICENSE="LGPL-2.1-with-linking-exception"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
+IUSE="doc +ocamlopt"
+RESTRICT="!ocamlopt? ( test )"
+
+RDEPEND="
+       >=dev-lang/ocaml-4.05:=[ocamlopt=]
+       dev-libs/gmp:0=
+"
+DEPEND="${RDEPEND} dev-lang/perl"
+
+DOCS=( README.md Changes )
+
+src_configure() {
+       tc-export CC AR
+       ./configure \
+               -ocamllibdir /usr/$(get_libdir)/ocaml -gmp || die
+       sed -i \
+               -e 's|$(INSTALLDIR)|$(DESTDIR)$(INSTALLDIR)|g' \
+               project.mak || 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) \
+               DESTDIR="${ED}" \
+               install
+
+       dosym zarith/libzarith.a /usr/$(get_libdir)/ocaml/libzarith.a
+
+       use doc && HTML_DOCS=( html/* )
+       einstalldocs
+}

Reply via email to