Ignore:
Timestamp:
Apr 14, 2007, 3:34:33 AM (11 years ago)
Author:
pguyot@…
Message:

New option universal_variant to disable the automatic addition of the universal variant on MacOS X, with new tests to test this behavior.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portutil.tcl

    r23700 r23968  
    402402   
    403403    set variations($name) -
     404}
     405
     406# variant_undef name
     407# Undefine a variant for the current portfile.
     408proc variant_undef {name} {
     409    global variations PortInfo
     410   
     411    # Remove it from the list of selected variations.
     412    array unset variations $name
     413
     414        # Remove the variant from the portinfo.
     415        if {[info exists PortInfo(variants)]} {
     416                set variant_index [lsearch -exact $PortInfo(variants) $name]
     417                if {$variant_index >= 0} {
     418                        set new_list [lreplace $PortInfo(variants) $variant_index $variant_index]
     419                        if {"$new_list" == {}} {
     420                                unset PortInfo(variants)
     421                        } else {
     422                                set PortInfo(variants) $new_list
     423                        }
     424                }
     425        }
    404426}
    405427
Note: See TracChangeset for help on using the changeset viewer.