# -*- 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 99388 2012-11-04 11:48:06Z ryandesign@macports.org $

PortSystem          1.0
PortGroup           github 1.0

github.setup        jralls gtk-quartz-engine 0.2 v
categories          gnome aqua
platforms           darwin
maintainers         gmail.com:tael67 openmaintainer
#supported_archs     i386 ppc

description         Native Mac OS X theme for GTK+

long_description    Carbon-based theme engine for 32-bit Quartz

homepage            http://git.gnome.org/browse/gtk-quartz-engine

checksums           rmd160  f2ae0bccf168a8281c82933d77fe96958603a102 \
                    sha256  56441340aabd79ead12fea043d5772084e9f76d066b1ccb34a77469e1f453031

depends_build       port:pkgconfig \
                    port:automake \
                    port:libtool

depends_lib         port:libffi \
                    port:libpng \
                    port:gtk2

patchfiles          patch-autogen.sh.diff \
                    patch-src-Makefile.am.diff

pre-configure {
    if {![file exists ${prefix}/lib/pkgconfig/gdk-quartz-2.0.pc]} {
        ui_error "

****
**** ${name} is meant to be used only in a gtk2 quartz
**** environment but your version of gtk2 does not support quartz.
**** Please reinstall the gtk2 port and all of its dependencies
**** with the variants +no_x11 +quartz -x11 and then try again.
****
"
        return -code error "gtk2 +no_x11 +quartz not installed"
    }

    system -W ${worksrcpath} "./autogen.sh"
}

notes "
To use ${name}, copy ${prefix}/share/themes/Quartz/gtk-2.0/gtkrc to ~/.gtkrc-2.0
"
