# -*- 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.1 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  65c3aadb3da929f3eff99420ff4b7a5968bc5dfe \
                    sha256  a8f3aa5c75a4e1e2c639a4928036a3a53fd1682037033db0964935965bd5f5da \
                    size    318312
                    
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
}
