Ticket #53302: Portfile.diff

File Portfile.diff, 2.6 KB (added by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), 8 years ago)
  • Portfile

    old new  
    175175
    176176    if {[variant_isset python27]} {
    177177        set PYTHON_VERSION_WITH_DOT "2.7"
    178     } else {
     178    } elseif {[variant_isset python34]} {
    179179        set PYTHON_VERSION_WITH_DOT "3.4"
     180    } elseif {[variant_isset python35]} {
     181        set PYTHON_VERSION_WITH_DOT "3.5"
     182    } else {
     183        set PYTHON_VERSION_WITH_DOT "3.6"
    180184    }
    181185    reinplace "s|__PYTHON_VERSION_WITH_DOT__|${PYTHON_VERSION_WITH_DOT}|g" ${worksrcpath}/macports.cmake
    182186}
     
    276280        --sphinx-html
    277281}
    278282
    279 variant python27 conflicts python34 requires docs description {Build documentation using Sphinx from Python 2.7} {
     283variant python27 conflicts python34 python35 python36 requires docs description {Build documentation using Sphinx from Python 2.7} {
    280284    depends_build-append port:py27-sphinx
    281285    configure.args-append \
    282286        --sphinx-build=${prefix}/bin/sphinx-build-2.7
    283287}
    284288
    285 variant python34 conflicts python27 requires docs description {Build documentation using Sphinx from Python 3.4} {
     289variant python34 conflicts python27 python35 python36 requires docs description {Build documentation using Sphinx from Python 3.4} {
    286290    depends_build-append port:py34-sphinx
    287291    configure.args-append \
    288292        --sphinx-build=${prefix}/bin/sphinx-build-3.4
    289293}
    290294
     295variant python35 conflicts python27 python34 python36 requires docs description {Build documentation using Sphinx from Python 3.5} {
     296    depends_build-append port:py35-sphinx
     297    configure.args-append \
     298        --sphinx-build=${prefix}/bin/sphinx-build-3.5
     299}
     300
     301variant python36 conflicts python27 python34 python35 requires docs description {Build documentation using Sphinx from Python 3.6} {
     302    depends_build-append port:py36-sphinx
     303    configure.args-append \
     304        --sphinx-build=${prefix}/bin/sphinx-build-3.6
     305}
     306
    291307if {[variant_isset docs]} {
    292     if {![variant_isset python27] && ![variant_isset python34]} {
     308    if {![variant_isset python27] && ![variant_isset python34] && ![variant_isset python35] && ![variant_isset python36]} {
    293309        default_variants +python27
    294310    }
    295311
    296     if {![variant_isset python27] && ![variant_isset python34]} {
    297         ui_error "\n\nYou must select either the +python27 or +python34 variant when using variant +docs.\n"
     312    if {![variant_isset python27] && ![variant_isset python34] && ![variant_isset python35] && ![variant_isset python36]} {
     313        ui_error "\n\nYou must select either the +python27, +python34, +python35, or +python36 variant when using variant +docs.\n"
    298314        return -code error "Invalid variant selection"
    299315    }
    300316}