# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 78462 2011-05-08 13:53:08Z snc@macports.org $

PortSystem          1.0
PortGroup           kde4    1.1

name                akonadi
version             1.5.3
categories          devel kde kde4
maintainers         nomaintainer
description         A personal information management storage service.
long_description    Akonadi is an extensible cross-desktop storage service \
for PIM data and metadata providing concurrent read, write, and query access.
platforms           darwin
homepage            http://pim.kde.org/akonadi/
master_sites        http://download.akonadi-project.org/
use_bzip2           yes

checksums           sha1    37764e0e5bc4769ce691e32a771966278e6c1084 \
                    rmd160  be3213f03dff13bdfeb16f78398a405af0b269ac

depends_lib-append  port:soprano \
					port:boost \
                    port:shared-mime-info

depends_run-append  path:libexec/mysqld:mysql5-server

post-patch {
    # fix '#include "utils.h"' -> "src/utils.h" to avoid a conflict
    # with the 'utils.h' header installed by the cdparanoia port
    fs-traverse item ${workpath}/${distname} {
        if {[file isfile ${item}]} {
            reinplace "/include/s@\\(utils\\.h\\)@src/\\1@g" ${item}
        }
    }
}

platform darwin 9 {
    if {[info exists universal_target] && ${universal_target} == "10.4"} {
# Needed if compiling for 10.4 universal on 10.5
        post-configure {
            reinplace "s|#define HAVE_EXECINFO_H 1||" ${workpath}/build/config-akonadi.h
        }
    }
}

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