# -*- 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.6
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  ccd90e8442cd387ec6c0aa9a284ba437e77b8629 \
                    sha256  7513b7e42c3bd90a58d77d938c60d2e87c68f81646e7cb8b12d71fe334391c6f \
                    size    3723877

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}  {
    PortGroup       boost 1.0

    configure.args-replace  --enable-unittest=no --enable-unittest=yes
}

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