# -*- 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
# $Id: Portfile 119439 2014-04-25 14:41:00Z devans@macports.org $

PortSystem      1.0

name            libcdr
version         0.0.16
categories      graphics
license         {GPL-2.1+ LGPL-2.1+ MPL-1.1+}
maintainers     devans openmaintainer
platforms       darwin
homepage        http://www.freedesktop.org/wiki/Software/libcdr
master_sites    http://dev-www.libreoffice.org/src/

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

checksums       sha256  4c8a6586920f7b040ce51fa375eb87507291e0de4f568469db25f52915bc1135 \
                rmd160  c1fe5b74634385fc9c5ab71d45b1dd063469ded9

depends_build   port:pkgconfig

depends_lib     port:boost \
                port:icu \
                port:libwpd \
                port:libwpg \
                port:lcms2 \
                port:zlib

# build fix for darwin 9 and earlier (#43487)

if {${os.platform} eq "darwin" && ${os.major} < 10} {
    configure.cxxflags-append -Wno-long-long
}

configure.args  --disable-werror \
                --without-docs

variant docs description {Build reference documentation} {
    depends_build-append  port:doxygen
    configure.args-replace --without-docs --with-docs
}

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