Ticket #1393: portutil.tcl.diff

File portutil.tcl.diff, 1.3 KB (added by pguyot (Paul Guyot), 21 years ago)

Patch to portutil.tcl to fix the problem

  • portutil.tcl

    RCS file: /Volumes/src/cvs/od/proj/darwinports/base/src/port1.0/portutil.tcl,v
    retrieving revision 1.156
    diff -u -r1.156 portutil.tcl
     
    383383    variant $platform $code
    384384   
    385385    # Set the variant if this platform matches the platform we're on
     386    set matches 1
    386387    if {[info exists os.platform] && ${os.platform} == $os} {
    387388        set sel_platform $os
    388389        if {[info exists os.version] && [info exists release]} {
    389390            regexp {([0-9]*)[0-9\.]?} ${os.version} match major
    390391            if {$major == $release } {
    391                 set sel_platform ${sel_platform}_${release}
     392                set sel_platform ${sel_platform}_${release}
     393            } else {
     394                    set matches 0
    392395            }
    393396        }
    394         if {[info exists os.arch] && [info exists arch] && ${os.arch} == $arch} {
    395             set sel_platform $arch
    396         }
    397         variant_set $sel_platform
     397        if {$matches == 1 && [info exists arch] && [info exists os.arch]} {
     398                if {${os.arch} == $arch} {
     399                        set sel_platform ${sel_platform}_${arch}
     400                } else {
     401                        set matches 0
     402                }
     403    }
     404    if {$matches == 1} {
     405        variant_set $sel_platform
     406    }
    398407    }
    399    
    400408}
    401409
    402410########### Misc Utility Functions ###########