aboutsummaryrefslogtreecommitdiffstats
path: root/community/doctest/APKBUILD
blob: 9b3cb894695af220f6ff85b4c66284d2f61fc762 (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
36
37
38
39
# Contributor: Nick Black <dankamongmen@gmail.com>
# Maintainer: Nick Black <dankamongmen@gmail.com>
pkgname=doctest
pkgver=2.4.6
pkgrel=1
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
	fix-warning.patch"

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
653813bdd2766a50f89a3a1cdc9f703c749220f9091f269e3197a9a47abce7fa8adb7de8acaa1add49c113a5461fc9bb327e6b0b537eac528f52507b91b24d7e  fix-warning.patch
"