aboutsummaryrefslogtreecommitdiffstats
path: root/community/catch2/APKBUILD
blob: a4135251d7d414af6dc1c0263f56e96a9a940624 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=catch2
pkgver=2.11.1
pkgrel=1
arch="noarch"
url="https://github.com/catchorg/Catch2"
pkgdesc="A modern, C++-native, header-only, test framework for unit-tests"
license="BSL-1.0"
makedepends="cmake"
checkdepends="python3"
source="https://github.com/catchorg/Catch2/archive/v$pkgver/catch2-v$pkgver.tar.gz"
subpackages="$pkgname-doc"
builddir="$srcdir/Catch2-$pkgver"

prepare() {
	default_prepare

	mkdir "$builddir"/build
}

build() {
	cd "$builddir"/build
	cmake "$builddir" \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	make
}

check() {
	cd "$builddir"/build
	# ApprovalTests is broken
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest -E "ApprovalTests"
}

package() {
	cd "$builddir"/build
	DESTDIR="$pkgdir" make install
}

sha512sums="fe4474f7c40500bd91009cfc68a0ebb138d9c5f37d4184fed754a447983bc4716f11b3f9ae1a984d2b12d48e7909a5c20096be624b6eafcf60885fffc70051b0  catch2-v2.11.1.tar.gz"