# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 56272 2009-08-25 22:29:05Z devans@macports.org $

PortSystem          1.0

name                clutter
version             1.0.4
set branch          [string range $version 0 [expr [string last "." $version] - 1]]
categories          graphics
maintainers         devans openmaintainer
platforms           darwin
description         A generic high-level canvas library.
long_description    Clutter is an open source software library for \
                    creating fast, visually rich and animated graphical \
                    user interfaces.
homepage            http://www.clutter-project.org/
master_sites        http://www.clutter-project.org/sources/${name}/${branch}/
use_bzip2           yes

checksums           md5     7e587d9406e362ea1151a81d37d5460c \
                    sha1    91476f5c3089bab35dfb1c3a0bc18c44f161b6f0 \
                    rmd160  4fd2d032df0e45aab574f4388275a9d1ff234148

depends_build       port:pkgconfig

depends_lib         port:gtk2 \
                    port:mesa \
                    port:xorg-libXdamage \
                    port:xorg-libXcomposite

configure.args      --with-flavour=glx \
                    --with-imagebackend=gdk-pixbuf \
                    --x-includes=${prefix}/include \
                    --x-libraries=${prefix}/include \
                    --enable-introspection=no \
                    --disable-gtk-doc

variant no_x11 {
    depends_lib-delete   port:mesa \
                         port:xorg-libXdamage \
                         port:xorg-libXcomposite
    configre.args-delete --with-flavour=glx \
                         --with-imagebackend=gdk-pixbuf \
                         --x-includes=${prefix}/include \
                         --x-libraries=${prefix}/include
    configure.args-append --with-flavour=osx
}

livecheck.check     regex
livecheck.url       http://www.clutter-project.org/sources/${name}/${branch}/
livecheck.regex     "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
