# -*- 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 108101 2013-07-12 23:12:56Z devans@macports.org $

PortSystem      1.0

name            seahorse
version         2.32.0
license         GPL-2+ LGPL-2+ GFDL-1.1+
set branch      [join [lrange [split ${version} .] 0 1] .]
description     Seahorse is a GNOME application for managing encryption keys.
long_description \
                Seahorse is a GNOME application for managing encryption keys. \
                It also integrates with nautilus, gedit, epiphany and other \
                GNOME desktop applications to provide encryption facilities.
maintainers     devans openmaintainer
categories      gnome crypto
platforms       darwin
homepage        http://projects.gnome.org/${name}/
master_sites    gnome:sources/${name}/${branch}/

use_bzip2       yes

checksums       rmd160  5599cf02321be038d8aa5bc96174e2cf05c62945 \
                sha256  f55468237246a485317d59e2fbc1b1ef5f5bd4c5a7b9ff6f40c3d921af0ed52d

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

depends_lib     port:desktop-file-utils \
                port:gtk2 \
                port:gpgme \
                port:openldap \
                port:libsoup \
                port:libgnome-keyring \
                port:dbus-glib \
                port:libnotify \
                port:gnome-keyring \
                port:openssh \
                port:gconf \
                port:gobject-introspection

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

configure.args  --enable-introspection=yes \
                --disable-sharing \
                --disable-silent-rules \
                --disable-update-mime-database \
                --disable-schemas-install \
                --disable-scrollkeeper

patchfiles      automake-1.13.patch \
                gir.patch

use_autoreconf  yes
autoreconf.args -fvi

# gobject-introspection uses g-ir-scanner, which uses $CC from env
build.args-append       CC="${configure.cc} ${configure.cc_archflags}"
destroot.args-append    CC="${configure.cc} ${configure.cc_archflags}"

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

livecheck.type  gnome
