commit:     f3fc9a9d1d2dfd56cdfa94c8d7c32f07181b5603
Author:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 22 12:47:08 2023 +0000
Commit:     Maciej Barć <xgqt <AT> gentoo <DOT> org>
CommitDate: Fri Sep 22 14:09:45 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3fc9a9d

dev-ml/zarith: bump to 1.13

Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org>

 dev-ml/zarith/Manifest           |  1 +
 dev-ml/zarith/zarith-1.13.ebuild | 61 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 62 insertions(+)

diff --git a/dev-ml/zarith/Manifest b/dev-ml/zarith/Manifest
index 3f61bef4a069..5e58ad423ebb 100644
--- a/dev-ml/zarith/Manifest
+++ b/dev-ml/zarith/Manifest
@@ -1 +1,2 @@
 DIST zarith-1.12.tar.gz 93695 BLAKE2B 
b9622e2f397887d08fb8a8520419cf459e99906c05a897af91258b17d92d3fbbd2314a0a4be8a56a07074dcb0a0d04c896b3b5e69526a6c81a8a07b657d1bfec
 SHA512 
8075573ae65579a2606b37dd1b213032a07d220d28c733f9288ae80d36f8a2cc4d91632806df2503c130ea9658dc207ee3a64347c21aa53969050a208f5b2bb4
+DIST zarith-1.13.tar.gz 85994 BLAKE2B 
a5860319e17f4e660f248f3e724076b578d27dc3a06e8b54d68bcd6ed021a0354ad714dfcb06329bb9c4a3eadc3d08fd84fd76ef5d1a8902a06a7506d77addde
 SHA512 
a562fa8bf4f5ef44f2af6b9a8f028182fd184c89f8c41455acdc02851cc0fc3124d3776c0de930e8d09cd5d6d88cc689f80f4b597068a0611131f45d057b101f

diff --git a/dev-ml/zarith/zarith-1.13.ebuild b/dev-ml/zarith/zarith-1.13.ebuild
new file mode 100644
index 000000000000..0ecf19d7d607
--- /dev/null
+++ b/dev-ml/zarith/zarith-1.13.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2023 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 \
+               $(usex mpir "-mpir" "-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