# $Id: Portfile 52299 2009-06-13 19:53:00Z illogic-al@macports.org $

PortSystem          1.0
PortGroup           kde4   1.0

name                kdenetwork4
version             4.2.4
categories          kde kde4 network
maintainers         nomaintainer
description         KDE4 networking applications
long_description    Networking applications such as an instant messenger \
                    and download manager
platforms           darwin
homepage            http://www.kde.org
master_sites        kde:stable/${version}/src
use_bzip2           yes
distname            kdenetwork-${version}
checksums           md5     3071bbb1a24c62b81593e76187a84fb6

#patchfiles          libiris-CMakeLists.diff
#patch.dir           ${workpath}/${distname}

depends_lib-append  port:kdebase4-runtime \
                    port:qca path:lib/libspeex.dylib:speex \
                    port:meanwhile port:libotr

configure.args-append   ../${distname} \
                        -DBUILD_kopete=ON -DWITH_jabber=OFF \
                        -DQCA2_LIBRARIES=${prefix}/lib/libqca.2.dylib \
                        -DQCA2_INCLUDE_DIR=${prefix}/include/QtCrypto

variant no_kopete conflicts jabber description "Do not install Kopete instant messaging client" {
    depends_lib-delete      port:qca port:speex port:libotr
    configure.args-delete   -DBUILD_kopete=ON
    configure.args-append   -DBUILD_kopete=OFF
}

# Test if working for 4.2.3 then remove variant
variant jabber conflicts no_kopete description "Enable jabber support in kopete" {
    configure.args-delete   -DWITH_jabber=OFF
    configure.args-append   -DWITH_jabber=ON
}
