[97075] trunk/dports/emulators/virtualbox

and.damore at macports.org and.damore at macports.org
Sun Aug 26 12:07:55 PDT 2012


Revision: 97075
          https://trac.macports.org/changeset/97075
Author:   and.damore at macports.org
Date:     2012-08-26 12:07:53 -0700 (Sun, 26 Aug 2012)
Log Message:
-----------
port virtualbox: fix builds on 10.7 with Xcode >= 4.4, nomaintainer, close ticket #35808

Modified Paths:
--------------
    trunk/dports/emulators/virtualbox/Portfile

Added Paths:
-----------
    trunk/dports/emulators/virtualbox/files/patch-configure.diff

Modified: trunk/dports/emulators/virtualbox/Portfile
===================================================================
--- trunk/dports/emulators/virtualbox/Portfile	2012-08-26 18:47:49 UTC (rev 97074)
+++ trunk/dports/emulators/virtualbox/Portfile	2012-08-26 19:07:53 UTC (rev 97075)
@@ -59,7 +59,8 @@
 
     patchfiles                  patch-build.diff \
                                 patch-glext.h.diff \
-                                patch-startup.diff
+                                patch-startup.diff \
+                                patch-configure.diff
 
     configure.compiler          gcc-4.2
 
@@ -88,12 +89,16 @@
 
     set kext_dir                /Library/Extensions
     set startup_items_dir       /Library/StartupItems
-
     post-patch {
+        if {[vercmp $xcodeversion "4.4"] >= 0} {
+            set oldest_supported_SDK 10.7
+        } else {
+            set oldest_supported_SDK "10.[expr [lindex [split ${macosx_deployment_target} "."] 1] - 1]"
+        }
 
         reinplace "s|@APPLICATIONS_DIR@|${applications_dir}|g" \
             ${worksrcpath}/LocalConfig.kmk
-        reinplace "s|@MACOSX_DEPLOYMENT_TARGET@|10.[expr [lindex [split ${macosx_deployment_target} "."] 1] - 1]|g" \
+        reinplace "s|@MACOSX_DEPLOYMENT_TARGET@|${oldest_supported_SDK}|g" \
            ${worksrcpath}/LocalConfig.kmk
         reinplace "s|@KEXT_DIR@|${prefix}${kext_dir}|g" \
             ${worksrcpath}/src/VBox/Installer/darwin/VBoxStartupItems/VirtualBox/VirtualBox

Added: trunk/dports/emulators/virtualbox/files/patch-configure.diff
===================================================================
--- trunk/dports/emulators/virtualbox/files/patch-configure.diff	                        (rev 0)
+++ trunk/dports/emulators/virtualbox/files/patch-configure.diff	2012-08-26 19:07:53 UTC (rev 97075)
@@ -0,0 +1,26 @@
+--- configure.orig	2012-08-26 19:51:10.000000000 +0200
++++ configure	2012-08-26 19:58:47.000000000 +0200
+@@ -1961,13 +1961,20 @@
+     11\.*)
+       darwin_ver="10.7" # Lion
+ 
++      CXX_FLAGS="-mmacosx-version-min=10.6 -isysroot $sdk -Wl,-syslibroot,$sdk"
++
+       if { test -d "/Developer/SDKs/MacOSX10.6.sdk"; } then
++          # Developer tools are not bundled in Xcode.app
+           sdk="/Developer/SDKs/MacOSX10.6.sdk"
+-      else
++      elif { test -d "`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk"; } then
++          # Developer tools are in Xcode.app and there's 10.6 SDK
+           sdk="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk"
++      else
++          # Developer tools are in Xcode.app and there's no 10.6 SDK, i.e. we're on 10.7 using Xcode >4.4
++          # that only sports 10.7 and 10.8, we need to change CXX_FLAGS too
++          sdk="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"
++          CXX_FLAGS="-mmacosx-version-min=10.7 -isysroot $sdk -Wl,-syslibroot,$sdk"
+       fi
+-
+-      CXX_FLAGS="-mmacosx-version-min=10.6 -isysroot $sdk -Wl,-syslibroot,$sdk"
+       ;;
+     10\.*)
+       darwin_ver="10.6" # Snow Leopard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120826/87e29d9f/attachment.html>


More information about the macports-changes mailing list