# Maintainer: Simon Zeni pkgname=ninja-build pkgver=1.11.1 pkgrel=4 pkgdesc="a small build system with a focus on speed" url="https://ninja-build.org/" arch="all" license="Apache-2.0" install="$pkgname.post-install" makedepends=" cmake samurai " subpackages="ninja-is-really-ninja:reallyreally" source="$pkgname-$pkgver.tar.gz::https://github.com/ninja-build/ninja/archive/refs/tags/v$pkgver.tar.gz" builddir="$srcdir/ninja-$pkgver" build() { # this intentionally does not install to PATH, # because we only want to use samurai for aports, # and this would get a cmd: provider otherwise, as # well as as conflict with samurai. # add /usr/lib/ninja-build/bin to PATH or invoke it directly to use it. # or, add the compat subpackage here. CXXFLAGS="$CXXFLAGS -O2 -flto=auto -DNDEBUG" \ cmake -B build -G Ninja \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX=/usr/lib/ninja-build \ -DBUILD_TESTING="$(want_check && echo ON || echo OFF)" cmake --build build } check() { ./build/ninja_test } package() { DESTDIR="$pkgdir" cmake --install build } reallyreally() { depends="$pkgname=$pkgver-r$pkgrel !samurai" pkgdesc="compat symlink to make ninja really ninja" mkdir -p "$subpkgdir"/usr/bin ln -sfv ../lib/ninja-build/bin/ninja "$subpkgdir"/usr/bin/ninja } sha512sums=" 1bca38877c70ee6613f347ffccef5adc02ba0a3947c62ae004ea97f918442b5a3de92378e4f820ae2a7676bc7609d25fbc7d41f6cfb3a61e5e4b26ec3639e403 ninja-build-1.11.1.tar.gz "