diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-09-22 17:17:39 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-09-22 17:17:39 +0100 |
commit | f66a06e8f9736ea679bc3e95d8c8e90ff7c3f466 (patch) | |
tree | 6e12e70b54f33f9219df2139130612649af4161d /dev-ml/zarith/zarith-1.13.ebuild | |
parent | 92a9a3adda432ad2b7af58e08f5493ed6dc81196 (diff) |
gentoo auto-resync : 22:09:2023 - 17:17:39
Diffstat (limited to 'dev-ml/zarith/zarith-1.13.ebuild')
-rw-r--r-- | dev-ml/zarith/zarith-1.13.ebuild | 61 |
1 files changed, 61 insertions, 0 deletions
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 +} |