# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 91978 2012-04-14 11:15:16Z afb@macports.org $

PortSystem      1.0

name            py25-gobject
platforms       darwin
set my_name     pygobject
version         2.26.0
revision        2
set branch      [join [lrange [split ${version} .] 0 1] .]
categories      python gnome
license         LGPL-2.1+
maintainers     jwa openmaintainer
description     Python bindings for GObject.

long_description \
    PyGObject provides a convenient wrapper for the GObject+ library \
    for use in Python programs, and takes care of many of the boring details \
    such as managing memory and type casting. \
    When combined with PyGTK, PyORBit and gnome-python, \
    it can be used to write full featured Gnome applications.

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

checksums       md5     7e3352c4b83ce8dc15290e86dd9c2be0 \
                sha1    d091412760d44477e76ae995125c8fc5a15eae74 \
                rmd160  dd164d29232509f729fe7f766b18d1985eca73f6

depends_build   port:pkgconfig
depends_lib     path:lib/pkgconfig/glib-2.0.pc:glib2 \
                port:libxslt \
                port:python25

patchfiles     patch-gi_pygi.h patch-gio_gio-types.defs

configure.args  --disable-glibtest \
                --disable-introspection

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

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

test.run        yes
test.env        PYTHONPATH=[glob -nocomplain ${worksrcpath}/build/lib*]
test.target     check

post-destroot {
    set docdir ${prefix}/share/doc/${name}-${version}
    xinstall -d ${destroot}${docdir}
    xinstall -m 0644 -W ${worksrcpath} AUTHORS COPYING ChangeLog NEWS README \
        ${destroot}${docdir}
}

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