ayaports/backports/catch2-3/APKBUILD

39 lines
998 B
Text

# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: psykose <alice@ayaya.dev>
pkgname=catch2-3
pkgver=3.3.2
pkgrel=0
arch="all"
url="https://github.com/catchorg/Catch2"
pkgdesc="A modern, C++-native, header-only, test framework for unit-tests (v3)"
license="BSL-1.0"
makedepends="
cmake
python3
samurai
"
source="https://github.com/catchorg/Catch2/archive/v$pkgver/catch2-v$pkgver.tar.gz"
subpackages="$pkgname-doc"
builddir="$srcdir/Catch2-$pkgver"
build() {
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib
cmake --build build
}
check() {
cd build
# ApprovalTests is broken https://github.com/catchorg/Catch2/issues/1780
CTEST_OUTPUT_ON_FAILURE=TRUE ctest -E "ApprovalTests"
}
package() {
DESTDIR="$pkgdir" cmake --install build
}
sha512sums="
3d0c5666509a19be54ea0c48a3c8e1c4a951a2d991a7c9f7fe6d326661464538f1ab9dc573b1b2647f49fb6bef45bbd866142a4ce0fba38545ad182b8d55f61f catch2-v3.3.2.tar.gz
"