void-packages/srcpkgs/ninja/template
2016-04-28 19:03:20 +02:00

32 lines
988 B
Bash

# Template file for 'ninja'
pkgname=ninja
version=1.7.1
revision=1
hostmakedepends="python asciidoc"
short_desc="Small build system with a focus on speed"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="Apache-2.0"
homepage="http://martine.github.io/ninja/"
distfiles="https://github.com/martine/ninja/archive/v${version}.tar.gz"
checksum=51581de53cf4705b89eb6b14a85baa73288ad08bff256e7d30d529155813be19
do_configure() {
# Skip rebuild with bootstrapped ninja until build phase:
sed -e "s|subprocess.check_call(rebuild_args)|pass|" -i configure.py
python2 configure.py --bootstrap
}
do_build() {
if [ "$CROSS_BUILD" ]; then
HOST_CXXFLAGS="${BUILD_CFLAGS}"
else
HOST_CXXFLAGS="${CXXFLAGS}"
fi
CXXFLAGS="$HOST_CXXFLAGS" python2 configure.py
asciidoc doc/manual.asciidoc
}
do_install() {
vbin ninja
vdoc doc/manual.html
vinstall misc/bash-completion 644 usr/share/bash-completion/completions ninja
vinstall misc/zsh-completion 644 usr/share/zsh/site-functions _ninja
}