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
|
|
|
383 | 383 | variant $platform $code |
384 | 384 | |
385 | 385 | # Set the variant if this platform matches the platform we're on |
| 386 | set matches 1 |
386 | 387 | if {[info exists os.platform] && ${os.platform} == $os} { |
387 | 388 | set sel_platform $os |
388 | 389 | if {[info exists os.version] && [info exists release]} { |
389 | 390 | regexp {([0-9]*)[0-9\.]?} ${os.version} match major |
390 | 391 | if {$major == $release } { |
391 | | set sel_platform ${sel_platform}_${release} |
| 392 | set sel_platform ${sel_platform}_${release} |
| 393 | } else { |
| 394 | set matches 0 |
392 | 395 | } |
393 | 396 | } |
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 | } |
398 | 407 | } |
399 | | |
400 | 408 | } |
401 | 409 | |
402 | 410 | ########### Misc Utility Functions ########### |