Install this version:
emerge -a =dev-ml/num-1.6
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =dev-ml/num-1.6
Or alternatively:
emerge --autounmask-write -a =dev-ml/num-1.6
# 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"
IUSE="+ocamlopt"
PATCHES=(
"${FILESDIR}/num-1.6-META-directory.patch"
"${FILESDIR}/num-1.6-META.patch"
)
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
}
Manage flags for this package:
euse -i <flag> -p dev-ml/num |
euse -E <flag> -p dev-ml/num |
euse -D <flag> -p dev-ml/num
| Type | File | Size | Source URLs |
|---|---|---|---|
| DIST | num-1.6.tar.gz | 67748 bytes | https://github.com/ocaml/num/archive/v1.6.tar.gz |