void-packages/srcpkgs/ninja/template

33 lines
1009 B
Bash
Raw Normal View History

2014-05-21 09:52:39 +02:00
# Template file for 'ninja'
pkgname=ninja
2015-07-14 20:50:25 +02:00
version=1.6.0
2014-05-21 09:52:39 +02:00
revision=1
2015-07-14 20:50:25 +02:00
hostmakedepends="python asciidoc"
2014-05-21 09:52:39 +02:00
short_desc="Small build system with a focus on speed"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
2014-05-21 09:52:39 +02:00
license="Apache-2.0"
homepage="http://martine.github.io/ninja/"
2015-07-14 20:50:25 +02:00
distfiles="https://github.com/martine/ninja/archive/v${version}.tar.gz"
checksum=b43e88fb068fe4d92a3dfd9eb4d19755dae5c33415db2e9b7b61b4659009cde7
2014-11-28 20:29:44 +01:00
do_configure() {
# Skip rebuild with bootstrapped ninja until build phase:
2015-07-14 20:50:25 +02:00
sed -e "s|subprocess.check_call('./ninja%s' % verbose, shell=True)|pass|" -i configure.py
2014-11-28 20:29:44 +01:00
python2 configure.py --bootstrap
}
2014-05-21 09:52:39 +02:00
do_build() {
if [ "$CROSS_BUILD" ]; then
2015-07-14 20:50:25 +02:00
HOST_CXXFLAGS="${BUILD_CFLAGS}"
2014-05-21 09:52:39 +02:00
else
HOST_CXXFLAGS="${CXXFLAGS}"
fi
2014-11-28 20:29:44 +01:00
CXXFLAGS="$HOST_CXXFLAGS" python2 configure.py
2014-05-21 09:52:39 +02:00
asciidoc doc/manual.asciidoc
}
do_install() {
2015-07-14 20:50:25 +02:00
vbin ninja
vdoc doc/manual.html
2014-05-21 09:52:39 +02:00
vinstall misc/bash-completion 644 usr/share/bash-completion/completions ninja
vinstall misc/zsh-completion 644 usr/share/zsh/site-functions _ninja
}