Ticket #12081: portinfovariants.patch

File portinfovariants.patch, 1.0 KB (added by gwhitney, 17 years ago)

patch suggested for this RFE

  • src/port1.0/portutil.tcl

     
    13731373}
    13741374
    13751375proc variant_run {ditem} {
     1376    global PortInfo
    13761377    set name [ditem_key $ditem name]
    13771378    ui_debug "Executing variant $name provides [ditem_key $ditem provides]"
    13781379   
     
    13911392        ui_error "Error executing $name: $result"
    13921393        return 1
    13931394    }
     1395    # Update the long description to show that the variant is active
     1396    if {[string first [option os.platform] $name] != 0
     1397           && $name != [option os.arch]
     1398           && [info exists PortInfo(long_description)]} {
     1399        set terminator "."
     1400        if {[info exists PortInfo(variant_desc)]} {
     1401            array set descs $PortInfo(variant_desc)
     1402            if {[info exists descs($name)]} {
     1403                set terminator ": $descs($name)\n"
     1404            }
     1405        }
     1406        set PortInfo(long_description) [concat $PortInfo(long_description) "\n(+$name active$terminator)\n"]
     1407    }
    13941408    return 0
    13951409}