# Contributor: Sören Tempel # Maintainer: pkgname=bear pkgver=3.1.2 pkgrel=5 pkgdesc="Tool which generates a compilation database for clang tooling" url="https://github.com/rizsotto/Bear" # s390x: segfaults in check arch="all !s390x" license="GPL-3.0-or-later" makedepends=" abseil-cpp-dev c-ares-dev cmake fmt-dev grpc-dev gtest-dev nlohmann-json protobuf-dev re2-dev samurai spdlog-dev sqlite-dev " checkdepends="llvm-test-utils" subpackages="$pkgname-doc" source="https://github.com/rizsotto/Bear/archive/$pkgver/bear-$pkgver.tar.gz" builddir="$srcdir/Bear-$pkgver" # XXX: Tests fail when ccache is enabled. # armv7, armhf and aarch64 have some failing tests. case "$CARCH" in armhf|armv7|aarch64) options="!check" ;; esac prepare() { default_prepare case "$CARCH" in x86) rm -f test/cases/intercept/preload/signal_outside_build.sh ;; esac } build() { cmake -B build -G Ninja \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DBUILD_SHARED_LIBS=True \ -DCMAKE_INSTALL_LIBEXECDIR=libexec/bear \ -DCMAKE_BUILD_TYPE=MinSizeRel cmake --build build } check() { cd build ctest --verbose --output-on-failure } package() { DESTDIR="$pkgdir" cmake --install build } sha512sums=" 02701e8a53b9d776ca838248f5b5d149d7ded6e024ce65bd1ca3b440ab1bf95691dc3d36bb28f043ce24bc1da6e666fb022ff92fa9df7c3142451742de16ca3e bear-3.1.2.tar.gz "