# -*- 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

PortSystem      1.0

name            agave
version         0.4.7
revision        2
checksums       rmd160  a7d0294ab0ab318f1a654c48059659a50a32283a \
                sha256  ee19f62287d03dfbc41bb2dd86683eb13e3f9664135f4108e9c93e68994402f2 \
                size    500407

license         GPL-2+
categories      graphics gnome
platforms       {darwin < 13}
maintainers     nomaintainer

description     Generate a variety of colorschemes from a single starting color.
long_description \
                Agave is a very simple application for the GNOME desktop that allows you \
                to generate a variety of colorschemes from a single starting color. It is \
                free software licensed under the open-source GPL License.
homepage        https://web.archive.org/web/20170308183221/http://home.gna.org/colorscheme
master_sites    https://web.archive.org/web/20170225200236/http://download.gna.org/colorscheme/releases/

use_bzip2       yes

depends_build   path:bin/pkg-config:pkgconfig \
                port:intltool \
                port:gnome-doc-utils

depends_lib     port:desktop-file-utils \
                port:rarian \
                port:gtkmm \
                port:libglademm \
                port:gconfmm \
                port:libgnomeui \
                port:cppunit \
                port:boost

patchfiles      src_core_compat-round.cc.patch

# TODO: Fix buggy C++ code that clang complains about
compiler.blacklist *clang*

# autoreconf to reconfigure with our intltool.m4
pre-configure {
    file mkdir ${worksrcpath}/m4
}
use_autoreconf      yes
autoreconf.args     -fvi

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

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

livecheck.type  regex
livecheck.url   ${master_sites}
livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
