Ticket #46570: patch-portgroup-perl5.diff

File patch-portgroup-perl5.diff, 1.7 KB (added by pixilla (Bradley Giesbrecht), 10 years ago)
  • _resources/port1.0/group/perl5-1.0.tcl

     
    7777
    7878# Set perl variant options and defaults
    7979options perl5.default_variant perl5.variant perl5.set_default_variant perl5.conflict_variants perl5.require_variant
     80# The default variant derived from perl5.default_branch if not set in Portfile.
    8081default perl5.default_variant {[string map {. _} perl${perl5.default_branch}]}
    81 default perl5.variant {[string map {. _} perl${perl5.major}]}
     82# The name of the selected variant or empty if there is not one.
     83default perl5.variant {}
     84# Control whether to set a default perl variant or not.
    8285default perl5.set_default_variant {true}
     86# Control whether to conflict the perl variants or not. Probably almost always true.
    8387default perl5.conflict_variants {true}
     88# Control whether a perl variant is required and if true produce an error if a perl variant is not set.
    8489default perl5.require_variant {false}
    8590# Get variant names from branches
    8691proc perl5.get_variant_names {branches} {
     
    108113        }
    109114    }
    110115# Set default perl variant
    111     if {${perl5.default_variant} eq ${perl5.variant} && ${perl5.set_default_variant}} {
    112         default_variants-append +${perl5.variant}
     116    if {${perl5.variant} eq {} && ${perl5.set_default_variant}} {
     117        default_variants-append +${perl5.default_variant}
     118        if {[variant_isset ${perl5.default_variant}]} {
     119            perl5.variant ${perl5.default_variant}
     120        }
    113121    }
    114122# Require perl variant
    115123    if {![variant_isset ${perl5.variant}] && ${perl5.require_variant}} {