userspace
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* ninja — the build system generator's engine.
|
||||
*
|
||||
* Built with its own bootstrap (python3 configure.py --bootstrap) — no
|
||||
* cmake needed. Requires a C++17 compiler on PATH (c++).
|
||||
*
|
||||
* Ninja's configure.py also needs python3: resolved from the store and
|
||||
* prepended to PATH (the store python may be the only one on barebones).
|
||||
*/
|
||||
package "ninja" {
|
||||
const version = "1.13.2"
|
||||
const source = "https://github.com/ninja-build/ninja/archive/refs/tags/v${version}.tar.gz"
|
||||
sha256 = "974d6b2f4eeefa25625d34da3cb36bdcebe7fbce40f4c16ac0835fd1c0cbae17"
|
||||
license = "Apache-2.0"
|
||||
|
||||
provides = ["ninja"]
|
||||
|
||||
depends = [
|
||||
{ name = "python" },
|
||||
]
|
||||
|
||||
prepare {
|
||||
curl -L -o ninja-${version}.tar.gz ${source}
|
||||
echo "974d6b2f4eeefa25625d34da3cb36bdcebe7fbce40f4c16ac0835fd1c0cbae17 ninja-${version}.tar.gz" | sha256sum -c -
|
||||
tar xf ninja-${version}.tar.gz --strip-components=1
|
||||
ROOT=$KAPPA_ROOT; [ -z $ROOT ] && ROOT=/usr/local/kappa; if [ -d $ROOT/temp/python/destdir/usr/bin ]; then echo $ROOT/temp/python/destdir/usr/bin; else echo $ROOT/bin/$(grep '^python ' $ROOT/db/installed | tail -1 | cut -d' ' -f3)/usr/bin; fi > py.path
|
||||
}
|
||||
|
||||
build {
|
||||
PATH=$(cat py.path):$PATH python3 configure.py --bootstrap
|
||||
}
|
||||
|
||||
install {
|
||||
mkdir -p ${destdir}/usr/bin
|
||||
cp ninja ${destdir}/usr/bin/ninja
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user