# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 107354 2013-06-26 03:25:19Z devans@macports.org $

PortSystem      1.0

name            eog
version         2.32.1
revision        2
license         GPL-2+
set branch      [join [lrange [split ${version} .] 0 1] .]
description     An image viewing program.
long_description \
                This is the Eye of Gnome, an image viewer program. \
                It is meant to be a fast and functional image viewer \
                as well as an image cataloging program.
maintainers     devans openmaintainer
categories      gnome
platforms       darwin
homepage        http://www.gnome.org/
master_sites    gnome:sources/${name}/${branch}/

use_bzip2       yes

checksums       sha256  543672fb8e8e300bf2cf4c7eef43b5b1624e2e48e6aa0801a083ae7beb2d7078 \
                rmd160  3e3a3a4ac51b97a13f278a11ec0bfa90f25b6af2

depends_build   port:pkgconfig \
                port:intltool \
                port:gnome-doc-utils \
                port:gtk-doc

depends_lib     port:desktop-file-utils \
                port:gnome-desktop \
                port:gconf \
                port:gnome-icon-theme \
                port:shared-mime-info \
                port:jpeg \
                port:libexif \
                port:lcms \
                port:exempi

depends_run     port:gnome-settings-daemon \
                port:yelp
               
patchfiles      missing-links.patch

use_autoreconf  yes
autoreconf.args -fvi

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

variant python25 conflicts python26 python27 description {Use python 2.5} {
    configure.python          ${prefix}/bin/python2.5
    depends_lib-append        port:py25-pygtk
    set python_framework      ${frameworks_dir}/Python.framework/Versions/2.5
    configure.pkg_config_path ${python_framework}/lib/pkgconfig
}

variant python26 conflicts python25 python27 description {Use python 2.6} {
    configure.python          ${prefix}/bin/python2.6
    depends_lib-append        port:py26-pygtk
    set python_framework      ${frameworks_dir}/Python.framework/Versions/2.6
    configure.pkg_config_path ${python_framework}/lib/pkgconfig
}

variant python27 conflicts python25 python26 description {Use python 2.7} {
    configure.python          ${prefix}/bin/python2.7
    depends_lib-append        port:py27-pygtk
    set python_framework      ${frameworks_dir}/Python.framework/Versions/2.7
    configure.pkg_config_path ${python_framework}/lib/pkgconfig
}

if {![variant_isset python25] && ![variant_isset python26]} {
    default_variants +python27
}

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

livecheck.type  gnome
