# -*- 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           legacysupport 1.1

name                exempi
version             2.6.5
revision            0
license             BSD
categories          graphics
maintainers         {devans @dbevans} openmaintainer
homepage            https://libopenraw.freedesktop.org/${name}/
master_sites        https://libopenraw.freedesktop.org/download/

use_bzip2           yes

checksums           rmd160  910d47d456a25d26de9a897de4e451017d5435ce \
                    sha256  e9f9a3d42bff73b5eb0f77ec22cd0163c3e21949cc414ad1f19a0465dde41ffe \
                    size    3719598

description         Exempi is an implementation of XMP.
long_description    {*}${description} Version 2.6.4 is based on Adobe XMP SDK v2023.07.

if {[vercmp $xcodeversion 4.3] < 0 && [string match "*macports*" ${configure.compiler}]} {
    # Xcode 4.2 fails with load commands in the newer toolchain
    depends_build-append port:cctools

    configure.env-append \
        AR=${prefix}/bin/ar \
        RANLIB=${prefix}/bin/ranlib
}

patchfiles          limits.patch \
                    stdlib.patch

compiler.cxx_standard 2011

configure.args      --enable-unittest=no \
                    --disable-silent-rules

variant unit_test description {Enable unit test}  {
     depends_lib-append port:boost
     configure.args-delete  --enable-unittest=no
     configure.args-append  --enable-unittest=yes
}

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