aboutsummaryrefslogtreecommitdiffstats
path: root/community/doctest/APKBUILD
blob: e4dcb65e038a363267add79873d6a7c1f13ad2c7 (plain) (blame)
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
# Contributor: Nick Black <dankamongmen@gmail.com>
# Maintainer: Nick Black <dankamongmen@gmail.com>
pkgname=doctest
pkgver=2.4.6
pkgrel=0
pkgdesc="Fast header-only C++ unit testing"
url="https://github.com/onqtam/doctest"
arch="noarch"
license="MIT"
subpackages="$pkgname-dev"
makedepends="cmake"
source="$pkgname-$pkgver.tar.gz::https://github.com/onqtam/doctest/archive/$pkgver.tar.gz"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B "$pkgname-$pkgver" \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		$CMAKE_CROSSOPTS
	cmake --build "$pkgname-$pkgver"
}

check() {
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest --build-run-dir "$pkgname-$pkgver"
}

package() {
	DESTDIR="$pkgdir" cmake --build "$pkgname-$pkgver" --target install
}

sha512sums="a5cccf085af946003140af688f071a6407d42fc685324a537e3b704ef9de0f2228bd06eabfd1df8da70dec001420dd0b2813e5e4320b5c1da450cb0aadd63788  doctest-2.4.6.tar.gz"