# -*- 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 108298 2013-07-18 01:45:32Z devans@macports.org $

PortSystem      1.0

name            balsa
version         2.5.0
license         GPL-3
description     GNOME e-mail client
long_description \
                Balsa is an e-mail client for GNOME, highly \
                configurable and incorporating all the features \
                you would expect in a robust mail client.
maintainers     nomaintainer
categories      gnome mail
platforms       darwin
homepage        http://pawsa.fedorapeople.org/balsa/

use_bzip2       yes

master_sites    ${homepage}

checksums       sha256  67eaddbc33a079a74b65bf5f71ef163573f7d4a6f29ed6dca2ad6811d95519b4 \
                rmd160  cc82aab6efd34a8cbc7fbb949c6ace8f10103f13

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

depends_lib     port:desktop-file-utils \
                port:rarian \
                port:gtk3 \
                port:gmime \
                port:gpgme \
                port:gtksourceview3 \
                port:libesmtp \
                port:libsecret \
                port:libxml2 \
                port:openssl \
                port:pcre \
                port:sqlite3 \
                port:compface \
                port:enchant

depends_run     port:gnome-settings-daemon \
                port:yelp
                
patchfiles      patch-src-sendmsg-window.c.diff

configure.args  --with-gpgme \
                --with-gmime=2.6 \
                --with-gtksourceview \
                --with-html-widget=no \
                --with-ssl \
                --with-sqlite \
                --with-esmtp \
                --with-libsecret \
                --with-compface \
                --without-libnotify \
                --without-gnome \
                --without-nm \
                --enable-pcre \
                --disable-silent-rules

configure.cflags-append -D_DARWIN_C_SOURCE

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

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