# -*- 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 120204 2014-05-19 15:26:03Z nicos@macports.org $

PortSystem          1.0
PortGroup           kde4   1.1

name                kde4-runtime
version             4.12.5
categories          kde kde4
maintainers         nicos
license             GPL-2+ LGPL-2.1+
description         Shared data needed by KDE4 programs
long_description    Provides data which is required by KDE4 applications. \
                    e.g. icons and mimetype data.
platforms           darwin
homepage            http://www.kde.org
master_sites        kde:stable/${version}/src/
use_xz              yes
distname            kde-runtime-${version}

checksums           rmd160  9e5c16749b275c191e6efc4a61e070b8e8c48442 \
                    sha256  b43e1aebd7e9dd13677f2205bb6eef7ee02a7085ae9fd34a39bad55d5df56fe7

#Binaries do not link directly to openssl, nor use the ssl backend of kdelibs4,
#nor links to libkimap or libmailtransport from kdepimlibs4
license_noconflict  openssl

#Fully removing X11 only function to prevent automoc to include it
patchfiles          patch-kwalletd.diff

#Blacklist gcc42 and llvm-gcc-42 (does not build with gcc, ticket #37574)
compiler.blacklist  gcc-4.2 apple-gcc-4.2 llvm-gcc-4.2 macports-llvm-gcc-4.2

depends_lib-append  port:kdelibs4 \
                    port:kdepimlibs4 \
                    port:kactivities \
                    port:nepomuk-core \
                    port:libssh \
                    port:qimageblitz \
                    port:oxygen-icons \
                    port:hicolor-icon-theme \
                    port:exiv2 \
                    port:jpeg \
                    port:openslp \
                    port:redland \
                    port:raptor2 \
                    port:webp \
                    port:bison

depends_run-append  port:virtuoso

#Virtuoso builds only on 64bit, but it is only a runtime dependency, 
#automatically deactivated if not available (ticket #41773)
depends_skip_archcheck  virtuoso

configure.args-append   -DWITH_PulseAudio=OFF \
                        -DXINE_INCLUDE_DIR=\"\" \
                        -DXINE_LIBRARY=\"\" \
                        -DWITH_ALSA=OFF \
                        -DWITH_QZeitgeist=OFF \
                        -DWITH_QNtrack=OFF \
                        -DWITH_Samba=OFF \
                        -DKDEBASE_DISABLE_MULTIMEDIA=ON

variant xine description "Enable xine support" {
# Unsupported. Don't report bugs, unless it comes with a patch :-)
    depends_lib-append      port:xine-lib
    configure.args-delete   -DXINE_INCLUDE_DIR=\"\" \
                            -DXINE_LIBRARY=\"\"
}
if {[variant_isset xine]} {
    # xine-lib is not universal
    universal_variant no
}

post-destroot {
# Remove this file as it conflicts with hicolor-icon-theme
    file delete ${destroot}${prefix}/share/icons/hicolor/index.theme
# Remove this file as it conflicts with kdelibs4
    file delete ${destroot}${prefix}/include/nepomuk/resourcewatcher.h
}

livecheck.url       http://kde.mirrors.hoobly.com/stable/
livecheck.regex     (\\d+(\\.\\d+)+)
