aboutsummaryrefslogtreecommitdiffstats
path: root/community/rapidjson
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-03-30 01:52:51 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-03-30 01:52:51 +0200
commit9e5eefc7a5fcf5938a8dc8a3be8c75e9e6809909 (patch)
treef4d31c37dfbeaaf72cf9a389954034e8d56f21f3 /community/rapidjson
parent51f817f111d3f4bbcb03f8c1bed12c5b24c54ab4 (diff)
downloadaports-9e5eefc7a5fcf5938a8dc8a3be8c75e9e6809909.tar.bz2
aports-9e5eefc7a5fcf5938a8dc8a3be8c75e9e6809909.tar.xz
community/rapidjson: move from testing
Diffstat (limited to 'community/rapidjson')
-rw-r--r--community/rapidjson/APKBUILD49
-rw-r--r--community/rapidjson/do-not-include-gtest-src-dir.patch20
2 files changed, 69 insertions, 0 deletions
diff --git a/community/rapidjson/APKBUILD b/community/rapidjson/APKBUILD
new file mode 100644
index 0000000000..bd9ae21099
--- /dev/null
+++ b/community/rapidjson/APKBUILD
@@ -0,0 +1,49 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+# Note: This package contains only header files.
+pkgname=rapidjson
+pkgver=1.1.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
+ do-not-include-gtest-src-dir.patch"
+builddir="$srcdir/$pkgname-$pkgver"
+
+build() {
+ mkdir -p "$builddir"/build
+ cd "$builddir"/build
+
+ 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"/build
+
+ make install DESTDIR="$pkgdir" || return 1
+
+ # Remove examples and readme.
+ rm -r "$pkgdir"/usr/share
+}
+
+sha512sums="2e82a4bddcd6c4669541f5945c2d240fb1b4fdd6e239200246d3dd50ce98733f0a4f6d3daa56f865d8c88779c036099c52a9ae85d47ad263686b68a88d832dff rapidjson-1.1.0.tar.gz
+b6027268c3a10c602ab3df783790d3af537a9f23e74651bdd0a0dc6810144eeba37f15e12576f4b357e538c634e979b7c128e95294e60788f59d69ccb8367f6f do-not-include-gtest-src-dir.patch"
diff --git a/community/rapidjson/do-not-include-gtest-src-dir.patch b/community/rapidjson/do-not-include-gtest-src-dir.patch
new file mode 100644
index 0000000000..2feb7aa1d5
--- /dev/null
+++ b/community/rapidjson/do-not-include-gtest-src-dir.patch
@@ -0,0 +1,20 @@
+commit e61866f098098422462e8bc220506443e76c3bb0
+Author: Björn Esser <me@besser82.io>
+Date: Sun Apr 3 11:21:47 2016 +0200
+
+ do not include gtest_src_dir
+
+Source: http://pkgs.fedoraproject.org/cgit/rpms/rapidjson.git/tree/rapidjson-1.1.0-do_not_include_gtest_src_dir.patch
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 11c1b04..43377db 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -8,7 +8,7 @@ IF(GTESTSRC_FOUND)
+ set(gtest_force_shared_crt ON)
+ endif()
+
+- add_subdirectory(${GTEST_SOURCE_DIR} ${CMAKE_BINARY_DIR}/googletest)
++# add_subdirectory(${GTEST_SOURCE_DIR} ${CMAKE_BINARY_DIR}/googletest)
+ include_directories(SYSTEM ${GTEST_INCLUDE_DIR})
+
+ set(TEST_LIBRARIES gtest gtest_main)