# -*- 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 92587 2012-05-01 20:19:49Z mk@macports.org $

PortSystem          1.0

# See dports/_resources/port1.0/group/kde4-1.1.tcl for more info.
PortGroup           kde4    1.1

fetch.type          git
git.url             git://anongit.kde.org/kmymoney
git.branch          9a70a400fedd6ac704f99c244bd0882da81145b8

name                kmymoney4-devel
version             4.6-20120501

categories          kde kde4 finance
maintainers         mk pixilla openmaintainer

description         KMyMoney version 4 following git master as close as possible.
long_description    KMyMoney is the personal finance manager for KDE. This port is following git master as close as possible.
platforms           darwin
license             GPL-2+

homepage            http://kmymoney2.sourceforge.net/index-home.html
master_sites        sourceforge:kmymoney2

livecheck.type      none

distname            kmymoney

conflicts           kmymoney4

build.asroot        yes

depends_lib-append  port:libofx \
                    port:aqbanking5 \
                    port:kde4-runtime \
                    port:kdepimlibs4 \
                    port:oxygen-icons \
                    port:libalkimia

patch.dir         ${workpath}/${distname}
patch.pre_args    -p1
patchfiles        patch_remove_manpage.diff \
                  patch-CMakeLists_remove_APIDOC.txt.diff
#                  patch-CMakeLists.txt.diff
#                  patch_to_include_datePopup_hideshow.diff

configure.args-append   -DENABLE_KBANKING=ON

variant debug description "Enable debug." {
	configure.args-append  -DCMAKE_BUILD_TYPE=Debugfull
}

#default_variants +no_x11 +no_gtk

variant no_x11 description {build without X11 to avoid unneeded dependencies} {}

variant no_gtk description {build without GTK support to ensure avahi gets build without it, thus avoiding X11 dependencies} {}

post-activate {
    # Calling kbuildsycoca4 in case KDE hasn't called it yet to make sure that plugins are loaded.
    system "${prefix}/bin/kbuildsycoca4"
}
