dev-ml/num: add 1.6

Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
This commit is contained in:
Alfredo Tupone
2025-08-24 14:55:54 +02:00
parent 783cfdbe0b
commit daa9efa604
2 changed files with 47 additions and 0 deletions

View File

@@ -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

46
dev-ml/num/num-1.6.ebuild Normal file
View File

@@ -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
}