Ticket #63523: Portfile.omniORB

File Portfile.omniORB, 4.7 KB (added by lockhart (Thomas Lockhart), 3 years ago)

Updated portfile for the newest version of omniorb and adding support for python 3.7, 3.8, and 3.9

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           conflicts_build 1.0
5
6name                omniORB
7version             4.2.4
8categories          devel
9platforms           darwin
10universal_variant   no
11# executables are GPL, libs are LGPL
12license             {LGPL GPL-2+}
13maintainers         nomaintainer
14
15description         high performance CORBA ORB for C++
16long_description    omniORB is a robust high performance CORBA ORB for C++ and \
17                    Python. omniORB is largely CORBA 2.6 compliant.
18homepage            http://omniorb.sourceforge.net/
19
20conflicts_build     ${name}
21
22master_sites        sourceforge:project/omniorb/omniORB/omniORB-${version}/
23use_bzip2           yes
24checksums           rmd160  bc955f62f794f7c5bea8d74e15e0f6621dbd6c86 \
25                    sha256  28c01cd0df76c1e81524ca369dc9e6e75f57dc70f30688c99c67926e4bdc7a6f \
26                    size    2713397
27
28patchfiles          patch-configure.diff \
29                    src_tool_omniidl_cxx_cccp_config-darwin.h.diff
30post-patch {
31    reinplace "s|\\(\$(CXXLINKOPTIONS)\\)|\\1 [get_canonical_archflags cxx]|g" \
32        ${worksrcpath}/mk/beforeauto.mk.in
33}
34
35configure.args      CC="${configure.cc}" \
36                    CXX="${configure.cxx}" \
37                    CCFLAGS="[get_canonical_archflags cc]" \
38                    EXTRA_GCC_CXXFLAGS="[get_canonical_archflags cxx]" \
39                    --with-omniORB-config="${prefix}/etc/omniORB.cfg" \
40                    --with-omniNames-logdir="${prefix}/var"
41
42if {${build_arch} eq "x86_64" && ${os.platform} eq "darwin"} {
43    configure.args-append --build=${build_arch}-apple-${os.platform}${os.version}
44}
45
46# force a global variable
47set python_framework []
48
49variant python27 conflicts python36 python37 python38 python39 description {Build Python 2.7 IDL support} {
50    configure.python            ${prefix}/bin/python2.7
51    set python_framework        ${frameworks_dir}/Python.framework/Versions/2.7/lib
52    depends_lib-append          port:python27
53    configure.pkg_config_path   ${python_framework}/lib/pkgconfig
54
55    notes "Install py27-omniORBpy for omniORBpy."
56}
57
58variant python36 conflicts python27 python37 python38 python39 description {Build Python 3.6 IDL support} {
59    configure.python            ${prefix}/bin/python3.6
60    set python_framework        ${frameworks_dir}/Python.framework/Versions/3.6/lib
61    depends_lib-append          port:python36
62    configure.pkg_config_path   ${python_framework}/lib/pkgconfig
63
64    notes "Install py36-omniORBpy for omniORBpy."
65}
66
67variant python37 conflicts python27 python36 python38 python39 description {Build Python 3.6 IDL support} {
68    configure.python            ${prefix}/bin/python3.7
69    set python_framework        ${frameworks_dir}/Python.framework/Versions/3.7/lib
70    depends_lib-append          port:python37
71    configure.pkg_config_path   ${python_framework}/lib/pkgconfig
72
73    notes "Install py37-omniORBpy for omniORBpy."
74}
75
76variant python38 conflicts python27 python36 python37 python39 description {Build Python 3.6 IDL support} {
77    configure.python            ${prefix}/bin/python3.8
78    set python_framework        ${frameworks_dir}/Python.framework/Versions/3.8/lib
79    depends_lib-append          port:python38
80    configure.pkg_config_path   ${python_framework}/lib/pkgconfig
81
82    notes "Install py38-omniORBpy for omniORBpy."
83}
84
85variant python39 conflicts python27 python36 python37 python38 description {Build Python 3.6 IDL support} {
86    configure.python            ${prefix}/bin/python3.9
87    set python_framework        ${frameworks_dir}/Python.framework/Versions/3.9/lib
88    depends_lib-append          port:python39
89    configure.pkg_config_path   ${python_framework}/lib/pkgconfig
90
91    notes "Install py39-omniORBpy for omniORBpy."
92}
93
94if {![variant_isset python27] && ![variant_isset python36] && ![variant_isset python37] && ![variant_isset python38]} {
95    default_variants +python39
96}
97
98variant ssl description {Enable SSL support} {
99    configure.args-append   --with-openssl
100    depends_lib-append      path:lib/libssl.dylib:openssl
101}
102
103post-destroot {
104    if {![variant_isset python27]} {
105        # omniORB for python3x installs into /opt/local/lib/python3.x/site-packages/
106        # but omniORBpy installs into /opt/local/Library/Frameworks/Python.framework/Versions/X.Y/
107        # so adjust locations for this package
108        file mkdir [file normalize ${destroot}${python_framework}]
109        file rename [glob ${destroot}${prefix}/lib/python*] ${destroot}${python_framework}
110    }
111}
112
113livecheck.type      regex
114livecheck.url       http://omniorb.sourceforge.net/
115livecheck.regex     "${name}-(\\d+(?:\\.\\d+)*)"