# Maintainer: Francesco Colista pkgname=gtest pkgver=1.13.0 pkgrel=0 pkgdesc="Google Test - C++ testing utility based on the xUnit framework (like JUnit)" url="https://github.com/google/googletest" arch="all" license="BSD-3-Clause" depends_dev="$pkgname=$pkgver-r$pkgrel gmock=$pkgver-r$pkgrel" makedepends="$depends_dev cmake python3-dev samurai" subpackages="$pkgname-dev gmock" source="$pkgname-$pkgver.tar.gz::https://github.com/google/googletest/archive/refs/tags/v$pkgver.tar.gz" builddir="$srcdir/googletest-$pkgver" build() { cmake -B build -G Ninja \ -DCMAKE_BUILD_TYPE=MinSizeRel \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DBUILD_SHARED_LIBS=ON \ -DPYTHON_EXECUTABLE=python3 \ -Dgtest_build_tests=ON \ -DBUILD_GMOCK=ON cmake --build build } check() { # fails of x86 ctest --test-dir build -E "(googletest-port-test|googletest-printers-test)" } package() { DESTDIR="$pkgdir" cmake --build build --target install find "$pkgdir" -name '*.pump' -print -delete } gmock() { pkgdesc="Google Mock - A library for writing and using C++ mock classes" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libgmock*.so* "$subpkgdir"/usr/lib/ } sha512sums=" 70c0cfb1b4147bdecb467ecb22ae5b5529eec0abc085763213a796b7cdbd81d1761d12b342060539b936fa54f345d33f060601544874d6213fdde79111fa813e gtest-1.13.0.tar.gz "