# $Id$

PortSystem      1.0
PortGroup       cmake 1.0

name            orocos-rtt
version         1.10.2
platforms       darwin
categories      devel graphics
maintainers     nomaintainer
description     Orocos Real-Time Toolkit
license         GPL-2

long_description \
    The Orocos Real-Time Toolkit (RTT) provides a C++ framework, or runtime, \
    targeting the implementation of (realtime and non-realtime) control \
    systems. It is sometimes refered to as the 'Open Real-Time Control \
    Services'.

homepage        http://www.orocos.org/rtt/
master_sites    http://people.mech.kuleuven.be/~orocos/pub/stable/rtt/v${version}/
distname        ${name}-${version}-src

checksums       md5     e0093058c87d7c66d8ab1ad565b9ff91 \
                sha1    ea6510a4f7854ce9f927753156b57a2dfa9da9f7 \
                rmd160  ead2c2381de7bc9ec8fba4447c410d68fcfc988c

worksrcdir      ${name}-${version}

depends_lib     port:boost

post-destroot {
    # ugly code, we should find how to do that directly in CMake.
    set lib ${prefix}/lib/liborocos-rtt-macosx.${version}.dylib
    system "install_name_tool -id ${lib} ${destroot}${lib}"
}

variant corba description {build CORBA support using OmniORB} {
    depends_lib-append           port:omniORB
    configure.args-append       -DENABLE_CORBA=ON \
                                -DCORBA_IMPLEMENTATION=OMNIORB \
                                -DOMNIORB4_DIR=${prefix}/include
}

livecheck.type  regex
livecheck.url   ${master_sites}
livecheck.regex ${name}-(\\d+(?:\\.\\d+)*)