# -*- 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 63387 2010-02-03 18:34:33Z elelay@macports.org $

PortSystem 1.0

name            py26-gnome
set my_name     gnome-python
version         2.26.1
set branch      [join [lrange [split $version .] 0 1] .]
categories      python gnome
platforms       darwin
maintainers     elelay openmaintainer
description     gnome-python is a set of python interfaces to gnome-libs.
long_description    ${description}

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

checksums       md5     e5dcae40b2c291126843680dbed924a8 \
                sha1    789627d4107aa50cd7fc763c4de015032346524e \
                rmd160  054901ecd209953225ccfa725fdd9164447fbb49

depends_build   port:pkgconfig

depends_lib     port:libgnomeui \
                port:py26-gtk \
                port:py26-orbit \
                port:libgnome \
                port:python26 \
                port:libgnomecanvas \
                port:gnome-vfs \
                port:gconf \
                port:libbonobo \
                port:libbonoboui


set python.branch   2.6
set python.prefix   ${frameworks_dir}/Python.framework/Versions/${python.branch}
set python.bin      ${python.prefix}/bin/python${python.branch}

configure.args-append  --prefix=${python.prefix}
configure.env-append    PYGOBJECT_CODEGEN=${python.prefix}/bin/pygobject-codegen-2.0
configure.pkg_config_path  ${python.prefix}/lib/pkgconfig

configure.python    ${python.bin}

use_parallel_build  yes

# fix an import error of bonobo.ui
# when gtk quartz is in use
variant quartz description {fix bonobo import error when gtk +quartz is used} {
	patchfiles-append bonobo.diff
}

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

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