Ticket #55790: Portfile.diff

File Portfile.diff, 2.5 KB (added by lockhart (Thomas Lockhart), 7 years ago)

Support Python 3.6. Remove revision keyword.

  • Portfile

    old new  
    22
    33PortSystem          1.0
    44PortGroup           conflicts_build 1.0
     5PortGroup           active_variants 1.1
    56
    67name                omniORB
    78version             4.2.2
     
    1819homepage            http://omniorb.sourceforge.net/
    1920
    2021conflicts_build     ${name}
    21 depends_lib         port:python27
    2222
    2323master_sites        sourceforge:project/omniorb/omniORB/omniORB-${version}/
    2424use_bzip2           yes
     
    3232        ${worksrcpath}/mk/beforeauto.mk.in
    3333}
    3434
    35 configure.python    ${prefix}/bin/python2.7
    3635configure.args      CC="${configure.cc}" \
    3736                    CXX="${configure.cxx}" \
    3837                    CCFLAGS="[get_canonical_archflags cc]" \
     
    4443    configure.args-append --build=${build_arch}-apple-${os.platform}${os.version}
    4544}
    4645
     46# force a global variable
     47set python_framework []
     48
     49variant python27 conflicts python36 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 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
     64notes "Install py36-omniORBpy for omniORBpy."
     65}
     66
     67if {![variant_isset python27]} {
     68    default_variants +python36
     69}
     70
    4771variant ssl description {Enable SSL support} {
    4872    configure.args-append   --with-openssl
    4973    depends_lib-append      path:lib/libssl.dylib:openssl
    5074}
    5175
    52 notes "
    53 Install py27-omniORBpy for omniORBpy.
    54 "
     76post-destroot {
     77    if {[variant_isset python36]} {
     78        # omniORB installs into /opt/local/lib/python3.6/site-packages/
     79        # but omniORBpy installs into /opt/local/Library/Frameworks/Python.framework/Versions/X.Y/
     80        # so adjust locations for this package
     81        file mkdir [file normalize ${destroot}${python_framework}]
     82        file rename [glob ${destroot}${prefix}/lib/python*] ${destroot}${python_framework}
     83    }
     84}
    5585
    5686livecheck.type      regex
    5787livecheck.url       http://omniorb.sourceforge.net/