# -*- 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
PortGroup           boost   1.0

name                kdepimlibs4
version             4.14.3
revision            17
categories          kde kde4
maintainers         nomaintainer
license             GPL-2+ LGPL-2+ BSD
description         KDE4 core PIM libraries
long_description    Core libraries necessary for Personal Information Management (PIM) in KDE4
homepage            https://www.kde.org
master_sites        kde:stable/${version}/src/
use_xz              yes
distname            kdepimlibs-${version}

checksums           rmd160  95af39ad4848fe48efbd4e3be8b4b0767530ec60 \
                    sha256  65edb1bec191be1b6f8450dc71eadae734f4ab0585aab0a885207390399868d7 \
                    size    2790888

#The only binaries linking to openssl (through QtNetwork) are libkimap.dylib
#and libmailtransport.dylib, which are purely LPGL, thus not conflicting with
#openssl license, apart from plugins in kioslaves
license_noconflict  openssl

depends_lib-append  port:akonadi \
                    port:cyrus-sasl2 \
                    port:gpgme \
                    port:kdelibs4 \
                    port:libical \
                    port:libxml2 \
                    port:libxslt \
                    path:lib/libldap.dylib:openldap \
                    port:ossp-uuid \
                    port:perl5 \
                    port:prison \
                    port:qjson \
                    port:shared-mime-info

#Suppress build of kioslaves which conflict with openssl
patchfiles-append   patch-CMakeLists.diff \
                    patch-do_not_include_cpp.diff \
                    patch-ical.diff \
                    patch-tests.diff

compiler.cxx_standard   2011

configure.args-append   -DMAILTRANSPORT_INPROCESS_SMTP=Off \
                        -DCMAKE_CXX_FLAGS=\"-std=c++11\"

subport kdepimlibs4-kioslaves {

    #kioslaves components conflict with openssl license
    license_noconflict-delete   openssl

    #The main kdepimlibs4 is required for linking with other libraries
    depends_lib-append  port:kdepimlibs4

    #Builds only kioslaves components
    patchfiles-delete   patch-CMakeLists.diff
    patchfiles-append   patch-CMakeLists-kioslaves.diff

    #Suppresses files already installed by kdepimlibs4 main port
    post-destroot {
        delete ${destroot}${prefix}/share/mime/packages/kdepimlibs-mime.xml
    }
}

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