# -*- 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                grisbi
version             1.0.0
revision            4
set branch          [join [lrange [split ${version} .] 0 1] .]
categories          gnome
platforms           darwin
license             GPL-2+
maintainers         nomaintainer

description         Easy Personnal Finance Manager for All.
long_description    Grisbi is a personnal accounting application. \
    Grisbi can manage multiple accounts, currencies and users. It manages \
    third party, expenditure and receipt categories, as well as budgetary \
    lines, financial years, and other informations that makes it quite \
    adapted for associations (except those that require double entry \
    accounting).

homepage            http://www.grisbi.org
master_sites        sourceforge:project/grisbi/grisbi%20stable/${branch}.x

use_bzip2           yes

checksums           rmd160  f428089a2cc0865ce16f499b6c9fccedafac8fd0 \
                    sha256  8a23d26777666814d918702ad9207bac433abd3ac71568d53f7c485670f92c55

depends_build       port:pkgconfig \
                    port:intltool \
                    port:autoconf \
                    port:automake \
                    port:libtool

depends_lib         port:gtk2 \
                    port:libxml2 \
                    port:goffice08 \
                    path:lib/libssl.dylib:openssl

# reconfigure using autogen.sh from upstream git for intltool 0.51 compatibility

post-patch {
    xinstall -m 755 ${filespath}/autogen.sh ${worksrcpath}
}

configure.cmd       ./autogen.sh && ./configure

configure.args      --disable-silent-rules \
                    --without-ofx

default_variants +ofx

variant ofx description {Include LibOFX support} {
    depends_lib-append port:libofx
    configure.args-delete --without-ofx
}

livecheck.regex     /${name}-(\[0-9\]+\\.\[0-9\]*\[02468\](\\.\[0-9\]+)*)${extract.suffix}