[90332] trunk/dports/devel/cmake/files/patch-Xcode_4.3.diff

css at macports.org css at macports.org
Fri Mar 2 05:33:44 PST 2012


Revision: 90332
          http://trac.macports.org/changeset/90332
Author:   css at macports.org
Date:     2012-03-02 05:33:44 -0800 (Fri, 02 Mar 2012)
Log Message:
-----------
cmake: forgot to add the xcode patch. refs #33388

Added Paths:
-----------
    trunk/dports/devel/cmake/files/patch-Xcode_4.3.diff

Added: trunk/dports/devel/cmake/files/patch-Xcode_4.3.diff
===================================================================
--- trunk/dports/devel/cmake/files/patch-Xcode_4.3.diff	                        (rev 0)
+++ trunk/dports/devel/cmake/files/patch-Xcode_4.3.diff	2012-03-02 13:33:44 UTC (rev 90332)
@@ -0,0 +1,79 @@
+diff -ur cmake-2.8.7-orig/Modules/Platform/Darwin.cmake cmake-2.8.7/Modules/Platform/Darwin.cmake
+--- Modules/Platform/Darwin.cmake	2012-02-27 16:55:54.000000000 +0100
++++ Modules/Platform/Darwin.cmake	2012-03-01 14:37:31.000000000 +0100
+@@ -58,20 +58,22 @@
+ 
+ # Set the assumed (Pre 10.5 or Default) location of the developer tools
+ SET(OSX_DEVELOPER_ROOT "/Developer")
++# Use the xcode-select tool if it's available (Xcode >= 3.0 installations)
++FIND_PROGRAM(CMAKE_XCODE_SELECT xcode-select)
++IF(CMAKE_XCODE_SELECT)
++  EXECUTE_PROCESS(COMMAND ${CMAKE_XCODE_SELECT} "-print-path"
++    OUTPUT_VARIABLE OSX_DEVELOPER_ROOT
++    OUTPUT_STRIP_TRAILING_WHITESPACE)
++ENDIF(CMAKE_XCODE_SELECT)
+ 
+ # Find installed SDKs
+-FILE(GLOB _CMAKE_OSX_SDKS "${OSX_DEVELOPER_ROOT}/SDKs/*")
+-
+-# If nothing is found there, then try locating the dev tools based on the xcode-select tool
+-# (available in Xcode >= 3.0 installations)
++# Start with pre-Xcode-4.3 default SDKs directory
++SET(_CMAKE_OSX_SDKS_DIR "${OSX_DEVELOPER_ROOT}/SDKs")
++FILE(GLOB _CMAKE_OSX_SDKS "${_CMAKE_OSX_SDKS_DIR}/*")
++# If not present, try 4.3+ SDKs directory
+ IF(NOT _CMAKE_OSX_SDKS)
+-  FIND_PROGRAM(CMAKE_XCODE_SELECT xcode-select)
+-  IF(CMAKE_XCODE_SELECT)
+-    EXECUTE_PROCESS(COMMAND ${CMAKE_XCODE_SELECT} "-print-path"
+-      OUTPUT_VARIABLE OSX_DEVELOPER_ROOT
+-      OUTPUT_STRIP_TRAILING_WHITESPACE)
+-    FILE(GLOB _CMAKE_OSX_SDKS "${OSX_DEVELOPER_ROOT}/SDKs/*")
+-  ENDIF(CMAKE_XCODE_SELECT)
++  SET(_CMAKE_OSX_SDKS_DIR "${OSX_DEVELOPER_ROOT}/Platforms/MacOSX.platform/Developer/SDKs")
++  FILE(GLOB _CMAKE_OSX_SDKS "${_CMAKE_OSX_SDKS_DIR}/*")
+ ENDIF(NOT _CMAKE_OSX_SDKS)
+ 
+ EXECUTE_PROCESS(COMMAND sw_vers -productVersion
+@@ -103,16 +105,16 @@
+ # Set CMAKE_OSX_SYSROOT_DEFAULT based on _CURRENT_OSX_VERSION,
+ # accounting for the known specially named SDKs.
+ SET(CMAKE_OSX_SYSROOT_DEFAULT
+-  "${OSX_DEVELOPER_ROOT}/SDKs/MacOSX${_CURRENT_OSX_VERSION}.sdk")
++  "${_CMAKE_OSX_SDKS_DIR}/MacOSX${_CURRENT_OSX_VERSION}.sdk")
+ 
+ IF(_CURRENT_OSX_VERSION STREQUAL "10.4")
+   SET(CMAKE_OSX_SYSROOT_DEFAULT
+-    "${OSX_DEVELOPER_ROOT}/SDKs/MacOSX10.4u.sdk")
++    "${_CMAKE_OSX_SDKS_DIR}/MacOSX10.4u.sdk")
+ ENDIF(_CURRENT_OSX_VERSION STREQUAL "10.4")
+ 
+ IF(_CURRENT_OSX_VERSION STREQUAL "10.3")
+   SET(CMAKE_OSX_SYSROOT_DEFAULT
+-    "${OSX_DEVELOPER_ROOT}/SDKs/MacOSX10.3.9.sdk")
++    "${_CMAKE_OSX_SDKS_DIR}/MacOSX10.3.9.sdk")
+ ENDIF(_CURRENT_OSX_VERSION STREQUAL "10.3")
+ 
+ # Use environment or default as initial cache value:
+diff -ur cmake-2.8.7-orig/Source/cmGlobalXCodeGenerator.cxx cmake-2.8.7/Source/cmGlobalXCodeGenerator.cxx
+--- Source/cmGlobalXCodeGenerator.cxx	2012-02-27 16:55:54.000000000 +0100
++++ Source/cmGlobalXCodeGenerator.cxx	2012-02-27 17:11:59.000000000 +0100
+@@ -135,8 +135,16 @@
+ {
+ #if defined(CMAKE_BUILD_WITH_CMAKE)
+   cmXcodeVersionParser parser;
+-  parser.ParseFile
+-    ("/Developer/Applications/Xcode.app/Contents/version.plist");
++  if (cmSystemTools::FileExists("/Applications/Xcode.app/Contents/version.plist"))
++    {
++    parser.ParseFile
++      ("/Applications/Xcode.app/Contents/version.plist");
++    }
++  else
++    {
++    parser.ParseFile
++      ("/Developer/Applications/Xcode.app/Contents/version.plist");
++    }
+   cmsys::auto_ptr<cmGlobalXCodeGenerator>
+     gg(new cmGlobalXCodeGenerator(parser.Version));
+   if (gg->XcodeVersion == 20)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120302/5a6be4e1/attachment.html>


More information about the macports-changes mailing list