# -*- 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 103706 2013-03-05 02:22:42Z michaelld@macports.org $

PortSystem          1.0
PortGroup           kde4 1.1

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

homepage            https://launchpad.net/libdbusmenu-qt
platforms           darwin

depends_lib-append  port:qjson

master_sites        ${homepage}/trunk/${version}/+download/
distname            lib${name}-${version}
use_bzip2           yes
checksums           rmd160  e50cbffbf57329a26742ddf32d0f54248fe672cc \
                    sha256  ae6c1cb6da3c683aefed39df3e859537a31d80caa04f3023315ff09e5e8919ec

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       ${homepage}
livecheck.regex     "Latest version is (.*)"
