# -*- 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 91481 2012-04-02 23:21:52Z ryandesign@macports.org $

PortSystem          1.0

name                notmuch
version             0.11
categories          mail
platforms           darwin
license             GPL-3
maintainers         yeled
description         The mail indexer
long_description    "Not much mail" is what Notmuch thinks about your email\
                    collection. Even if you receive 12000 messages per month or have on the\
                    order of millions of messages that you've been saving for decades.\
                    Regardless, Notmuch will be able to quickly search all of it. It's just\
                    plain not much mail.

homepage            http://notmuchmail.org/
master_sites        http://notmuchmail.org/releases/
checksums           md5     f5d0d3de3b9948de11e48e3bbc849183 \
                    sha1    11eb1d967af089ed36f6816f61ebae308bc19339 \
                    rmd160  184ba8a7589d499ae18b8ec61c1cc05c1b1b2d1e

depends_build       port:pkgconfig

depends_lib         port:xapian-bindings\
                    port:gmime\
                    port:talloc

configure.args      --without-emacs

post-configure  {
                    reinplace "s|install_name \$(SONAME)|install_name \$(libdir)/\$(SONAME)|g" "${worksrcpath}/lib/Makefile.local"
                    reinplace "s|libnotmuch.so.2|${prefix}/lib/libnotmuch.2.dylib|g" "${worksrcpath}/bindings/python/notmuch/globals.py"
}

variant emacs description {EMACS support} {
                    depends_lib-append      port:emacs
}

variant python description {install the python bindings } {
}
