# -*- 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 63075 2010-01-25 16:25:34Z stromnov@macports.org $

PortSystem          1.0

name                omniORB
version             4.1.4
categories          devel
maintainers         stromnov openmaintainer
description         high performance CORBA ORB for C++
long_description    omniORB is a robust high performance CORBA ORB for C++ and \
                    Python. omniORB is largely CORBA 2.6 compliant.
homepage            http://omniorb.sourceforge.net/
platforms           darwin
master_sites        sourceforge:omniorb

checksums           md5     1f6070ff9b6339876976d61981eeaa6a \
                    sha1    7150d999bcef10c6c3cb24725386497c3f338aa1 \
                    rmd160  b84131230c59b1cef8f714ff1545e44f6779ade1

configure.args      --with-omniORB-config="${prefix}/etc/omniORB.cfg" \
                    --with-omniNames-logdir="${prefix}/var"

post-patch {
    reinplace "s|,prefix=\'\$PYTHON_PREFIX\'||g" ${worksrcpath}/configure
    reinplace "s|,prefix=\'\$PYTHON_EXEC_PREFIX\'||g" ${worksrcpath}/configure
}

variant ssl description {Enable SSL support} {
    configure.args-append   --with-openssl
    depends_lib-append      port:openssl
}

if { ![variant_isset python24] && ![variant_isset python25] && ![variant_isset python26]} {
    default_variants        +python26
}

variant python24 description {Enable python support with python 2.4} {
    depends_lib-append      port:python24
    configure.python        ${prefix}/bin/python2.4
}

variant python25 description {Enable python support with python 2.5} {
    depends_lib-append      port:python25
    configure.python        ${prefix}/bin/python2.5
}

variant python26 description {Enable python support with python 2.6} {
    depends_lib-append      port:python26
    configure.python        ${prefix}/bin/python2.6
}

livecheck.type      regex
livecheck.url       http://omniorb.sourceforge.net/releases/
livecheck.regex     "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
