# -*- 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 75193 2011-01-17 19:35:00Z dports@macports.org $

PortSystem      1.0

name            gegl
version         0.1.2
revision        1
set branch      [join [lrange [split ${version} .] 0 1] .]
categories      graphics
maintainers     devans
platforms       darwin
homepage        http://gegl.org/
master_sites    ftp://ftp.gtk.org/pub/${name}/${branch}/

use_bzip2       yes

description \
    GEGL is a graph based image processing framework.

long_description \
    GEGL is a graph based image processing framework offering image processing and \
    compositing on large images. GEGL is suitable for projects ranging from small \
    one-off projects to interactive applications.

universal_variant  no

checksums       md5     d35ffe17dc042652eca3205488ece262 \
                sha1    34b4a6be9e472324d6dd1233713a1f8851fcdc04 \
                rmd160  e03faeac7ba3024f64ed0c43a22cf433f8e5eb19

depends_build \
    port:pkgconfig \
    port:w3m

depends_lib \
    port:babl \
    port:gtk2 \
    port:lua \
    port:openexr \
    port:libopenraw \
    port:librsvg \
    path:lib/pkgconfig/sdl.pc:libsdl \
    path:bin/dot:graphviz \
    path:lib/libavcodec.dylib:ffmpeg \
    port:libspiro

patchfiles      patch-gegl-buffer-gegl-buffer.c.diff

configure.args  --disable-docs

platform darwin {
    if {$build_arch == "x86_64"} {
        configure.args-append --build=${build_arch}-apple-${os.platform}${os.version}
    }
}

variant html_doc description {Build html docs with enscript and asciidoc} {
    depends_build-append port:asciidoc
    configure.args-delete --disable-docs
    configure.args-append --enable-docs
}

variant workshop description {Enable build of workshop operations} {
    configure.args-append --enable-workshop
}

livecheck.type  regex
livecheck.url   [lindex ${master_sites} 0]
livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
