# -*- 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 107676 2013-07-04 06:54:02Z jeremyhu@macports.org $

PortSystem      1.0

name            nautilus
version         2.32.2.1
set branch      [join [lrange [split ${version} .] 0 1] .]
description     The GNOME filemanager
long_description \
                Nautilus is the official file manager for the \
                GNOME desktop. It is designed to be primarly a file manager, \
                but there are support for web and file viewing too.
maintainers     devans openmaintainer
categories      gnome
license         GPL-2+
platforms       darwin
homepage        http://www.gnome.org/
master_sites    gnome:sources/${name}/${branch}/

use_bzip2       yes

checksums       rmd160  4498fc3c5dd2a4f13935b0366c175ad1b87bac1e \
                sha256  802dacc98c697afea2e6201dab1c8c800809f235fff39857983efb4340ecc303

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

depends_lib     port:desktop-file-utils \
                port:gnome-desktop \
                port:gobject-introspection \
                port:libxml2 \
                port:libunique \
                port:libexif \
                port:exempi \
                port:pangox-compat

depends_run     port:desktop-file-utils \
                port:shared-mime-info \
                port:gnome-settings-daemon

patchfiles      patch-configure.in.diff \
                patch-eel-Makefile.am.diff \
                patch-nautilus-emblem-utils.c.diff \
                patch-nautilus-file.c.diff

use_autoreconf  yes
autoreconf.args -fvi

configure.args  --mandir=${prefix}/share/man \
                --x-includes=${prefix}/include \
                --x-libraries=${prefix}/lib \
                --enable-introspection=yes \
                --disable-silent-rules \
                --disable-update-mimedb \
                --disable-schemas-install \
                --disable-packagekit

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

livecheck.type  gnome
