[arch-commits] Commit in rapidjson/trunk (PKGBUILD)

Levente Polyak anthraxx at archlinux.org
Wed Aug 14 08:14:03 UTC 2019


    Date: Wednesday, August 14, 2019 @ 08:14:03
  Author: anthraxx
Revision: 499174

upgpkg: rapidjson 1.1.0-4 (adding tests, enable std::string addon)

Modified:
  rapidjson/trunk/PKGBUILD

----------+
 PKGBUILD |   39 ++++++++++++++++++++++++++++-----------
 1 file changed, 28 insertions(+), 11 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-08-14 05:30:40 UTC (rev 499173)
+++ PKGBUILD	2019-08-14 08:14:03 UTC (rev 499174)
@@ -1,20 +1,23 @@
-# Maintainer:  Jonathan Steel <jsteel at archlinux.org>
+# Maintainer: Christian Rebischke <chris.rebischke at archlinux.org>
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Jonathan Steel <jsteel at archlinux.org>
 # Contributor: Yunhui Fu <yhfudev at gmail.com>
 
 pkgname=rapidjson
 pkgver=1.1.0
-pkgrel=3
-pkgdesc="A fast JSON parser/generator for C++ with both SAX/DOM style API"
+pkgrel=4
+pkgdesc="Fast JSON parser/generator for C++ with both SAX/DOM style API"
 arch=('any')
 url="https://github.com/miloyip/rapidjson"
 license=('MIT')
-makedepends=('gcc' 'cmake')
-source=($pkgname-$pkgver.tar.gz::https://github.com/miloyip/$pkgname/archive/v$pkgver.tar.gz)
-md5sums=('badd12c511e081fec6c89c43a7027bce')
+makedepends=('cmake')
+checkdepends=('gtest' 'valgrind')
+source=(https://github.com/miloyip/$pkgname/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
+sha512sums=('2e82a4bddcd6c4669541f5945c2d240fb1b4fdd6e239200246d3dd50ce98733f0a4f6d3daa56f865d8c88779c036099c52a9ae85d47ad263686b68a88d832dff')
 
 prepare() {
   cd $pkgname-$pkgver
-  find -name CMakeLists.txt | xargs sed -e 's|-Werror||' -i # Don't use -Werror 
+  find -name CMakeLists.txt | xargs sed -e 's|-Werror||' -i # Don't use -Werror
 }
 
 build () {
@@ -23,15 +26,29 @@
   mkdir -p build
   cd build
 
-  cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr ..
+  cmake \
+      -DCMAKE_BUILD_TYPE=None \
+      -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+      -DRAPIDJSON_HAS_STDSTRING=ON \
+      -DRAPIDJSON_BUILD_CXX11=ON \
+      -DRAPIDJSON_ENABLE_INSTRUMENTATION_OPT=OFF \
+      -DDOC_INSTALL_DIR=/usr/share/doc/${pkgname} \
+      ..
 
   make
 }
 
-package() {
+check() {
   cd $pkgname-$pkgver/build
+  ctest -j 2 -V
+}
 
-  DESTDIR="$pkgdir" make install
+package() {
+  cd $pkgname-$pkgver
 
-  install -Dm644 ../license.txt "$pkgdir"/usr/share/licenses/$pkgname/license.txt
+  DESTDIR="$pkgdir" make -C build install
+
+  install -Dm644 license.txt "$pkgdir"/usr/share/licenses/$pkgname/license.txt
 }
+
+# vim: ts=2 sw=2 et:


More information about the arch-commits mailing list