Ticket #63524: Portfile.omniORBpy

File Portfile.omniORBpy, 3.3 KB (added by lockhart (Thomas Lockhart), 3 years ago)

Portfile including updates to the omniORBpy version and for recent versions of Python.

Line 
1# -*- 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
2
3PortSystem          1.0
4PortGroup           python 1.0
5PortGroup           active_variants 1.1
6
7name                py-omniORBpy
8version             4.2.4
9python.versions     27 36 37 38 39
10# python.default_version 39
11categories-append   devel
12license             LGPL-2.1
13platforms           darwin
14supported_archs     i386 x86_64
15
16maintainers         nomaintainer
17
18description         Python bindings for omniORB
19
20long_description    omniORB is a robust high performance CORBA ORB for C++ and \
21                    Python. omniORB is largely CORBA 2.6 compliant.
22
23homepage            http://omniorb.sourceforge.net/
24master_sites        sourceforge:project/omniorb/omniORBpy/omniORBpy-${version}
25
26distname            omniORBpy-${version}
27
28checksums           rmd160  64f6030d475c2a0c0f1d71f99ab13aac78150df6 \
29                    sha256  dae8d867559cc934002b756bc01ad7fabbc63f19c2d52f755369989a7a1d27b6 \
30                    size    663326
31
32use_bzip2           yes
33
34# Use the python subports feature but omniORBpy uses make
35# rather than setup.py for building since there are compiled libraries.
36# So the build procedure must unravel the python PortGroup settings
37# and revert to values compatible with a make environment.
38# Ugly but it works.
39
40if {${name} ne ${subport}} {
41    depends_lib-append  port:omniORB
42    # omniORB is not universal
43    universal_variant   no
44    require_active_variants omniORB python${python.version}
45
46    patchfiles          patch-dir.mk
47
48    post-patch {
49        # python libraries (PYTHON_PREFIX)
50        reinplace "s|get_python_lib(0,\[^)\]*)|get_python_lib()|g" \
51            ${worksrcpath}/configure
52        # compiled libraries to support python (PYTHON_EXEC_PREFIX)
53        reinplace "s|get_python_lib(1,\[^)\]*)|get_python_lib()|g" \
54            ${worksrcpath}/configure
55    }
56
57    use_configure       yes
58    configure.python    ${python.bin}
59
60    build.type          gnu
61    build.cmd           make
62    build.target        all
63    build.args          {}
64
65    destroot.cmd        ${build.cmd}
66    destroot.target     install
67    destroot.args       {}
68    destroot.destdir    DESTDIR=${destroot}
69
70    variant ssl description {Enable SSL support} {
71        configure.args-append   --with-openssl
72        depends_lib-append      path:lib/libssl.dylib:openssl
73    }
74
75    post-destroot {
76        if {${python.version} != 27} {
77            # create a directory under /opt/local/Library/Frameworks/Python.framework/
78            file mkdir ${destroot}${python.pkgd}
79            # remove only the lowest-level directory to allow a directory copy...
80            file delete ${destroot}${python.pkgd}
81            file rename [glob ${destroot}${prefix}/lib/python*/site-packages] ${destroot}${python.pkgd}
82            # omniORB already installs an empty __init__.py
83            file delete [glob ${destroot}${python.pkgd}/omniidl_be/__init__.py]
84            file delete [glob ${destroot}${python.pkgd}/omniidl_be/__pycache__/__init__*.pyc]
85        }
86    }
87
88    livecheck.type      none
89} else {
90    livecheck.type      regex
91    livecheck.url       http://sourceforge.net/projects/omniorb/files/omniORBpy/
92    livecheck.regex     "/omniorb/files/omniORBpy/omniORBpy-(\\d+\\.\\d+(?:\\.\\d+)*)/"
93}