# -*- 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 140960 2015-10-06 20:13:45Z michaelld@macports.org $

PortSystem          1.0
PortGroup           kde4 1.1

name                attica
version             0.4.2
revision            3
categories          kde kde4
maintainers         nomaintainer
license             LGPL-2.1
description         Qt library for Open Collaboration Services API 1.4
long_description    ${name} is a ${description}
homepage            https://www.kde.org
master_sites        kde:stable/${name}
use_bzip2           yes
worksrcdir          ${name}-${version}
checksums           rmd160  fae94a0a9b9064b3e25a00a759e2ef450bffe7d8 \
                    sha256  3b9c53770862c0b21b7af7ea15951c35831126022bb8d052760d9cf8bd7ee4f8 \
                    size    57093

depends_lib-delete  port:phonon

# install the headerfiles where they won't clash with those from kf5-attica
patchfiles-append   patch-includedir.diff
post-patch {
    reinplace -W ${worksrcpath} "s|@IPREFIX@|/${kde4.include_prefix}|g" \
                    lib/CMakeLists.txt lib/cmake/libattica.pc.cmake
}

configure.args-append \
                    -DQT4_BUILD:BOOL=On

post-destroot {
    ln -s libattica.0.4.dylib ${destroot}${prefix}/lib/libattica.0.dylib
}

platform darwin 8 {
    configure.ldflags-append    -lz -lssl -lcrypto
}

livecheck.url       http://kde.mirrors.hoobly.com/stable/${name}
livecheck.regex     attica-(\\d+\\.\\d+\\.\\d+)
