48 lines
1.3 KiB
Bash
48 lines
1.3 KiB
Bash
# Template file for 'ninja'
|
|
pkgname=ninja
|
|
version=1.12.1
|
|
revision=1
|
|
build_style=cmake
|
|
make_cmd=make
|
|
hostmakedepends="asciidoc"
|
|
checkdepends="gtest-devel"
|
|
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=821bdff48a3f683bc4bb3b6f0b5fe7b2d647cf65d52aeb63328c91a6c6df285a
|
|
|
|
export CMAKE_GENERATOR="Unix Makefiles"
|
|
|
|
if [ "$XBPS_WORDSIZE" = 32 ]; then
|
|
BUILD_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
|
|
BUILD_CXXFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
|
|
fi
|
|
|
|
if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
|
|
CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
|
|
CXXFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
|
|
fi
|
|
|
|
if [ "$XBPS_CHECK_PKGS" ]; then
|
|
configure_args+=" -DBUILD_TESTING=ON"
|
|
else
|
|
configure_args+=" -DBUILD_TESTING=OFF"
|
|
fi
|
|
|
|
|
|
post_build() {
|
|
asciidoc doc/manual.asciidoc
|
|
}
|
|
|
|
post_install() {
|
|
vdoc doc/manual.html
|
|
vdoc doc/manual.asciidoc
|
|
vcompletion misc/bash-completion bash ninja
|
|
vcompletion misc/zsh-completion zsh 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}"
|
|
}
|