# -*- 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 119008 2014-04-15 04:47:24Z devans@macports.org $

PortSystem          1.0

name                clutter
version             1.18.2
license             LGPL-2.1
set branch          [join [lrange [split ${version} .] 0 1] .]
categories          graphics
maintainers         devans openmaintainer
platforms           darwin macosx
description         A generic high-level canvas library.
long_description    Clutter is an open source software library for \
                    creating fast, compelling, portable, and dynamic graphical \
                    user interfaces.
homepage            https://wiki.gnome.org/Projects/Clutter
master_sites        gnome:sources/${name}/${branch}/

use_xz              yes

checksums           rmd160  7c2bacaf795d33cce8d9ee2cd40488255225d2fe \
                    sha256  f9fe12e6148426063c90e67dfaeb56013bf1aea224ef502223d13eab6c1add63

depends_build       port:pkgconfig

depends_lib         port:atk \
                    port:gtk3 \
                    path:lib/pkgconfig/cairo.pc:cairo \
                    path:lib/pkgconfig/pango.pc:pango \
                    port:json-glib \
                    port:cogl

variant x11 conflicts quartz {
    depends_lib-append port:gdk-pixbuf2 \
                       port:xorg-libXcomposite \
                       port:xorg-libXdamage \
                       port:xorg-libXext \
                       port:xorg-libXfixes

    configure.args     --with-x \
                       --x-includes=${prefix}/include \
                       --x-libraries=${prefix}/lib \
                       --enable-gdk-backend=yes \
                       --enable-x11-backend=yes \
                       --enable-gdk-pixbuf=yes \
                       --enable-quartz-backend=no \
                       --enable-introspection=yes \
                       --disable-examples \
                       --disable-silent-rules \
                       --disable-gtk-doc
}

variant quartz conflicts x11 {
    configure.args  --without-x \
                    --enable-x11-backend=no \
                    --enable-gdk-backend=yes \
                    --enable-gdk-pixbuf=no \
                    --enable-quartz-backend=yes \
                    --enable-introspection=yes \
                    --disable-silent-rules \
                    --disable-gtk-doc
}

variant debug description {Enable full debugging} {
    configure.args-append --enable-debug=yes
}

default_variants +x11

livecheck.type      gnome
