# -*- 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        PJK libcbor 0.11.0 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0

categories          devel
maintainers         {@trodemaster netjibbing.com:blake} \
                    openmaintainer
license             MIT
description         library for parsing and generating CBOR
long_description    {*}${description}, the general-purpose schema-less binary data format.

checksums           rmd160  ac5fb12ca64d9b3f9c6684a3d0d9c4a1eb94c2e3 \
                    sha256  9862c5fa2e21103dd1bdae0cc3c030c4dd997893eb85c30b318b5c0efb617ab7 \
                    size    293549

configure.args-append    -DBUILD_SHARED_LIBS=ON

variant tests description {enable tests} {
    depends_test-append         port:cmocka
    configure.args-append       -DWITH_TESTS=ON
    configure.pre_args-replace  -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \
                                -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF
    test.run            yes
    test.target         test
}
