# $Id: Portfile 55019 2009-08-06 02:58:56Z ryandesign@macports.org $

PortSystem      1.0

name            py25-gtk
set my_name     pygtk
version         2.14.1
set branch      [join [lrange [split ${version} .] 0 1] .]
categories      python x11
maintainers     nomaintainer
platforms       darwin
description     PyGTK is the Python binding to GTK+ 2.x

long_description \
    PyGTK contains modules that allow you to use gtk in Python programs. \
    At present, it is a fairly complete set of bindings.

homepage        http://www.pygtk.org/
master_sites    gnome:sources/${my_name}/${branch}/
distname        ${my_name}-${version}
use_bzip2       yes

checksums       md5     c27a7d21b87910e80605d9135d220592 \
                sha1    9a9a29c9de2a31e08a96f38ade43ce93ec569400 \
                rmd160  ee32b54b5a5b12ca5718cf53505542b89e97347b

depends_build   port:pkgconfig
depends_lib     port:python25 \
                port:atk \
                port:gtk2 \
                port:libglade2 \
                port:py25-cairo \
                port:py25-gobject

configure.args  --disable-glibtest

# needed to find Python pkg-config files
set python_prefix  ${frameworks_dir}/Python.framework/Versions/2.5
configure.pkg_config_path ${python_prefix}/lib/pkgconfig

configure.python    ${prefix}/bin/python2.5

platform darwin 9 { 
    post-patch { 
        reinplace "s| -export-symbols-regex.*||g" \
            ${worksrcpath}/Makefile.in \
            ${worksrcpath}/gtk/Makefile.in
    } 
} 

livecheck.check regex
livecheck.url   http://ftp.gnome.org/pub/gnome/sources/${my_name}/${branch}/
livecheck.regex {LATEST-IS-(\d+(?:\.\d+)*)}
