# -*- 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 57375 2009-09-10 08:16:41Z ryandesign@macports.org $

PortSystem 1.0

name		gnome-games
version		2.26.3
set branch  [join [lrange [split ${version} .] 0 1] .]
description	Collection of small but addictive games for GNOME
long_description    ${description}
maintainers	devans openmaintainer
categories	gnome
platforms	darwin
homepage        http://live.gnome.org/GnomeGames/
master_sites    gnome:sources/${name}/${branch}/

checksums       md5     32c69a25671d8d23b19f234efcc177ca \
                sha1    0b859be03e6f25a43ed4ad41d6022b9bc83635fc \
                rmd160  54ae263d943e2cf7dad2f1e160d7a2756e0ca573

depends_build   port:pkgconfig \
                port:intltool \
                port:p5-xml-parser \
                port:gnome-doc-utils \
                port:gtk-doc

depends_lib     port:gconf \
                port:librsvg \
                port:py25-gtk \
                port:gnome-python-desktop \
                port:libsdl_mixer \
                port:ggz-client-libs \
                port:guile
              
use_bzip2 	yes

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

configure.args  --disable-scrollkeeper \
                --disable-schemas-install \
                --disable-tests

post-extract {
    reinplace "s|/usr/bin/env python|${prefix}/bin/python2.5|" ${worksrcpath}/glchess/src/glchess.in.in
    reinplace "s|/usr/bin/env python|${prefix}/bin/python2.5|" ${worksrcpath}/gnome-sudoku/src/gnome-sudoku.in.in
}

post-activate {
        system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor"
        system "${prefix}/bin/scrollkeeper-update; true"
        system "${prefix}/bin/update-desktop-database -q ${prefix}/share/applications; true"
        system "export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` && \
            gconftool-2 --makefile-install-rule ${prefix}/etc/gconf/schemas/*.schemas"
}

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