# -*- 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 107670 2013-07-04 06:02:07Z jeremyhu@macports.org $

PortSystem      1.0

name            exempi
version         2.2.1
license         BSD
categories      graphics
maintainers     devans openmaintainer
platforms       darwin
homepage        http://libopenraw.freedesktop.org/wiki/Exempi
master_sites    http://libopenraw.freedesktop.org/download/

checksums       rmd160  c1510f53a65feda08f67e3fba9dcdcb601387c95 \
                sha256  a99e1569047988200e4935cf4395667341a5bd8d6067847a08df4304546cc362

description     Exempi is an implementation of XMP.

long_description \
                Exempi is an implementation of XMP. Version 2.x is based on Adobe XMP SDK 4.1.1.

patchfiles      patch-Makefile.am.diff \
                malloc.patch

# see http://trac.macports.org/ticket/20965
if {$build_arch == "x86_64" || $build_arch == "ppc64"} {
    patchfiles-append      patch-source__XMPFiles__FormatSupport__Makefile.am
    configure.cppflags-append     -DXMP_64
}

use_autoreconf  yes

configure.args  --enable-unittest=no

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   ${master_sites}
livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
