aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornick black <dankamongmen@gmail.com>2020-07-03 15:53:52 -0400
committerRasmus Thomsen <oss@cogitri.dev>2020-08-01 15:20:30 +0000
commit20896e65056a0705828172ef3d5f9bf132dc6cde (patch)
tree18fc02029fe58670df443cdd714cdde626f3b443
parentc9ecca0ae59f6e8733b112416386030aaf695bc8 (diff)
downloadaports-20896e65056a0705828172ef3d5f9bf132dc6cde.tar.gz
aports-20896e65056a0705828172ef3d5f9bf132dc6cde.tar.bz2
aports-20896e65056a0705828172ef3d5f9bf132dc6cde.tar.xz
testing/doctest: new aport
-rw-r--r--testing/doctest/APKBUILD35
1 files changed, 35 insertions, 0 deletions
diff --git a/testing/doctest/APKBUILD b/testing/doctest/APKBUILD
new file mode 100644
index 0000000000..2685c83285
--- /dev/null
+++ b/testing/doctest/APKBUILD
@@ -0,0 +1,35 @@
+# Contributor: Nick Black <dankamongmen@gmail.com>
+# Maintainer: Nick Black <dankamongmen@gmail.com>
+pkgname=doctest
+pkgver=2.4.0
+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="96e8a7ceafbe99fbc09e3b5617c799cf0ff28102b24392ec14b55cd525e9dd156a996e578168009a494a7deb64f640d19b79137e5c067d103dba23d7c3375400 doctest-2.4.0.tar.gz"