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

name                libcdr-0.1
set dname           libcdr
version             0.1.8
revision            1
categories          graphics
license             {GPL-2.1+ LGPL-2.1+ MPL-1.1+}
maintainers         {devans @dbevans} openmaintainer
homepage            https://wiki.documentfoundation.org/DLP/Libraries/${dname}
master_sites        https://dev-www.libreoffice.org/src/${dname}

description         Libcdr is a library and a set of tools for reading and converting binary files \
                    produced by Corel DRAW.

long_description    ${description}

use_xz              yes

distname            ${dname}-${version}

checksums           sha256  ced677c8300b29c91d3004bb1dddf0b99761bf5544991c26c2ee8f427e87193c \
                    rmd160  24fbc0c3a564a670c4fd67a692e78401010b0584 \
                    size    625836

depends_build       port:pkgconfig

# this port only uses boost headers during build
# and does not link with any boost libraries
# no need to rebuild due to boost library ABI changes
boost.depends_type  build

depends_lib         port:librevenge \
                    path:lib/pkgconfig/icu-uc.pc:icu \
                    port:lcms2 \
                    port:zlib

# ICU requires C++17
compiler.cxx_standard 2017

configure.args      --disable-werror \
                    --disable-silent-rules \
                    --disable-tests \
                    --without-docs

variant docs description {Build API documentation} {
    depends_build-append  path:bin/doxygen:doxygen
    configure.args-replace --without-docs --with-docs
}

livecheck.type      regex
livecheck.url       ${master_sites}
livecheck.regex     "${dname}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
