# -*- 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 91749 2012-04-09 16:35:34Z snc@macports.org $

PortSystem          1.0
PortGroup           kde4   1.1

name                rocs
version             4.8.2
categories          kde kde4
maintainers         snc sharky michaelld
license             GPL-2+ LGPL-2.1 GFDL-1.2
description         Graph Theory IDE
long_description    KDE ${description}
homepage            http://www.kde.org

platforms           darwin
depends_lib-append  port:boost port:libkdeedu

master_sites        kde:stable/${version}/src/
use_xz              yes

checksums           rmd160  d73ec024f0ec940bb8d42162eec8a8fbad4d0c3e \
                    sha256  a39c4287ffefcbe3202b4d7491b7ee961ae2b1396abdedf3ddbec91cd98bf7c9

if {![variant_isset doc]} {
    patchfiles-append   patch-CMakeLists.txt.diff
}

post-build {
    system -W ${workpath}/build/lib "install_name_tool -id ${prefix}/lib/kde4/rocs_GraphStructure.dylib rocs_GraphStructure.dylib"
    system -W ${workpath}/build/lib "install_name_tool -change ${prefix}/lib/rocs_GraphStructure.dylib ${prefix}/lib/kde4/rocs_GraphStructure.dylib rocs_transformedgesplugin.so"
}

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