# -*- 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

github.setup            danielaparker jsoncons 1.8.1 v
github.tarball_from     archive
revision                0
categories              devel
platforms               any
supported_archs         noarch
license                 Boost-1
maintainers             {@sikmir disroot.org:sikmir} openmaintainer
description             A C++, header-only library for constructing JSON and JSON-like data formats
long_description        {*}${description}

checksums               rmd160  42831b640194a79d6ea8150dee8d8a13b04b8c19 \
                        sha256  05657792d92f55be3e6494036c414e9d94237e3959fa46b073fdc712f4a9e56d \
                        size    1664123

compiler.cxx_standard   2017
configure.args-append   -DCMAKE_CXX_STANDARD=17 \
                        -DCMAKE_CXX_STANDARD_REQUIRED=ON

# https://github.com/danielaparker/jsoncons/issues/488
if {${configure.cxx_stdlib} ne "libc++"} {
    configure.cppflags-append \
                        -DJSONCONS_HAS_STATEFUL_ALLOCATOR=0 -DJSONCONS_HAS_POLYMORPHIC_ALLOCATOR=0
}

test.run                yes
