# -*- 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 117265 2014-02-20 22:51:46Z devans@macports.org $

PortSystem          1.0

name                gitg
version             0.2.7
license             GPL-2
set branch          [join [lrange [split ${version} .] 0 1] .]
description         GNOME git repository viewer.
long_description    gitg is a fast git repository browser. It currently features: \
                    * Loading large repositories very fast \
                    * Show/browse repository history \
                    * Show highlighted revision diff \
                    * Browse file tree of a revision and export by drag and drop \
                    * Search in the revision history on subject, author or hash \
                    * Switch between history view of branches easily \
                    * Commit view providing per hunk stage/unstage and commit

maintainers         gmail.com:juanrgar openmaintainer
categories          gnome devel
platforms           darwin
homepage            http://www.gnome.org/
master_sites        gnome:sources/${name}/${branch}/

use_xz              yes

checksums           rmd160  0344a5935ee9b2186533dbef01f5a4174b16a0e1 \
                    sha256  c07fc4fc6cef31a06f0b9daa2ed23a5d0f6cb0a10a728324970675fc7001d095

depends_build       port:pkgconfig \
                    port:intltool \
                    port:gnome-common \
                    port:autoconf \
                    port:automake \
                    port:libtool

depends_lib         port:desktop-file-utils \
                    port:gnome-icon-theme \
                    port:gtk3 \
                    port:gtksourceview3 \
                    port:gsettings-desktop-schemas \
                    port:dbus

depends_run         port:gnome-settings-daemon

patchfiles          gitg-commit-view-c.diff

# reconfigure with our intltool.m4 using autogen.sh

configure.cmd       ./autogen.sh

configure.args      --enable-compile-warnings=no \
                    --disable-schemas-compile \
                    --disable-silent-rules

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

livecheck.type  gnome
