aboutsummaryrefslogtreecommitdiffstats
path: root/testing/rapidjson/APKBUILD
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-03-23 21:57:21 +0100
committerJakub Jirutka <jakub@jirutka.cz>2017-03-23 21:59:59 +0100
commit3326040744bfe4fced3a26b38663040316c4a74f (patch)
tree4325be6644d55cf40d85b68cd6f99f560a7cf3da /testing/rapidjson/APKBUILD
parent0adb5cd4c407e2984018e98010b5ec4e9c908ec5 (diff)
downloadaports-3326040744bfe4fced3a26b38663040316c4a74f.tar.gz
aports-3326040744bfe4fced3a26b38663040316c4a74f.tar.bz2
aports-3326040744bfe4fced3a26b38663040316c4a74f.tar.xz
testing/rapidjson: add check() function
Diffstat (limited to 'testing/rapidjson/APKBUILD')
-rw-r--r--testing/rapidjson/APKBUILD26
1 files changed, 19 insertions, 7 deletions
diff --git a/testing/rapidjson/APKBUILD b/testing/rapidjson/APKBUILD
index d2ba3e260b..bd9ae21099 100644
--- a/testing/rapidjson/APKBUILD
+++ b/testing/rapidjson/APKBUILD
@@ -3,35 +3,47 @@
# Note: This package contains only header files.
pkgname=rapidjson
pkgver=1.1.0
-pkgrel=0
+pkgrel=1
pkgdesc="A fast JSON parser/generator for C++ with both SAX/DOM style API"
url="http://rapidjson.org/"
arch="noarch"
license="MIT"
depends_dev="cmake"
makedepends="$depends_dev"
+checkdepends="gtest gtest-dev"
subpackages="$pkgname-dev"
-source="$pkgname-$pkgver.tar.gz::https://github.com/miloyip/$pkgname/archive/v$pkgver.tar.gz"
+source="$pkgname-$pkgver.tar.gz::https://github.com/miloyip/$pkgname/archive/v$pkgver.tar.gz
+ do-not-include-gtest-src-dir.patch"
builddir="$srcdir/$pkgname-$pkgver"
build() {
- cd "$builddir"
+ mkdir -p "$builddir"/build
+ cd "$builddir"/build
- cmake \
+ cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DRAPIDJSON_BUILD_DOC=OFF \
-DRAPIDJSON_BUILD_EXAMPLES=OFF \
+ -DGTESTSRC_FOUND=ON \
+ -DGTEST_SOURCE_DIR=. \
&& make
}
+check() {
+ cd "$builddir"/build
+
+ ctest -E '.*valgrind.*' -V .
+}
+
package() {
- cd "$builddir"
+ cd "$builddir"/build
make install DESTDIR="$pkgdir" || return 1
# Remove examples and readme.
- rm -Rf "$pkgdir"/usr/share
+ rm -r "$pkgdir"/usr/share
}
-sha512sums="2e82a4bddcd6c4669541f5945c2d240fb1b4fdd6e239200246d3dd50ce98733f0a4f6d3daa56f865d8c88779c036099c52a9ae85d47ad263686b68a88d832dff rapidjson-1.1.0.tar.gz"
+sha512sums="2e82a4bddcd6c4669541f5945c2d240fb1b4fdd6e239200246d3dd50ce98733f0a4f6d3daa56f865d8c88779c036099c52a9ae85d47ad263686b68a88d832dff rapidjson-1.1.0.tar.gz
+b6027268c3a10c602ab3df783790d3af537a9f23e74651bdd0a0dc6810144eeba37f15e12576f4b357e538c634e979b7c128e95294e60788f59d69ccb8367f6f do-not-include-gtest-src-dir.patch"