# $Id: Portfile 55901 2009-08-20 23:31:24Z ryandesign@macports.org $

PortSystem                      1.0

name                            pure-gtk
version                         0.4
categories                      x11
platforms                       darwin
maintainers                     ryandesign
use_parallel_build              yes
homepage                        http://pure-lang.googlecode.com/
master_sites                    ${homepage}files/

description                     a collection of bindings to use the GTK+ \
                                GUI toolkit version 2.x with Pure

long_description                ${name} is ${description}. The bindings \
                                include the gtk (+gdk), glib, atk, cairo and \
                                pango libraries, each in their own Pure module

checksums                       md5     c3b43962c587abaf05ddc91b1be27721 \
                                sha1    40e4e313948822dcaaab27121c93e4337ea7e599 \
                                rmd160  513a605fd0b7f441b938df7c8a4085ed7f049820

depends_lib-append              path:lib/libpure.dylib:pure \
                                path:lib/pure/ffi.dylib:pure-ffi \
                                path:lib/pkgconfig/atk.pc:atk \
                                path:lib/pkgconfig/cairo.pc:cairo \
                                path:lib/pkgconfig/glib-2.0.pc:glib2 \
                                path:lib/pkgconfig/gtk+-2.0.pc:gtk2 \
                                path:lib/pkgconfig/pango.pc:pango

use_configure                   no

pre-build {
    build.args-append           CC=${configure.cc} \
                                CFLAGS="${configure.cflags}" \
                                CPPFLAGS="${configure.cppflags}" \
                                LDFLAGS="${configure.ldflags}"
}

post-destroot {
    xinstall -d \
        ${destroot}${prefix}/share/doc/${name} \
        ${destroot}${prefix}/share/examples
    xinstall -m 644 -W ${worksrcpath} \
        COPYING \
        README \
        ${destroot}${prefix}/share/doc/${name}
    copy ${worksrcpath}/examples ${destroot}${prefix}/share/examples/${name}
}

livecheck.check                 regex
livecheck.url                   http://code.google.com/p/pure-lang/downloads/list
livecheck.regex                 ${name}-(\[0-9.\]+)\\.tar
