Ticket #32542: auto-compiler-deps.diff
File auto-compiler-deps.diff, 2.8 KB (added by larryv (Lawrence Velázquez), 12 years ago) |
---|
-
trunk/base/src/port1.0/portconfigure.tcl
diff --git a/trunk/base/src/port1.0/portconfigure.tcl b/trunk/base/src/port1.0/portconfigure.tcl
a b 2 2 # portconfigure.tcl 3 3 # $Id$ 4 4 # 5 # Copyright (c) 2007 - 201 2The MacPorts Project5 # Copyright (c) 2007 - 2013 The MacPorts Project 6 6 # Copyright (c) 2007 Markus W. Weissmann <mww@macports.org> 7 7 # Copyright (c) 2002 - 2003 Apple Inc. 8 8 # All rights reserved. … … 190 190 default compiler.fallback {[portconfigure::get_compiler_fallback]} 191 191 default compiler.blacklist {} 192 192 default compiler.whitelist {} 193 option_proc configure.compiler portconfigure::set_compiler_dependencies 193 194 194 195 set_ui_prefix 195 196 … … 388 389 389 390 # check if a compiler comes from a port 390 391 proc portconfigure::compiler_is_port {compiler} { 391 switch $compiler { 392 clang - 393 llvm-gcc-4.2 - 394 gcc-4.2 - 395 gcc-4.0 - 396 gcc-3.3 {return no} 397 default {return yes} 398 } 392 return [info exists portconfigure::compiler_name_map(${compiler})] 399 393 } 400 394 401 395 # maps compiler names to the port that provides them … … 421 415 macports-dragonegg-3.3 dragonegg-3.3 422 416 } 423 417 418 # Add required dependencies when setting compiler. 419 proc portconfigure::set_compiler_dependencies {option action args} { 420 # Lazily process default value on first read only; if default is 421 # overriden, update dependencies on writes instead of reads. 422 if {[string equal "read" ${action}] && 423 (![info exists ::option_defaults(configure.compiler)] || 424 [info exists portconfigure::compiler_port]) 425 } then { 426 return 427 } 428 429 if {[info exists portconfigure::compiler_port]} { 430 depends_lib-delete port:${portconfigure::compiler_port} 431 depends_build-delete port:${portconfigure::compiler_port} 432 depends_skip_archcheck-delete ${portconfigure::compiler_port} 433 } 434 435 # Default value must be substituted before use. 436 set compiler [subst ${::configure.compiler}] 437 if {![portconfigure::compiler_is_port ${compiler}]} { 438 return 439 } 440 variable compiler_port $portconfigure::compiler_name_map(${compiler}) 441 if {[string match "macports-gcc*" ${compiler}]} { 442 depends_lib-append port:${portconfigure::compiler_port} 443 } else { 444 depends_build-append port:${portconfigure::compiler_port} 445 } 446 if {[portconfigure::arch_flag_supported ${compiler}]} { 447 depends_skip_archcheck-append ${portconfigure::compiler_port} 448 } 449 } 450 424 451 # internal function to determine the default compiler 425 452 proc portconfigure::configure_get_default_compiler {args} { 426 453 global compiler.blacklist compiler.whitelist compiler.fallback