Changeset 97826


Ignore:
Timestamp:
Sep 17, 2012, 1:52:04 AM (12 years ago)
Author:
royliu@…
Message:

virtualbox: fix the build process

Location:
trunk/dports/emulators/virtualbox
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/emulators/virtualbox/Portfile

    r97647 r97826  
    6060    patchfiles                  patch-build.diff \
    6161                                patch-glext.h.diff \
    62                                 patch-startup.diff \
    63                                 patch-configure.diff
     62                                patch-startup.diff
    6463
    6564    configure.compiler          gcc-4.2
  • trunk/dports/emulators/virtualbox/files/patch-build.diff

    r96944 r97826  
    290290     else
    291291       log_failure "qt4 not working"
    292 @@ -2013,19 +1947,49 @@
     292@@ -2013,19 +1947,55 @@
    293293   test_header "Darwin version"
    294294   darwin_ver=`uname -r`
     
    297297+      darwin_ver="10.8" # Mountain Lion
    298298+
    299 +      if { test -d "/Developer/SDKs/MacOSX10.7.sdk"; } then
    300 +          sdk="/Developer/SDKs/MacOSX10.7.sdk"
     299+      if { test -d "`xcode-select -print-path`/SDKs/MacOSX10.7.sdk"; } then
     300+          sdk="`xcode-select -print-path`/SDKs/MacOSX10.7.sdk"
    301301+      else
    302302+          sdk="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"
     
    308308       darwin_ver="10.7" # Lion
    309309-      sdk=/Developer/SDKs/MacOSX10.6.sdk
    310 +
    311 +      if { test -d "/Developer/SDKs/MacOSX10.6.sdk"; } then
    312 +          sdk="/Developer/SDKs/MacOSX10.6.sdk"
     310-      CXX_FLAGS="-mmacosx-version-min=10.6 -isysroot $sdk -Wl,-syslibroot,$sdk"
     311+
     312+      if { test -d "`xcode-select -print-path`/SDKs/MacOSX10.6.sdk"; } then
     313+          # Developer tools are not bundled in Xcode.app.
     314+          sdk="`xcode-select -print-path`/SDKs/MacOSX10.6.sdk"
     315+          CXX_FLAGS="-mmacosx-version-min=10.6 -isysroot $sdk -Wl,-syslibroot,$sdk"
     316+      elif { test -d "`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk"; } then
     317+          # Developer tools are bundled in Xcode.app.
     318+          sdk="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk"
     319+          CXX_FLAGS="-mmacosx-version-min=10.6 -isysroot $sdk -Wl,-syslibroot,$sdk"
    313320+      else
    314 +          sdk="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk"
     321+          # Developer tools are bundled in Xcode.app and there's no 10.6 SDK; default to 10.7.
     322+          sdk="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"
     323+          CXX_FLAGS="-mmacosx-version-min=10.7 -isysroot $sdk -Wl,-syslibroot,$sdk"
    315324+      fi
    316 +
    317        CXX_FLAGS="-mmacosx-version-min=10.6 -isysroot $sdk -Wl,-syslibroot,$sdk"
    318325       ;;
    319326     10\.*)
     
    323330-          sdk=/Developer/SDKs/MacOSX10.5.sdk
    324331+
    325 +          if { test -d "/Developer/SDKs/MacOSX10.5.sdk"; } then
    326 +              sdk="/Developer/SDKs/MacOSX10.5.sdk"
     332+          if { test -d "`xcode-select -print-path`/SDKs/MacOSX10.5.sdk"; } then
     333+              sdk="`xcode-select -print-path`/SDKs/MacOSX10.5.sdk"
    327334+          else
    328335+              sdk="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.5.sdk"
     
    425432--- src/libs/xpcom18a4/python/Makefile.kmk.orig 2012-08-21 20:52:14.000000000 -0400
    426433+++ src/libs/xpcom18a4/python/Makefile.kmk      2012-08-21 20:53:59.000000000 -0400
    427 @@ -33,15 +33,11 @@ ifeq ($(KBUILD_TARGET),darwin) # Relatively predictable, don't script.
    428    VBOX_PYTHON25_INC = $(VBOX_PATH_MACOSX_SDK)/usr/include/python2.5
     434@@ -34,14 +34,14 @@
    429435   VBOX_PYTHON25_LIB = $(VBOX_PATH_MACOSX_SDK)/usr/lib/libpython2.5.dylib
    430436  endif
    431 - if  !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6) \
     437  if  !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6) \
    432438-  && (   !defined(VBOX_OSE) \
    433439-      || "$(wildcard $(VBOX_PATH_MACOSX_SDK_10_6)/usr/lib/libpython2.6.dylib)" != "")
    434 + ifdef VBOX_PATH_MACOSX_SDK_10_6
     440+  && defined(VBOX_PATH_MACOSX_SDK_10_6)
     441+  && ("$(wildcard $(VBOX_PATH_MACOSX_SDK_10_6)/usr/lib/libpython2.6.dylib)" != "")
    435442   VBOX_PYTHON26_INC = $(VBOX_PATH_MACOSX_SDK_10_6)/usr/include/python2.6
    436443   VBOX_PYTHON26_LIB = $(VBOX_PATH_MACOSX_SDK_10_6)/usr/lib/libpython2.6.dylib
    437444  endif
    438 - if  !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_7) \
     445  if  !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_7) \
    439446-  && (   defined(VBOX_NOT_OSE_LATER_SOMETIME) \
    440447-      || "$(wildcard $(VBOX_PATH_MACOSX_SDK_10_7)/usr/lib/libpython2.7.dylib)" != "")
    441 + ifdef VBOX_PATH_MACOSX_SDK_10_7
     448+  && defined(VBOX_PATH_MACOSX_SDK_10_7)
     449+  && ("$(wildcard $(VBOX_PATH_MACOSX_SDK_10_7)/usr/lib/libpython2.7.dylib)" != "")
    442450   VBOX_PYTHON27_INC = $(VBOX_PATH_MACOSX_SDK_10_7)/usr/include/python2.7
    443451   VBOX_PYTHON27_LIB = $(VBOX_PATH_MACOSX_SDK_10_7)/usr/lib/libpython2.7.dylib
Note: See TracChangeset for help on using the changeset viewer.