# -*- 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.0

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

use_bzip2           yes

checksums           rmd160  fee5848badb62ea7b7f8dba4a400775d35eb1711 \
                    sha256  a75149c96b61e39cdcb046fd5e56d88cfeeab6e08f894e15ebffd9944092bfd0 \
                    size    3720009

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}"
