# -*- 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 90046 2012-02-20 06:51:52Z ryandesign@macports.org $

PortSystem          1.0
PortGroup           python 1.0

name                py-omniORBpy
version             3.4
categories          python devel
maintainers         stromnov openmaintainer
description         Python bindings for omniORB
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:project/omniorb/omniORBpy/omniORBpy-${version}

distname            omniORBpy-${version}

#use_bzip2           yes
checksums           md5     d054e99c89c20f86927c52010e9e7449 \
                    sha1    e598bd25289d0a2a09da4c7241513202c8b9adb4 \
                    rmd160  5b389a31907510800ef0913e2e3855038e6a4cf9

# Use the python subports feature but omniORBpy uses make
# rather than setup.py for building since there are compiled libraries.
# So the build procedure must unravel the python PortGroup settings
# and revert to values compatible with a make environment.
# Ugly but it works.

python.versions     24 25 26 27
python.default_version 24

if {$subport != $name} {
    depends_lib         port:omniORB \
                        port:python${python.version}

    patchfiles          patch-dir.mk

    use_configure       yes

    build.type          gnu
    build.cmd           make
    build.target        all
    build.args          {}

    destroot.cmd        ${build.cmd}
    destroot.target     install
    destroot.args       {}
    destroot.destdir    DESTDIR=${destroot}

    variant ssl description {Enable SSL support} {
        configure.args-append   --with-openssl
        depends_lib-append      port:openssl
    }
    livecheck.type      none
} else {
    livecheck.type      regex
    livecheck.url       http://omniorb.sourceforge.net/releases/
    livecheck.regex     "omniORBpy-(\\d+(?:\\.\\d+)*)${extract.suffix}"
}
