# -*- 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 86503 2011-10-26 21:53:57Z snc@macports.org $

PortSystem          1.0
PortGroup           kde4 1.1

name                dbusmenu-qt
version             0.9.0
categories          devel kde4 kde
maintainers         snc openmaintainer
license             GPL-2
description         expose menus on DBus
long_description    A DBus interface to expose menus on DBus.

homepage            http://gitorious.org/dbusmenu/
platforms           darwin

depends_lib-append  port:qjson

fetch.type          git
git.url             http://git.gitorious.org/dbusmenu/dbusmenu-qt.git
git.branch          ${version}.kde

if {![variant_isset doc]} {
    configure.args-append   -DWITH_DOC=Off
}

post-destroot {
    # CMake is not installing all of the src headers; install them
    # manually here.  Destination directory already exists.
    foreach header [exec find ${worksrcpath}/src -name "*.h" | \
                        sed -e "s@${worksrcpath}/src/@@g" | \
                        grep -v "_p\.h"] {
        xinstall -m 644 -W ${worksrcpath}/src ${header} \
            ${destroot}${prefix}/include/${name}
    }
}

livecheck.type      regex
livecheck.url       http://gitorious.org/dbusmenu/${name}/trees/master
livecheck.regex     >(\\d+(\\.\\d+)+)\\.kde<
