55 lines
2.1 KiB
Plaintext
55 lines
2.1 KiB
Plaintext
/*
|
|
* gmp — GNU Multiple Precision Arithmetic Library.
|
|
*
|
|
* Foundation of the compiler chain: mpfr, mpc, and gcc all build against
|
|
* it. Build-time tools: m4 (processes the architecture asm files) and
|
|
* make.
|
|
*
|
|
* STATIC-ONLY: --disable-shared. kappa has no activation step yet (no
|
|
* ld.so.conf / rpath wiring), and the rebuild pipeline builds all packages
|
|
* before installing any — so a shared libgmp would be unfindable at runtime
|
|
* by dependents. Static keeps the whole bootstrap chain self-contained;
|
|
* revisit when kappa gains store activation.
|
|
*
|
|
* DEPENDENCY PATHS: kappa's scheduler builds dependencies into
|
|
* $KAPPA_ROOT/temp/<dep>/destdir/usr before starting dependents, and only
|
|
* installs everything into $KAPPA_ROOT/bin/<hash>/usr afterwards. The
|
|
* prepare phase resolves each dep from whichever location exists.
|
|
*/
|
|
package "gmp" {
|
|
const version = "6.3.0"
|
|
const source = "https://ftp.gnu.org/gnu/gmp/gmp-${version}.tar.gz"
|
|
sha256 = "e56fd59d76810932a0555aa15a14b61c16bed66110d3c75cc2ac49ddaa9ab24c"
|
|
license = "GPL-3.0-or-later"
|
|
|
|
provides = ["libgmp.a", "gmp"]
|
|
|
|
depends = [
|
|
{ name = "m4" },
|
|
{ name = "make" },
|
|
]
|
|
|
|
prepare {
|
|
curl -L -O ${source}
|
|
echo "e56fd59d76810932a0555aa15a14b61c16bed66110d3c75cc2ac49ddaa9ab24c gmp-${version}.tar.gz" | sha256sum -c -
|
|
tar xf gmp-${version}.tar.gz --strip-components=1
|
|
ROOT=$KAPPA_ROOT; [ -z $ROOT ] && ROOT=/usr/local/kappa; if [ -d $ROOT/temp/m4/destdir/usr/bin ]; then echo $ROOT/temp/m4/destdir/usr/bin; else echo $ROOT/bin/$(grep '^m4 ' $ROOT/db/installed | tail -1 | cut -d' ' -f3)/usr/bin; fi > m4.path
|
|
}
|
|
|
|
build {
|
|
PATH=$(cat m4.path):$PATH ./configure --prefix=${prefix} --disable-shared
|
|
PATH=$(cat m4.path):$PATH make -j${jobs}
|
|
}
|
|
|
|
check {
|
|
PATH=$(cat m4.path):$PATH make check
|
|
}
|
|
|
|
install {
|
|
PATH=$(cat m4.path):$PATH 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
|
|
}
|
|
}
|