Ticket #12794: macports-versions.patch
File macports-versions.patch, 1.1 KB (added by afb@…, 16 years ago) |
---|
-
src/port/port.tcl
1663 1663 } 1664 1664 1665 1665 1666 proc macosx_version {} { 1667 return [exec /bin/sh -c "/usr/bin/sw_vers | sed -n 's/^ProductVersion:\[\[:space:\]\]//p' | cut -f 1-3 -d."] 1668 } 1669 1670 proc xcode_version {} { 1671 return [exec /bin/sh -c "tr -d '\\r\\n' < /Developer/Applications/Xcode.app/Contents/version.plist | sed -e 's/.*<key>CFBundleShortVersionString<\\/key>.<string>\\(\[0-9.\]*\\)<\\/string>.*/\\1/'"] 1672 } 1673 1666 1674 proc action_platform { action portlist opts } { 1667 1675 # global os.platform os.major os.arch 1668 1676 global tcl_platform … … 1674 1682 set os_major [lindex [split $tcl_platform(osVersion) .] 0] 1675 1683 # puts "Platform: ${os.platform} ${os.major} ${os.arch}" 1676 1684 puts "Platform: ${os_platform} ${os_major} ${os_arch}" 1685 1686 # check for macosx with the same hack that the implicit variant does 1687 if {[file isdirectory /System/Library/Frameworks/Carbon.framework]} { 1688 puts "Mac OS X: [macosx_version]" 1689 puts "Xcode: [xcode_version]" 1690 } 1677 1691 return 0 1678 1692 } 1679 1693