Ticket #36020: patch-emulators-virtualbox-find-sdk.diff

File patch-emulators-virtualbox-find-sdk.diff, 2.4 KB (added by pixilla (Bradley Giesbrecht), 12 years ago)

Use "xcode-select -print-path" in place of hardcoded /Developer.

  • emulators/virtualbox/files/patch-configure.diff

     
    1 --- configure.orig      2012-08-26 19:51:10.000000000 +0200
    2 +++ configure   2012-08-26 19:58:47.000000000 +0200
    3 @@ -1961,13 +1961,20 @@
     1--- configure.orig      2012-09-06 15:12:21.000000000 -0700
     2+++ configure   2012-09-06 15:47:11.000000000 -0700
     3@@ -1950,8 +1950,8 @@
     4     12\.*)
     5       darwin_ver="10.8" # Mountain Lion
     6 
     7-      if { test -d "/Developer/SDKs/MacOSX10.7.sdk"; } then
     8-          sdk="/Developer/SDKs/MacOSX10.7.sdk"
     9+      if { test -d "`xcode-select -print-path`/SDKs/MacOSX10.7.sdk"; } then
     10+          sdk="`xcode-select -print-path`/SDKs/MacOSX10.7.sdk"
     11       else
     12           sdk="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"
     13       fi
     14@@ -1961,21 +1961,28 @@
    415     11\.*)
    516       darwin_ver="10.7" # Lion
    617 
     18-      if { test -d "/Developer/SDKs/MacOSX10.6.sdk"; } then
     19-          sdk="/Developer/SDKs/MacOSX10.6.sdk"
     20-      else
    721+      CXX_FLAGS="-mmacosx-version-min=10.6 -isysroot $sdk -Wl,-syslibroot,$sdk"
    822+
    9        if { test -d "/Developer/SDKs/MacOSX10.6.sdk"; } then
     23+      if { test -d "`xcode-select -print-path`/SDKs/MacOSX10.6.sdk"; } then
    1024+          # Developer tools are not bundled in Xcode.app
    11            sdk="/Developer/SDKs/MacOSX10.6.sdk"
    12 -      else
     25+          sdk="`xcode-select -print-path`/SDKs/MacOSX10.6.sdk"
    1326+      elif { test -d "`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk"; } then
    1427+          # Developer tools are in Xcode.app and there's 10.6 SDK
    1528           sdk="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk"
     
    2437       ;;
    2538     10\.*)
    2639       darwin_ver="10.6" # Snow Leopard
     40 
     41       if [ "$BUILD_MACHINE" = "x86" ]; then
     42 
     43-          if { test -d "/Developer/SDKs/MacOSX10.5.sdk"; } then
     44-              sdk="/Developer/SDKs/MacOSX10.5.sdk"
     45+          if { test -d "`xcode-select -print-path`/SDKs/MacOSX10.5.sdk"; } then
     46+              sdk="`xcode-select -print-path`/SDKs/MacOSX10.5.sdk"
     47           else
     48               sdk="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.5.sdk"
     49           fi