void-packages/srcpkgs/ninja/template

44 lines
1.3 KiB
Bash

# Template file for 'ninja'
pkgname=ninja
version=1.11.1
revision=2
hostmakedepends="python3 asciidoc"
short_desc="Small build system with a focus on speed"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="Apache-2.0"
homepage="https://ninja-build.org/"
distfiles="https://github.com/ninja-build/ninja/archive/v${version}.tar.gz"
checksum=31747ae633213f1eda3842686f83c2aa1412e0f5691d1c14dbbcc67fe7400cea
do_configure() {
# Skip rebuild with bootstrapped ninja until build phase:
vsed -e "s|subprocess.check_call(rebuild_args)|pass|" -i configure.py
python3 configure.py --bootstrap
}
do_build() {
if [ "$CROSS_BUILD" ]; then
HOST_CXXFLAGS="${BUILD_CFLAGS}"
else
HOST_CXXFLAGS="${CXXFLAGS}"
fi
CXXFLAGS="$HOST_CXXFLAGS" python3 configure.py
asciidoc doc/manual.asciidoc
}
do_check() {
./ninja ninja_test &&
./ninja_test --gtest_filter=-SubprocessTest.SetWithLots
}
do_install() {
vbin ninja
vdoc doc/manual.html
vdoc doc/manual.asciidoc
vinstall misc/bash-completion 644 usr/share/bash-completion/completions ninja
vinstall misc/zsh-completion 644 usr/share/zsh/site-functions _ninja
vinstall misc/ninja-mode.el 644 usr/share/emacs/site-lisp
vinstall misc/ninja.vim 644 usr/share/vim/vimfiles/syntax
vinstall misc/ninja_syntax.py 644 "${py3_sitelib}"
}