# -*- 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-session
version             2.26.2
set branch          [join [lrange [split ${version} .] 0 1] .]
description         Session component for the GNOME 2 desktop
long_description \
   Session component for the GNOME 2.0 desktop.  This package contains the \
   commands needed to start GNOME 2.0.
maintainers         devans openmaintainer
categories          gnome
platforms           darwin
homepage            http://www.gnome.org/
master_sites        gnome:sources/${name}/${branch}/

checksums           md5     2cc3ff808592d95c3b364d608e99dea4 \
                    sha1    ba43d9c623e6e79635a09cfbd6ecfce40ccbab05 \
                    rmd160  ff2c75cf5b8c3405ec5d2044510cf07eedede1d1

depends_build       port:pkgconfig \
                    port:intltool \
                    port:p5-xml-parser
 
depends_lib         port:gconf \
                    port:libglade2 \
                    port:startup-notification \
                    port:policykit-gnome \
                    port:xorg-xtrans \
                    port:xorg-libXtst

use_bzip2           yes

configure.args      --x-includes=${prefix}/include \
                    --x-libraries=${prefix}/lib \
                    --disable-docbook-docs \
                    --disable-schemas-install

variant docs description {build docbook documentation} {
   configure.args-delete --disable-docbook-docs
   configure.args-append --enable-docbook-docs
   depends_build-append  port:xmlto
}

post-activate {
   system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor"
   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-([0-9\.]+)}
