Ticket #55791: Portfile.diff

File Portfile.diff, 2.0 KB (added by lockhart (Thomas Lockhart), 6 years ago)

Support Python 3.6 in addition to 2.7.

  • Portfile

    old new  
    11# -*- 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
    22
    33PortSystem          1.0
    4 #PortGroup           active_variants 1.1
     4PortGroup           active_variants 1.1
    55PortGroup           python 1.0
    66
    77name                py-omniORBpy
    88version             4.2.2
     9python.versions     27 36
     10python.default_version 36
    911categories-append   devel
    1012license             LGPL-2.1
    1113platforms           darwin
     
    3436# and revert to values compatible with a make environment.
    3537# Ugly but it works.
    3638
    37 python.versions     27
    38 
    3939if {${name} ne ${subport}} {
    4040    depends_lib-append  port:omniORB
    4141
    4242    # omniORB is not universal
    4343    universal_variant   no
    4444
    45     # omniORB @4.2.0_1 uses Python 2.7 unconditionally.
    46     #require_active_variants omniORB python${python.version}
     45    # The omniORB @4.2.0_1 port (and earlier) used Python 2.7 unconditionally.
     46    require_active_variants omniORB python${python.version}
    4747
    4848    patchfiles          patch-dir.mk
    4949
     
    7575        depends_lib-append      path:lib/libssl.dylib:openssl
    7676    }
    7777
     78    post-destroot {
     79        if {${python.version} != 27} {
     80            # create a directory under /opt/local/Library/Frameworks/Python.framework/
     81            file mkdir ${destroot}${python.pkgd}
     82            # remove only the lowest-level directory to allow a directory copy...
     83            file delete ${destroot}${python.pkgd}
     84            file rename [glob ${destroot}${prefix}/lib/python*/site-packages] ${destroot}${python.pkgd}
     85            # omniORB already installs an empty __init__.py
     86            file delete [glob ${destroot}${python.pkgd}/omniidl_be/__init__.py]
     87            file delete [glob ${destroot}${python.pkgd}/omniidl_be/__pycache__/__init__*.pyc]
     88        }
     89    }
     90
    7891    livecheck.type      none
    7992} else {
    8093    livecheck.type      regex