[78033] trunk/dports/_resources/port1.0/group/xcodeversion-1.0.tcl
jmr at macports.org
jmr at macports.org
Wed Apr 20 01:31:20 PDT 2011
Revision: 78033
http://trac.macports.org/changeset/78033
Author: jmr at macports.org
Date: 2011-04-20 01:31:20 -0700 (Wed, 20 Apr 2011)
Log Message:
-----------
xcodeversion portgroup: use existing xcodeversion variable instead of extracting it from Xcode.app manually (#29214)
Modified Paths:
--------------
trunk/dports/_resources/port1.0/group/xcodeversion-1.0.tcl
Modified: trunk/dports/_resources/port1.0/group/xcodeversion-1.0.tcl
===================================================================
--- trunk/dports/_resources/port1.0/group/xcodeversion-1.0.tcl 2011-04-20 08:29:49 UTC (rev 78032)
+++ trunk/dports/_resources/port1.0/group/xcodeversion-1.0.tcl 2011-04-20 08:31:20 UTC (rev 78033)
@@ -45,24 +45,18 @@
platform macosx {
pre-extract {
- set xcode_app ${developer_dir}/Applications/Xcode.app
- if {![file exists ${xcode_app}]} {
- ui_error "Couldn't find Xcode; expected it to be at ${xcode_app}."
+ if {![info exists xcodeversion] || $xcodeversion == "none"} {
+ ui_error "Couldn't determine your Xcode version (from '/usr/bin/xcodebuild -version')."
ui_error ""
ui_error "If you have not installed Xcode, install it now; see:"
ui_error "http://guide.macports.org/chunked/installing.xcode.html"
ui_error ""
- ui_error "If you have installed Xcode in a nonstandard location, inform MacPorts"
- ui_error "of that location by changing the 'developer_dir' variable in"
- ui_error "${prefix}/etc/macports/macports.conf"
- ui_error ""
return -code error "unable to find Xcode"
}
- set current_xcodeversion [exec defaults read ${xcode_app}/Contents/Info CFBundleShortVersionString]
foreach {darwin_major minimum_xcodeversion} [join ${minimum_xcodeversions}] {
if {${darwin_major} == ${os.major}} {
- if {[rpm-vercomp ${current_xcodeversion} ${minimum_xcodeversion}] < 0} {
- ui_error "On Mac OS X ${macosx_version}, ${name} ${version} requires Xcode ${minimum_xcodeversion} or later but you have Xcode ${current_xcodeversion}."
+ if {[rpm-vercomp ${xcodeversion} ${minimum_xcodeversion}] < 0} {
+ ui_error "On Mac OS X ${macosx_version}, ${name} ${version} requires Xcode ${minimum_xcodeversion} or later but you have Xcode ${xcodeversion}."
return -code error "incompatible Xcode version"
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110420/2dd3ba09/attachment.html>
More information about the macports-changes
mailing list