# -*- 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 120091 2014-05-15 04:15:21Z devans@macports.org $

PortSystem      1.0

name            file-roller
version         3.12.2
license         GPL-2+
set branch      [join [lrange [split ${version} .] 0 1] .]
description     An archive manager for GNOME
long_description  \
                File Roller is an archive manager for the GNOME \
                environment. Archive manager means that you can: \
                    * Create and modify archives.  \
                    * View the content of an archive.  \
                    * View a file contained in the archive.  \
                    * Extract files from the archive.
maintainers     devans openmaintainer
categories      gnome
platforms       darwin
homepage        https://wiki.gnome.org/Apps/FileRoller
master_sites    gnome:sources/${name}/${branch}/

use_xz          yes

checksums       rmd160  e381f7c59461fa37f947ca338d5290b4054b37cd \
                sha256  0677be6618dba609eae2d76420e8a5a8d9a414bcec654e7b71e65b941764eacf

depends_build   port:pkgconfig \
                port:intltool \
                port:itstool \
                port:yelp-tools

depends_lib     port:desktop-file-utils \
                port:gtk3 \
                port:json-glib \
                port:libnotify \
                port:libmagic \
                port:libarchive \
                port:xorg-libsm \
                port:xorg-libice

depends_run     port:gnome-settings-daemon \
                port:yelp

patchfiles      patch-src-fr-command-lrzip.c.diff

# update m4/intltool.m4 and autoreconf

pre-configure {
    copy -force ${prefix}/share/aclocal/intltool.m4 ${worksrcpath}/m4
}

use_autoreconf      yes
autoreconf.args     -fvi

configure.args  --with-smclient=xsmp \
                --disable-nautilus-actions \
                --disable-packagekit \
                --disable-schemas-compile \
                --disable-silent-rules

variant nautilus description {Build optional nautilus context menu actions} {
    configure.args-delete   --disable-nautilus-actions
    depends_lib-append      port:nautilus
}

post-activate {
    system "${prefix}/bin/gtk-update-icon-cache-3.0 -f -t ${prefix}/share/icons/hicolor"
    system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
    system "${prefix}/bin/glib-compile-schemas ${prefix}/share/glib-2.0/schemas"
}

livecheck.type  gnome
