# -*- 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

PortSystem          1.0
PortGroup           kde4   1.1

name                nepomuk-core
version             4.14.3
revision            10
categories          kde kde4
maintainers         {nicos @NicosPavlov} openmaintainer
license             GPL-2+ LGPL-2.1+
description         Nepomuk-core contains the Semantik Desktop core libraries.
long_description    ${description}  This includes central services like file \
                    indexing, file system monitoring, query, and of course storage, \
                    as well as the corresponding client libraries.
platforms           darwin
homepage            https://www.kde.org
master_sites        kde:stable/${version}/src/
use_xz              yes
checksums           rmd160  8d971b8ac8c44b11576a91153414b227a044abb1 \
                    sha256  74e725577f2f513c577c138e395448c3ca451cd894e35e14017b4b3ce63eab3d

#Binaries do not link to openssl, nor use the ssl backend of kdelibs4
license_noconflict  openssl

depends_lib-append  port:exiv2 \
                    path:lib/libavcodec.dylib:ffmpeg \
                    port:taglib \
                    port:kdelibs4 \
                    port:ebook-tools \
                    port:mobipocket \
                    port:kfilemetadata

patchfiles-append   patch-cmake-baloo.diff \
                    patch-nepomuk-make-daemons-agents.diff \
                    patch-CMakeLists-visibility.diff \
                    patch-CMakelists.diff

pre-activate {
    #Deactivate hack for when nepomuk-core was splitted from kde4-runtime
    if {[file exists ${applications_dir}/KDE4/nepomukbackup.app/Contents/Info.plist] 
        && ![catch {set vers [lindex [registry_active kde4-runtime] 0]}] 
        && [vercmp [lindex $vers 1] 4.9.3] < 0} {
            registry_deactivate_composite kde4-runtime "" [list ports_nodepcheck 1] 
    } 
}

variant baloo description "Add support for baloo indexing" {
    depends_lib-append  port:baloo
    patchfiles-delete   patch-cmake-baloo.diff
}

livecheck.url       ${kde4.mirror}
livecheck.regex     (\\d+(\\.\\d+)+)
