# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           github 1.0
PortGroup           cmake 1.1

# require C++11
compiler.cxx_standard 2011

name                jsoncpp
categories          devel
maintainers         {michaelld @michaelld} openmaintainer
license             MIT

description         JSON C++ library

long_description    JSON data format manipulation C++ library

github.setup        open-source-parsers jsoncpp 1.9.5
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
checksums           rmd160  a0377bfdc937cc6a2e9dc4ee98885c8f453ad957 \
                    sha256  f7500ca3d2755a45cbf47f1bdb375a20101e664ff83db54c88fce8b76abdc637 \
                    size    216104
revision            0

# temporary patch to fix build errors
patchfiles-append   patch-fix-build.diff

# disable CCACHE discovery and use
patchfiles-append   patch-disable-ccache.diff
patch.pre_args-replace  -p0 -p1

configure.args-append \
    -DBUILD_SHARED_LIBS=ON \
    -DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF \
    -DCCACHE_FOUND=NO
