# -*- 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                libvisio-0.1
set dname           libvisio
version             0.1.8
revision            1
categories          graphics
maintainers         {devans @dbevans} openmaintainer
license             LGPL-2

description         Libvisio is a C++ library for reading and parsing \
                    drawings in VSD (Visio) format.

long_description    ${description} VSD is the format used by Visio.

homepage            https://wiki.documentfoundation.org/DLP/Libraries/${dname}
master_sites        https://dev-www.libreoffice.org/src/${dname}

use_xz              yes

distname            ${dname}-${version}

checksums           sha256  b4098ffbf4dcb9e71213fa0acddbd928f27bed30db2d80234813b15d53d0405b \
                    rmd160  ab572921d4ab28687a663bb07b0dc52a147bc763 \
                    size    1686344

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:libxml2 \
                    port:zlib

patchfiles          patch-ambiguous-pow.diff

# requires C++11 as of version 0.1.6
# ICU requires C++17
compiler.cxx_standard   2017
configure.cxxflags-append   -std=c++17

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

variant docs description {Build documentation using doxygen} {
    depends_build-append    path:bin/doxygen:doxygen
    configure.args-delete   --without-docs
}

livecheck.type      regex
livecheck.url       [lindex ${master_sites} 0]
livecheck.regex     \"${dname}-(\[0-9.\]+)${extract.suffix}\"
