Files
2026-08-18 00:31:50 -04:00

47 lines
1.7 KiB
Plaintext

/*
* mpfr — GNU MPFR library (multiple-precision floating-point).
*
* Builds against gmp (static-only, see gmp.kap for the reasoning) and
* feeds gmp + mpfr into mpc and gcc. --with-gmp points at the resolved
* gmp install root from the prepare phase.
*/
package "mpfr" {
const version = "4.2.2"
const source = "https://ftp.gnu.org/gnu/mpfr/mpfr-${version}.tar.gz"
sha256 = "826cbb24610bd193f36fde172233fb8c009f3f5c2ad99f644d0dea2e16a20e42"
license = "LGPL-3.0-or-later"
provides = ["libmpfr.a", "mpfr"]
depends = [
{ name = "gmp" },
{ name = "make" },
]
prepare {
curl -L -O ${source}
echo "826cbb24610bd193f36fde172233fb8c009f3f5c2ad99f644d0dea2e16a20e42 mpfr-${version}.tar.gz" | sha256sum -c -
tar xf mpfr-${version}.tar.gz --strip-components=1
ROOT=$KAPPA_ROOT; [ -z $ROOT ] && ROOT=/usr/local/kappa; if [ -d $ROOT/temp/gmp/destdir/usr ]; then echo $ROOT/temp/gmp/destdir/usr; else echo $ROOT/bin/$(grep '^gmp ' $ROOT/db/installed | tail -1 | cut -d' ' -f3)/usr; fi > gmp.path
}
// NOTE: mpfr_get_str crashes (SIGSEGV in get_str_aux) on this glibc —
// confirmed identical on the host's system libmpfr, so it is an upstream
// bug, not this build. All arithmetic/set_str/get_d paths verify fine.
build {
./configure --prefix=${prefix} --with-gmp=$(cat gmp.path) --disable-shared
make -j${jobs}
}
check {
make check
}
install {
make DESTDIR=${destdir} install
// Strip libtool .la files: they record stale absolute paths (the
// rpath /usr/lib rewrite of uninstalled deps) that break dependents.
find ${destdir} -name '*.la' -delete
}
}