summaryrefslogtreecommitdiffstats
path: root/abs
diff options
context:
space:
mode:
Diffstat (limited to 'abs')
-rw-r--r--abs/extra/jsoncpp/PKGBUILD81
1 files changed, 57 insertions, 24 deletions
diff --git a/abs/extra/jsoncpp/PKGBUILD b/abs/extra/jsoncpp/PKGBUILD
index 693cdbd..a8a1a36 100644
--- a/abs/extra/jsoncpp/PKGBUILD
+++ b/abs/extra/jsoncpp/PKGBUILD
@@ -1,38 +1,71 @@
-# $Id$
-# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Jonahtan Schaeffer <joschaeffer@gmail.com>
# COntributor: Drake Arconis <lightdrake@gmail.com>
-pkgname=jsoncpp
-pkgver=1.6.5
-pkgrel=3
-pkgdesc='A C++ library for interacting with JSON'
+pkgbase=jsoncpp
+pkgname=('jsoncpp' 'jsoncpp-doc')
+pkgver=1.8.4
+pkgrel=2
+pkgdesc='C++ library for interacting with JSON'
url='https://github.com/open-source-parsers/jsoncpp'
+arch=('x86_64')
license=('MIT' 'custom:Public_Domain')
-arch=('i686' 'x86_64')
-depends=('gcc-libs')
-makedepends=('cmake')
-source=(${pkgname}-${pkgver}.tar.gz::"https://github.com/open-source-parsers/${pkgname}/archive/${pkgver}.tar.gz")
-md5sums=('2bb16bb8d2b867acbdd71d1855062a89')
+makedepends=('gcc-libs' 'doxygen' 'graphviz' 'python' 'meson')
+checkdepends=('python2')
+options=('staticlibs')
+source=(${pkgbase}-${pkgver}.tar.gz::https://github.com/open-source-parsers/${pkgbase}/archive/${pkgver}.tar.gz)
+sha256sums=('c49deac9e0933bcb7044f08516861a2d560988540b23de2ac1ad443b219afdb6')
+sha512sums=('f70361a3263dd8b9441374a9a409462be1426c0d6587c865171a80448ab73b3f69de2b4d70d2f0c541764e1e6cccc727dd53178347901f625ec6fb54fb94f4f1')
+
+prepare() {
+ cd ${pkgbase}-${pkgver}
+ mkdir -p build
+}
build() {
- cd ${pkgname}-${pkgver}
- cmake \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DBUILD_SHARED_LIBS=ON \
- -DBUILD_STATIC_LIBS=OFF
- make
+ cd ${pkgbase}-${pkgver}
+ msg2 "Building docs..."
+ python doxybuild.py \
+ --doxygen="$(which doxygen)" \
+ --with-dot
+
+ msg2 "Building shared library..."
+ arch-meson --default-library shared build
+ ninja -C build
+
+ msg2 "Building static library..."
+ arch-meson --default-library static build-static
+ ninja -C build-static
}
check() {
- cd ${pkgname}-${pkgver}
- make test
+ cd ${pkgbase}-${pkgver}
+ ninja -C build test
+ cd test
+ python2 runjsontests.py ../build/jsontestrunner
+ python2 rununittests.py ../build/jsoncpp_test
}
-package() {
- cd ${pkgname}-${pkgver}
- make DESTDIR="${pkgdir}" install
- install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+package_jsoncpp() {
+ depends=('gcc-libs')
+ optdepends=('jsoncpp-doc: documentation')
+
+ cd ${pkgbase}-${pkgver}
+ DESTDIR="${pkgdir}" ninja -C build install
+ DESTDIR="${pkgdir}" ninja -C build-static install
+ install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+}
+
+package_jsoncpp-doc() {
+ pkgdesc+=' (documentation)'
+ optdepends=('jsoncpp')
+
+ cd ${pkgbase}-${pkgver}
+ install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -dm 755 "${pkgdir}/usr/share/doc/${pkgbase}"
+ cp -a dist/doxygen/jsoncpp-api-html-${pkgver} "${pkgdir}/usr/share/doc/${pkgbase}/html"
}
+# vim: ts=2 sw=2 et: