Ignore:
Timestamp:
Dec 15, 2010, 7:33:15 PM (9 years ago)
Author:
ryandesign@…
Message:

xcodeversion-1.0.tcl: check for existence of Xcode before trying to check its version; see #27682

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/_resources/port1.0/group/xcodeversion-1.0.tcl

    r70807 r74403  
    4646platform macosx {
    4747    pre-extract {
    48         set current_xcodeversion [exec defaults read ${developer_dir}/Applications/Xcode.app/Contents/Info CFBundleShortVersionString]
     48        set xcode_app ${developer_dir}/Applications/Xcode.app
     49        if {![file exists ${xcode_app}]} {
     50            ui_error "Couldn't find Xcode; expected it to be at ${xcode_app}."
     51            ui_error ""
     52            ui_error "If you have not installed Xcode, install it now; see:"
     53            ui_error "http://guide.macports.org/chunked/installing.xcode.html"
     54            ui_error ""
     55            ui_error "If you have installed Xcode in a nonstandard location, inform MacPorts"
     56            ui_error "of that location by changing the 'developer_dir' variable in"
     57            ui_error "${prefix}/etc/macports/macports.conf"
     58            ui_error ""
     59            return -code error "unable to find Xcode"
     60        }
     61        set current_xcodeversion [exec defaults read ${xcode_app}/Contents/Info CFBundleShortVersionString]
    4962        foreach {darwin_major minimum_xcodeversion} [join ${minimum_xcodeversions}] {
    5063            if {${darwin_major} == ${os.major}} {
    5164                if {[rpm-vercomp ${current_xcodeversion} ${minimum_xcodeversion}] < 0} {
    52                     ui_msg "On Mac OS X ${macosx_version}, ${name} ${version} requires Xcode ${minimum_xcodeversion} or later but you have Xcode ${current_xcodeversion}."
     65                    ui_error "On Mac OS X ${macosx_version}, ${name} ${version} requires Xcode ${minimum_xcodeversion} or later but you have Xcode ${current_xcodeversion}."
    5366                    return -code error "incompatible Xcode version"
    5467                }
Note: See TracChangeset for help on using the changeset viewer.