# -*- 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 87218 2011-11-14 07:29:10Z devans@macports.org $

PortSystem      1.0

name            libopenraw
version         0.0.9
categories      graphics
license         LGPL-3+
maintainers     devans openmaintainer
platforms       darwin
homepage        http://libopenraw.freedesktop.org/wiki/
master_sites    http://libopenraw.freedesktop.org/download/

description \
    libopenraw is an ongoing project to provide a free software implementation for camera RAW files decoding.

long_description \
    libopenraw is an ongoing project to provide a free software implementation for camera RAW files decoding. \
    One of the main reasons is that dcraw is not suited for easy integration into applications, and there is a \
    need for an easy to use API to build free software digital image processing applications. It also has the \
    goal to address features missing from dcraw such as meta-data decoding and easy thumbnail extraction.

checksums       sha1    ca246099c5b4f9f1714579706f019382c547b061 \
                rmd160  c525d8f028cec056b2217815cc7c390c80082281

use_bzip2       yes

patchfiles      patch-Makefile.in.diff

depends_build   port:pkgconfig

depends_lib     port:libxml2 \
                port:gdk-pixbuf2 \
                port:boost

configure.args  --with-boost=${prefix}

variant no_gnome description {Build without GNOME/GTK2 support}  {
    depends_lib-delete port:gdk-pixbuf2
    configure.args-append  --disable-gnome
}

post-activate {
    if {![variant_isset no_gnome]} {
        ui_debug "Updating gdk-pixbuf.loaders..."
        system "${prefix}/bin/gdk-pixbuf-query-loaders --update-cache"
    }
}

livecheck.type  regex
livecheck.url   ${homepage}
livecheck.regex {version\ (\d+(?:\.\d+)*)}
