commit:     daa9efa604c0705567df7740e6b2e2f2d77f7185
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 24 12:55:54 2025 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Sun Aug 24 12:55:54 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=daa9efa6

dev-ml/num: add 1.6

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

 dev-ml/num/Manifest       |  1 +
 dev-ml/num/num-1.6.ebuild | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+)

diff --git a/dev-ml/num/Manifest b/dev-ml/num/Manifest
index 53e2c0a6d76a..5b66a8797dcb 100644
--- a/dev-ml/num/Manifest
+++ b/dev-ml/num/Manifest
@@ -1 +1,2 @@
 DIST num-1.5.tar.gz 67633 BLAKE2B 
848dc8174bcdc5756ab036f9ec9cc9f6727d7d8e1079bd1c37611c7cc73939ce5cead4ba6acf4b6a1789640e824afc78faa43e24825e1f4cca37e3a76946e4f1
 SHA512 
110dd01140c1c96f5f067aa824bb63f74a26411dcaa65aaf04cb6c44b116ca02aaab9505f431c66964388ce4a31d86da5928b4c0e5557800e834de80bed46495
+DIST num-1.6.tar.gz 67748 BLAKE2B 
cd1a714c39971233c9fd085457fb4706874c75d2046d6225ea6b7bf192010ee95d31ddbb021ffe640c6e492bb426a8df1c41752ffa462faeb6518a53070230ec
 SHA512 
5cb32dfa9a9f0ad375bfd89079e9b1422979f3c089f61ef2300ad9cc64fb1fc25ed1f86b0267eb017f12ae41a574a959df5bfa39ab22c2be2f1ac84c3c671bdf

diff --git a/dev-ml/num/num-1.6.ebuild b/dev-ml/num/num-1.6.ebuild
new file mode 100644
index 000000000000..d3bacba07ea4
--- /dev/null
+++ b/dev-ml/num/num-1.6.ebuild
@@ -0,0 +1,46 @@
+# Copyright 2020-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Not using dune for now, bug #775119
+inherit findlib
+
+DESCRIPTION="Library for arbitrary-precision integer and rational arithmetic"
+HOMEPAGE="https://github.com/ocaml/num";
+SRC_URI="https://github.com/ocaml/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="LGPL-2.1-with-linking-exception"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux 
~ppc-macos"
+IUSE="+ocamlopt"
+
+src_compile() {
+       emake CFLAGS="${CFLAGS}" \
+               NATDYNLINK="$(usex ocamlopt true false)" \
+               NATIVE_COMPILER="$(usex ocamlopt true false)" \
+               -C src num_top.ml
+       emake CFLAGS="${CFLAGS}" \
+               NATDYNLINK="$(usex ocamlopt true false)" \
+               NATIVE_COMPILER="$(usex ocamlopt true false)"
+}
+
+src_test() {
+       # Override needed to not use dune
+       emake test
+}
+
+src_install() {
+       # OCaml generates textrels on 32-bit arches
+       if use arm || use ppc || use x86 ; then
+               export QA_TEXTRELS='.*'
+       fi
+       findlib_src_install \
+               NATDYNLINK="$(usex ocamlopt true false)" \
+               NATIVE_COMPILER="$(usex ocamlopt true false)"
+
+       if has_version ">=dev-ml/findlib-1.9" ; then
+               # See bug #803275
+               rm "${ED}/usr/$(get_libdir)/ocaml/num-top/META" || die
+       fi
+}

Reply via email to