# -*- 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.14.0 v
github.tarball_from archive
revision            0

categories          devel
maintainers         {@trodemaster icloud.com:manuals-unread2u} openmaintainer

license             MIT
description         library for parsing and generating CBOR
long_description    {*}${description}, the general-purpose schema-less binary data format.

checksums           rmd160  e07df18a748864c2da6988d7f3f30bf3a0f8c402 \
                    sha256  a8c1516e741562cf95aa4479c64916c3d4d2623e24fdc35e414e2320e7300aae \
                    size    317101
                    
configure.args-append    -DBUILD_SHARED_LIBS=ON

variant tests description {enable tests} {
    depends_build-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
}
