[66274] trunk/base/src/port1.0
jmr at macports.org
jmr at macports.org
Wed Apr 7 23:30:32 PDT 2010
Revision: 66274
http://trac.macports.org/changeset/66274
Author: jmr at macports.org
Date: 2010-04-07 23:30:31 -0700 (Wed, 07 Apr 2010)
Log Message:
-----------
make subplatform generally available
Modified Paths:
--------------
trunk/base/src/port1.0/portmain.tcl
trunk/base/src/port1.0/portutil.tcl
Modified: trunk/base/src/port1.0/portmain.tcl
===================================================================
--- trunk/base/src/port1.0/portmain.tcl 2010-04-08 06:28:47 UTC (rev 66273)
+++ trunk/base/src/port1.0/portmain.tcl 2010-04-08 06:30:31 UTC (rev 66274)
@@ -46,7 +46,7 @@
# define options
options prefix name version revision epoch categories maintainers
options long_description description homepage license provides conflicts replaced_by
-options worksrcdir filesdir distname portdbpath libpath distpath sources_conf os.platform os.version os.major os.arch os.endian platforms default_variants install.user install.group macosx_deployment_target
+options worksrcdir filesdir distname portdbpath libpath distpath sources_conf os.platform os.subplatform os.version os.major os.arch os.endian platforms default_variants install.user install.group macosx_deployment_target
options universal_variant os.universal_supported
options supported_archs depends_skip_archcheck
options copy_log_files
@@ -111,8 +111,17 @@
default universal_variant yes
+# sub-platforms of darwin
+if {${os.platform} == "darwin"} {
+ if {[file isdirectory /System/Library/Frameworks/Carbon.framework]} {
+ default os.subplatform macosx
+ } else {
+ default os.subplatform puredarwin
+ }
+}
+
# check if we're on Mac OS X and can therefore build universal
-if {${os.platform} == "darwin" && [file isdirectory /System/Library/Frameworks/Carbon.framework]} {
+if {[info exists os.subplatform] && ${os.subplatform} == "macosx"} {
# the universal variant itself is now created in
# universal_setup, which is called from mportopen
default os.universal_supported yes
Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl 2010-04-08 06:28:47 UTC (rev 66273)
+++ trunk/base/src/port1.0/portutil.tcl 2010-04-08 06:30:31 UTC (rev 66274)
@@ -680,7 +680,7 @@
# Basically, just a fancy 'if', so that Portfiles' platform declarations can
# be more readable, and support arch and version specifics
proc platform {args} {
- global os.platform os.arch os.major
+ global os.platform os.subplatform os.arch os.major
set len [llength $args]
if {$len < 2} {
@@ -698,20 +698,11 @@
}
}
- # sub-platforms of darwin
- if {${os.platform} == "darwin"} {
- if {[file isdirectory /System/Library/Frameworks/Carbon.framework]} {
- set subplatform macosx
- } else {
- set subplatform puredarwin
- }
- }
-
set match 0
# 'os' could be a platform or an arch when it's alone
- if {$len == 2 && ($os == ${os.platform} || ([info exists subplatform] && $os == $subplatform) || $os == ${os.arch})} {
+ if {$len == 2 && ($os == ${os.platform} || ([info exists os.subplatform] && $os == ${os.subplatform}) || $os == ${os.arch})} {
set match 1
- } elseif {($os == ${os.platform} || ([info exists subplatform] && $os == $subplatform))
+ } elseif {($os == ${os.platform} || ([info exists os.subplatform] && $os == ${os.subplatform}))
&& (![info exists release] || ${os.major} == $release)
&& (![info exists arch] || ${os.arch} == $arch)} {
set match 1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100407/99c2749d/attachment-0001.html>
More information about the macports-changes
mailing list