2014-05-21 07:52:39 +00:00
|
|
|
# Template file for 'ninja'
|
|
|
|
pkgname=ninja
|
2014-11-28 19:29:44 +00:00
|
|
|
version=1.5.3
|
2014-05-21 07:52:39 +00:00
|
|
|
revision=1
|
2014-07-27 14:05:16 +00:00
|
|
|
hostmakedepends="python asciidoc git"
|
2014-05-21 07:52:39 +00:00
|
|
|
short_desc="Small build system with a focus on speed"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
|
|
license="Apache-2.0"
|
|
|
|
homepage="http://martine.github.io/ninja/"
|
|
|
|
|
|
|
|
do_fetch() {
|
|
|
|
git clone -b v${version} git://github.com/martine/ninja ${pkgname}-${version}
|
|
|
|
}
|
2014-11-28 19:29:44 +00:00
|
|
|
|
|
|
|
do_configure() {
|
|
|
|
# Skip rebuild with bootstrapped ninja until build phase:
|
|
|
|
sed -e "s|subprocess.check_call('./ninja', shell=True)|pass|" -i configure.py
|
|
|
|
python2 configure.py --bootstrap
|
|
|
|
}
|
|
|
|
|
2014-05-21 07:52:39 +00:00
|
|
|
do_build() {
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
HOST_CXXFLAGS="-O2 -fstack-protector-strong"
|
|
|
|
else
|
|
|
|
HOST_CXXFLAGS="${CXXFLAGS}"
|
|
|
|
fi
|
2014-11-28 19:29:44 +00:00
|
|
|
CXXFLAGS="$HOST_CXXFLAGS" python2 configure.py
|
2014-05-21 07:52:39 +00:00
|
|
|
asciidoc doc/manual.asciidoc
|
|
|
|
}
|
|
|
|
do_install() {
|
|
|
|
vinstall ninja 755 usr/bin
|
|
|
|
vinstall doc/manual.html 644 usr/share/doc/html/ninja
|
|
|
|
vinstall misc/bash-completion 644 usr/share/bash-completion/completions ninja
|
|
|
|
vinstall misc/zsh-completion 644 usr/share/zsh/site-functions _ninja
|
|
|
|
}
|