# -*- 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                kapptemplate
version             4.14.3
revision            3
categories          kde kde4
license             GPL-2+
maintainers         nicos openmaintainer
description         KDE application templates
long_description    ${description}
platforms           darwin
homepage            http://www.kde.org/
master_sites        kde:stable/${version}/src/
use_xz              yes

checksums           rmd160  b89401366382566fc153011a9c724e9e1a5cabf6 \
                    sha256  ba0c2dca9c92dbf1cce194ac4d7e9286bd313dec4b6214c67a8481e65eb43f21

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

depends_lib-append  port:kdelibs4

if {![variant_isset docs]} {
    patchfiles      patch-CMakeLists.diff
}

pre-activate {
    #Deactivate hack for when kdesdk4 port has been fragmented into small ports
    if {[file exists ${prefix}/bin/kdedoc]
        && ![catch {set vers [lindex [registry_active kdesdk4] 0]}] 
        && [vercmp [lindex $vers 1] 4.11.0] < 0} {
            registry_deactivate_composite kdesdk4 "" [list ports_nodepcheck 1] 
    } 
}

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