Ticket #40786: patch

File patch, 27.3 KB (added by royliu@…, 11 years ago)

My work so far

  • config/macports/emulators/virtualbox/Portfile

    diff --git a/config/macports/emulators/virtualbox/Portfile b/config/macports/emulators/virtualbox/Portfile
    index 5a72adb..7f312c6 100644
    a b  
    44PortSystem          1.0
    55
    66name                virtualbox
    7 version             4.2.16
     7version             4.3.2
    88# Note: On virtualbox version changes please update the checksums of all
    99# subports, and update extension_pack_build to match the current build
    1010# of the extension pack.
    1111# Also remember to revision bump port ld64
    12 set extension_pack_build   86992
     12set extension_pack_build   90405
    1313
    1414categories          emulators
    1515platforms           darwin
    if {${name} == ${subport}} { 
    4848    distname            VirtualBox-${version}
    4949    use_bzip2           yes
    5050
    51     checksums           rmd160  a49d044f6935199a71f6bdf94fd9082f9888d2d6 \
    52                         sha256  ff0f8916d039120554d9d73c7cae1863d6161933374374ec2f5313892046d45a
     51    checksums           rmd160  a58adfc3845b8e2d9757ea5c22d4fe6e3acea007 \
     52                        sha256  137ee464dcf3ec81fd74793022ecb53d7f4399682759e00cafd322b0dc92967e
    5353
    5454    depends_lib-append          port:curl \
    5555                                port:libidl \
    if {${name} == ${subport}} { 
    9191    # This is the open source edition of VirtualBox.
    9292    worksrcdir                  VirtualBox-${version}
    9393
    94     set kext_dir                /Library/Extensions
     94    set kext_dir                "/Library/Application Support/VirtualBox"
    9595    set startup_items_dir       /Library/StartupItems
    9696
    9797    post-patch {
    98         if {[vercmp $xcodeversion "4.4"] >= 0} {
    99             set oldest_supported_SDK 10.7
     98        if {[vercmp $xcodeversion "5.0"] >= 0} {
     99            set oldest_supported_SDK 10.9
     100        } elseif {[vercmp $xcodeversion "4.4"] >= 0} {
     101            set oldest_supported_SDK 10.8
    100102        } elseif {[vercmp $xcodeversion "4.1"] >= 0} {
    101             set oldest_supported_SDK 10.6
     103            set oldest_supported_SDK 10.7
    102104        } else {
    103105            set oldest_supported_SDK "10.[expr [lindex [split ${macosx_deployment_target} "."] 1] - 1]"
    104106        }
    if {${name} == ${subport}} { 
    106108        reinplace "s|@APPLICATIONS_DIR@|${applications_dir}|g" \
    107109            ${worksrcpath}/LocalConfig.kmk
    108110        reinplace "s|@MACOSX_DEPLOYMENT_TARGET@|${oldest_supported_SDK}|g" \
    109            ${worksrcpath}/LocalConfig.kmk
     111            ${worksrcpath}/LocalConfig.kmk
    110112        reinplace "s|@KEXT_DIR@|${prefix}${kext_dir}|g" \
    111             ${worksrcpath}/src/VBox/Installer/darwin/VBoxStartupItems/VirtualBox/VirtualBox
     113            ${worksrcpath}/src/VBox/Installer/darwin/VBoxKEXTs/VirtualBoxStartup.sh
    112114
    113115        if {[variant_isset vde2]} {
    114116            reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/include/VBox/VDEPlugSymDefs.h
    if {${name} == ${subport}} { 
    126128        # Set the owner and group to root:wheel, which is required for kernel extensions
    127129        # and possibly startup items.
    128130
    129         xinstall -m 755 -o root -g wheel -d ${destroot}${prefix}${kext_dir}
     131        xinstall -m 755 -o root -g wheel -d "${destroot}${prefix}${kext_dir}"
    130132
    131133        foreach kext [glob -- ${release_dir}/*.kext] {
    132             copy ${kext} ${destroot}${prefix}${kext_dir}
     134            copy ${kext} "${destroot}${prefix}${kext_dir}"
    133135        }
    134136
    135137        xinstall -m 755 -o root -g wheel -d ${destroot}${prefix}${startup_items_dir}
    136         copy ${worksrcpath}/src/VBox/Installer/darwin/VBoxStartupItems/VirtualBox ${destroot}${prefix}${startup_items_dir}
     138        copy ${worksrcpath}/src/VBox/Installer/darwin/VBoxKEXTs/VirtualBoxStartup.sh ${destroot}${prefix}${startup_items_dir}
    137139
    138140        # Create proxies for binaries bundled with VirtualBox.app.
    139141
    subport virtualbox-guest-additions { 
    213215
    214216    distfiles               VBoxGuestAdditions_${version}.iso
    215217
    216     checksums               rmd160  335365fbe7406aa0a0d3c0b886f0330b611b6ece \
    217                             sha256  cf2b0722da984a5f41a7814ee288262cbdf4c785630b2a7726c3daa6c5caa0c5
     218    checksums               rmd160  7e2e7ef0ce626a4fb1c5ce91d8897925e80ac76c \
     219                            sha256  f0b8fec99c65231641d5d01558abb53fe8b81f131dc71519cb7994c9e297300d
    218220
    219221    depends_run             port:virtualbox
    220222
    subport virtualbox-extension-pack { 
    270272
    271273    distname            ${name_extpack}-${version}
    272274
    273     checksums           rmd160  b41596eba7d8b402e0030eaa651898cacc8b1d3b \
    274                         sha256  8f88b1ebe69b770103e9151bebf6681c5e049eb5fac45ae8d52c43440aa0fa0d
     275    checksums           rmd160  4437f15de78ca75a5c54a094cb0674b7e1950e66 \
     276                        sha256  c42f7ef2ac97138551f73db38180aa56f63dd44b3823156da470f7e9ee3dc8e5
    275277
    276278    worksrcdir          ${name_extpack}
    277279    extract.suffix      .vbox-extpack
  • config/macports/emulators/virtualbox/files/patch-apple-gcc42.diff

    diff --git a/config/macports/emulators/virtualbox/files/patch-apple-gcc42.diff b/config/macports/emulators/virtualbox/files/patch-apple-gcc42.diff
    index a99d1ca..fa7febc 100644
    a b  
    11--- Config.kmk.orig     2013-01-21 13:27:33.000000000 -0500
    22+++ Config.kmk  2013-01-21 13:27:33.000000000 -0500
    3 @@ -1916,10 +1916,8 @@
     3@@ -1971,10 +1971,8 @@
    44    $(error VBox: 64-bit darwin builds require Xcode 3.2 or later, you have $(VBOX_XCODE_VERSION))
    55   endif
    66  endif
     
    7777 TOOL_LLVMGXX42MACHO_OBJC      ?= $(TOOL_LLVMGXX42MACHO_PREFIX)gcc$(TOOL_LLVMGXX42MACHO_SUFFIX)
    7878--- src/libs/kStuff/kStuff/kLdr/kLdrModMachO.c.orig     2013-01-21 13:27:34.000000000 -0500
    7979+++ src/libs/kStuff/kStuff/kLdr/kLdrModMachO.c  2013-01-21 13:27:34.000000000 -0500
    80 @@ -967,6 +967,8 @@
     80@@ -993,6 +993,8 @@
    8181             }
    8282 
    8383             case LC_DYSYMTAB:
  • config/macports/emulators/virtualbox/files/patch-build.diff

    diff --git a/config/macports/emulators/virtualbox/files/patch-build.diff b/config/macports/emulators/virtualbox/files/patch-build.diff
    index 1055ea2..e4d8fa2 100644
    a b  
    1 --- Config.kmk.orig     2012-06-20 08:07:42.000000000 -0500
    2 +++ Config.kmk  2012-08-19 05:22:48.000000000 -0500
    3 @@ -1151,7 +1151,7 @@
     1--- Config.kmk.orig     2013-11-01 13:52:01.000000000 -0400
     2+++ Config.kmk  2013-11-03 23:31:15.000000000 -0500
     3@@ -1170,7 +1170,7 @@
    44 # of VirtualBox binaries.  We request though that you always use something that
    55 # clearly identifies your build and makes it clear that it is not one done by
    66 # the VirtualBox team.
     
    99 endif
    1010 
    1111 # Keep in sync with G_virtualBoxPackage in glue-jaxws.xsl and glue-java.xsl
    12 @@ -1877,7 +1877,11 @@
     12@@ -1932,7 +1932,11 @@
    1313   endif
    1414   VBOX_PATH_MACOSX_SDK ?= $(VBOX_PATH_MACOSX_SDK_ROOT)/MacOSX$(VBOX_DEF_MACOSX_VERSION_MIN)u.sdk
    1515  else
     
    2222  endif
    2323 
    2424  ## The Xcode version.
    25 @@ -1971,6 +1975,13 @@
     25@@ -2030,6 +2034,13 @@
    2626  endif
    2727 
    2828  if1of ($(VBOX_DEF_MACOSX_VERSION_MIN), 10.4 10.5 10.6)
     
    3636   VBOX_PATH_MACOSX_SDK_10_6            ?= $(VBOX_PATH_MACOSX_SDK_ROOT)/MacOSX10.6.sdk
    3737   VBOX_DARWIN_DEF_SDK_10_6_DEFS        := MAC_OS_X_VERSION_MIN_REQUIRED=1060 MAC_OS_X_VERSION_MAX_ALLOWED=1060
    3838   VBOX_DARWIN_DEF_SDK_10_6_CFLAGS      := -mmacosx-version-min=10.6 -isysroot $(VBOX_PATH_MACOSX_SDK_10_6)
    39 @@ -1989,7 +2000,7 @@
     39@@ -2048,7 +2059,7 @@
    4040    ifneq ($(wildcard $(VBOX_PATH_MACOSX_SDK_ROOT)/MacOSX10.7.sdk),)
    4141     VBOX_PATH_MACOSX_SDK_10_7           = $(VBOX_PATH_MACOSX_SDK_ROOT)/MacOSX10.7.sdk
    4242    else
     
    4545    endif
    4646   endif
    4747   VBOX_DARWIN_DEF_SDK_10_7_DEFS        := MAC_OS_X_VERSION_MIN_REQUIRED=1070 MAC_OS_X_VERSION_MAX_ALLOWED=1070
    48 @@ -2169,22 +2180,22 @@
    49  VBOX_GCC32_CHECK_CXX = $(2)
    50  else
    51  VBOX_GCC_CHECK_CC = $(shell \
    52 -   if $(TOOL_$(VBOX_GCC_TOOL)_CC) $(subst -Wno-,-W,$(1)) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; \
    53 +   if $(TOOL_$(VBOX_GCC_TOOL)_CC) $(subst -Wno-,-W,$(1)) -S -xc /dev/null > /dev/null 2>&1; \
    54     then echo "$(1)"; \
    55     else echo "$(2)"; fi; )
     48@@ -2063,6 +2074,45 @@
     49   VBOX_DARWIN_DEF_SDK_10_7_LDFLAGS   = $(error VBox: $(if $(target),$(target): ,)Using 10.7 SDK)
     50  endif
    5651 
    57  VBOX_GCC_CHECK_CXX = $(shell \
    58 -   if $(TOOL_$(VBOX_GCC_TOOL)_CXX) $(subst -Wno-,-W,$(1)) -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1; \
    59 +   if $(TOOL_$(VBOX_GCC_TOOL)_CXX) $(subst -Wno-,-W,$(1)) -S -xc++ /dev/null > /dev/null 2>&1; \
    60     then echo "$(1)"; \
    61     else echo "$(2)"; fi; )
     52+ if1of ($(VBOX_DEF_MACOSX_VERSION_MIN), 10.4 10.5 10.6 10.7 10.8)
     53+  ifndef VBOX_PATH_MACOSX_SDK_10_8
     54+   ifneq ($(wildcard $(VBOX_PATH_MACOSX_SDK_ROOT)/MacOSX10.8.sdk),)
     55+    VBOX_PATH_MACOSX_SDK_10_8           = $(VBOX_PATH_MACOSX_SDK_ROOT)/MacOSX10.8.sdk
     56+   else
     57+    VBOX_PATH_MACOSX_SDK_10_8           = $(shell xcode-select -print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
     58+   endif
     59+  endif
     60+  VBOX_DARWIN_DEF_SDK_10_8_DEFS        := MAC_OS_X_VERSION_MIN_REQUIRED=1080 MAC_OS_X_VERSION_MAX_ALLOWED=1080
     61+  VBOX_DARWIN_DEF_SDK_10_8_CFLAGS      := -mmacosx-version-min=10.8 -isysroot $(VBOX_PATH_MACOSX_SDK_10_8)
     62+  VBOX_DARWIN_DEF_SDK_10_8_CXXFLAGS    := -mmacosx-version-min=10.8 -isysroot $(VBOX_PATH_MACOSX_SDK_10_8)
     63+  VBOX_DARWIN_DEF_SDK_10_8_OBJCFLAGS   := -mmacosx-version-min=10.8 -isysroot $(VBOX_PATH_MACOSX_SDK_10_8)
     64+  VBOX_DARWIN_DEF_SDK_10_8_OBJCXXFLAGS := -mmacosx-version-min=10.8 -isysroot $(VBOX_PATH_MACOSX_SDK_10_8)
     65+  VBOX_DARWIN_DEF_SDK_10_8_LDFLAGS     := -mmacosx-version-min=10.8 -Wl,-syslibroot,$(VBOX_PATH_MACOSX_SDK_10_8) \
     66+         -Wl,-headerpad_max_install_names
     67+ else
     68+  VBOX_DARWIN_DEF_SDK_10_8_CXXFLAGS  = $(error VBox: $(if $(target),$(target): ,)Using 10.8 SDK)
     69+  VBOX_DARWIN_DEF_SDK_10_8_LDFLAGS   = $(error VBox: $(if $(target),$(target): ,)Using 10.8 SDK)
     70+ endif
     71+
     72+ if1of ($(VBOX_DEF_MACOSX_VERSION_MIN), 10.4 10.5 10.6 10.7 10.8 10.9)
     73+  ifndef VBOX_PATH_MACOSX_SDK_10_9
     74+   ifneq ($(wildcard $(VBOX_PATH_MACOSX_SDK_ROOT)/MacOSX10.9.sdk),)
     75+    VBOX_PATH_MACOSX_SDK_10_9           = $(VBOX_PATH_MACOSX_SDK_ROOT)/MacOSX10.9.sdk
     76+   else
     77+    VBOX_PATH_MACOSX_SDK_10_9           = $(shell xcode-select -print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
     78+   endif
     79+  endif
     80+  VBOX_DARWIN_DEF_SDK_10_9_DEFS        := MAC_OS_X_VERSION_MIN_REQUIRED=1090 MAC_OS_X_VERSION_MAX_ALLOWED=1090
     81+  VBOX_DARWIN_DEF_SDK_10_9_CFLAGS      := -mmacosx-version-min=10.9 -isysroot $(VBOX_PATH_MACOSX_SDK_10_9)
     82+  VBOX_DARWIN_DEF_SDK_10_9_CXXFLAGS    := -mmacosx-version-min=10.9 -isysroot $(VBOX_PATH_MACOSX_SDK_10_9)
     83+  VBOX_DARWIN_DEF_SDK_10_9_OBJCFLAGS   := -mmacosx-version-min=10.9 -isysroot $(VBOX_PATH_MACOSX_SDK_10_9)
     84+  VBOX_DARWIN_DEF_SDK_10_9_OBJCXXFLAGS := -mmacosx-version-min=10.9 -isysroot $(VBOX_PATH_MACOSX_SDK_10_9)
     85+  VBOX_DARWIN_DEF_SDK_10_9_LDFLAGS     := -mmacosx-version-min=10.9 -Wl,-syslibroot,$(VBOX_PATH_MACOSX_SDK_10_9) \
     86+         -Wl,-headerpad_max_install_names
     87+ else
     88+  VBOX_DARWIN_DEF_SDK_10_9_CXXFLAGS  = $(error VBox: $(if $(target),$(target): ,)Using 10.9 SDK)
     89+  VBOX_DARWIN_DEF_SDK_10_9_LDFLAGS   = $(error VBox: $(if $(target),$(target): ,)Using 10.9 SDK)
     90+ endif
    6291 
    63  VBOX_GCC_CHECK_LD = $(shell \
    64 -   if $(TOOL_$(VBOX_GCC_TOOL)_LD) -Wl,$(1) $(if $(eq $(KBUILD_HOST),darwin),-Wl$(COMMA)-u$(COMMA)start -Wl$(COMMA)-undefined$(COMMA)dynamic_lookup,) -nostdlib -o /dev/null -xc /dev/null > /dev/null 2>&1 ;\
    65 +   if $(TOOL_$(VBOX_GCC_TOOL)_LD) -Wl,$(1) $(if $(eq $(KBUILD_HOST),darwin),-Wl$(COMMA)-u$(COMMA)start -Wl$(COMMA)-undefined$(COMMA)dynamic_lookup,) -nostdlib -xc /dev/null > /dev/null 2>&1 ;\
    66     then echo "-Wl,$(1)"; \
    67     else echo "$(2)"; fi; )
     92 endif # target=darwin
    6893 
    69  VBOX_GCC32_CHECK_CXX = $(shell \
    70 -   if $(TOOL_$(VBOX_GCC32_TOOL)_CXX) $(1) -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1; \
    71 +   if $(TOOL_$(VBOX_GCC32_TOOL)_CXX) $(1) -S -xc++ /dev/null > /dev/null 2>&1; \
    72     then echo "$(1)"; \
    73     else echo "$(2)"; fi; )
    74  endif
    75 @@ -4225,25 +4236,6 @@
     94@@ -2227,12 +2238,12 @@
     95  VBOX_GCC32_CHECK_CXX = $(2)
     96 else
     97  VBOX_GCC_CHECK_EX_CC = $(shell \
     98-    if $(1) $(subst -Wno-,-W,$(2)) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi; )
     99+    if $(1) $(subst -Wno-,-W,$(2)) -S -xc /dev/null > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi; )
     100  VBOX_GCC_CHECK_EX_CXX = $(shell \
     101-    if $(1) $(subst -Wno-,-W,$(2)) -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi; )
     102+    if $(1) $(subst -Wno-,-W,$(2)) -S -xc++ /dev/null > /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi; )
     103  VBOX_GCC_CHECK_EX_LD = $(shell \
     104     if $(1) -Wl,$(2) $(if $(eq $(KBUILD_HOST),darwin),-Wl$(COMMA)-u$(COMMA)start -Wl$(COMMA)-undefined$(COMMA)dynamic_lookup,) \
     105-            -nostdlib -o /dev/null -xc /dev/null > /dev/null 2>&1; \
     106+            -nostdlib -xc /dev/null > /dev/null 2>&1; \
     107     then echo "-Wl,$(2)"; else echo "$(3)"; fi; )
     108 
     109  VBOX_GCC_CHECK_CC    = $(call VBOX_GCC_CHECK_EX_CC,  $(TOOL_$(VBOX_GCC_TOOL)_CC),$1,$2)
     110@@ -2296,7 +2307,7 @@
     111  if1of ($(KBUILD_HOST), win os2)
     112   VBOX_YASM_CHECK = $(if-expr "$(shell $(TOOL_YASM_AS) -e -o nul $1 - < /dev/null 2>&1)" == "",$(1),)
     113  else
     114-  VBOX_YASM_CHECK = $(if-expr "$(shell $(TOOL_YASM_AS) -e -o /dev/null $1 - < /dev/null 2>&1)" == "",$(1),)
     115+  VBOX_YASM_CHECK = $(if-expr "$(shell $(TOOL_YASM_AS) -e $1 - < /dev/null 2>&1)" == "",$(1),)
     116  endif
     117 else
     118  VBOX_YASM_CHECK =
     119@@ -4521,25 +4532,6 @@
    76120  # be cleaned up properly later some time (not important now).
    77121  #
    78122  ifeq ($(VBOX_PATH_QT4),)
     
    112156+VBOX_WITH_TESTSUITE =
    113157+VBOX_WITH_TESTCASES =
    114158+kBuildGlobalDefaults_LD_DEBUG =
    115 --- Makefile.kmk.orig   2011-08-15 19:38:16.000000000 -0500
    116 +++ Makefile.kmk        2011-08-15 19:38:16.000000000 -0500
    117 @@ -111,53 +111,6 @@
     159--- Makefile.kmk.orig   2013-11-03 23:26:27.000000000 -0500
     160+++ Makefile.kmk        2013-11-03 23:42:16.000000000 -0500
     161@@ -122,53 +122,6 @@
    118162 endif
    119163 
    120164 #
     
    164208-endif
    165209-
    166210-
    167 -# Below we might need TOOL_ZIP_UNPACK (for the additions/docs/efifw packages
    168  # from the build server), and it's not really worth the effort of dragging in
    169  # this tool only if absolutely needed.
    170  ## @todo Hack to get at TOOL_ZIP_UNPACK; see if this can be integrated somehow...
     211-#
     212 # For building the combined package, just get the additions .ISO
     213 # once for amd64 to prevent version inconsistences. In all other
     214 # cases we get the .ISO per target architecture.
    171215--- configure.orig      2011-08-15 19:38:16.000000000 -0500
    172216+++ configure   2011-08-15 19:38:16.000000000 -0500
    173 @@ -1068,21 +1068,6 @@
     217@@ -1077,21 +1077,6 @@
    174218 check_sdl()
    175219 {
    176220   test_header SDL
     
    192236     if which_wrapper sdl-config > /dev/null; then
    193237       FLGSDL=`sdl-config --cflags`
    194238       INCSDL=`strip_I "$FLGSDL"`
    195 @@ -1091,7 +1076,6 @@
     239@@ -1100,7 +1085,6 @@
    196240       FLDSDL=
    197241       foundsdl=1
    198242     fi
     
    200244   [ "$OS" = "linux" -o "$OS" = "darwin" -o "$OS" = "solaris" ] && LIBSDLMAIN=""
    201245   if [ -n "$foundsdl" ]; then
    202246     cat > $ODIR.tmp_src.cc << EOF
    203 @@ -1439,53 +1423,20 @@
     247@@ -1448,53 +1432,20 @@
    204248 {
    205249   foundqt4=
    206250   test_header Qt4
     
    254298               PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
    255299               pkg-config QtCore --libs`
    256300           foundqt4=1
    257 @@ -1527,7 +1478,6 @@
     301@@ -1536,7 +1487,6 @@
    258302         fi
    259303       done
    260304     fi
     
    262306   if [ -n "$foundqt4" ]; then
    263307     cat > $ODIR.tmp_src.cc << EOF
    264308 #include <cstdio>
    265 @@ -1547,21 +1497,6 @@
     309@@ -1556,21 +1506,6 @@
    266310     [ -n "$INCQT4" ] && I_INCQT4=`prefix_I "$INCQT4"`
    267311     if test_compile "$LIBQT4 $LIBPTHREAD $I_INCQT4 $FLGQT4" qt4 qt4 nofatal; then
    268312       if test_execute_path "`strip_L "$LIBQT4"`"; then
     
    284328           # strip .../QtCore as we add components ourself
    285329           INCQT4=`echo "$INCQT4"|$KBUILD_SED 's|\([^ ]*\)/QtCore|\1|g; s| $||g'`
    286330           # store only the first path, remove all other pathes
    287 @@ -1607,7 +1542,6 @@
     331@@ -1616,7 +1551,6 @@
    288332               fi
    289333             fi
    290334           done
     
    292336       fi
    293337     else
    294338       log_failure "qt4 not working"
    295 @@ -2067,19 +2001,55 @@
     339@@ -2124,19 +2058,66 @@
    296340   test_header "Darwin version"
    297341   darwin_ver=`uname -r`
    298342   case "$darwin_ver" in
     343+    13\.*)
     344+      darwin_ver="10.9" # Mavericks
     345+
     346+      if { test -d "`xcode-select -print-path`/SDKs/MacOSX10.8.sdk"; } then
     347+          sdk="`xcode-select -print-path`/SDKs/MacOSX10.8.sdk"
     348+      else
     349+          sdk="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk"
     350+      fi
     351+
     352+      CXX_FLAGS="-mmacosx-version-min=10.8 -isysroot $sdk -Wl,-syslibroot,$sdk"
     353+      ;;
    299354+    12\.*)
    300355+      darwin_ver="10.8" # Mountain Lion
    301356+
     
    352407           CXX_FLAGS="-mmacosx-version-min=10.6 -isysroot $sdk -Wl,-syslibroot,$sdk"
    353408       fi
    354409 #      test "$CC" = "gcc" && CC="gcc-4.0"
    355 @@ -2276,7 +2246,7 @@
     410@@ -2357,7 +2327,7 @@
    356411     --with-openssl-dir=*)
    357412       OPENSSLDIR=`echo $option | cut -d'=' -f2`
    358413       INCCRYPTO="-I${OPENSSLDIR}/include"
     
    434489 
    435490--- src/libs/xpcom18a4/Config.kmk.orig  2013-01-21 13:27:34.000000000 -0500
    436491+++ src/libs/xpcom18a4/Config.kmk   2013-01-21 13:27:34.000000000 -0500
    437 @@ -228,6 +228,7 @@
     492@@ -223,6 +223,7 @@
    438493  TEMPLATE_XPCOMOSX104_INCS.darwin        = $(VBOX_PATH_MACOSX_SDK_10_4)/Developer/Headers/FlatCarbon
    439494 endif
    440495 
     
    442497 #
    443498 # Template for building VBoxPython against the Mac OS X 10.5 SDK.
    444499 # ASSUMES that the SDK bits are in the .darwin properties we're overriding below.
    445 @@ -239,7 +240,9 @@
     500@@ -234,7 +235,9 @@
    446501 TEMPLATE_XPCOMOSX105_LDFLAGS.darwin     = $(filter-out $(VBOX_DARWIN_DEF_SDK_LDFLAGS),$(TEMPLATE_XPCOM_LDFLAGS.darwin)) $(VBOX_DARWIN_DEF_SDK_10_5_LDFLAGS)
    447502 TEMPLATE_XPCOMOSX105_DEFS.darwin        = $(filter-out $(VBOX_DARWIN_DEF_SDK_DEFS),$(TEMPLATE_XPCOM_DEFS.darwin)) $(VBOX_DARWIN_DEF_SDK_10_5_DEFS)
    448503 TEMPLATE_XPCOMOSX105_INCS.darwin        = $(VBOX_PATH_MACOSX_SDK_10_5)/Developer/Headers/FlatCarbon
     
    452507 #
    453508 # Template for building VBoxPhython against the Mac OS X 10.6 SDK.
    454509 # ASSUMES that the SDK bits are in the .darwin properties we're overriding below.
    455 @@ -251,7 +254,9 @@
     510@@ -246,7 +249,9 @@
    456511 TEMPLATE_XPCOMOSX106_LDFLAGS.darwin     = $(filter-out $(VBOX_DARWIN_DEF_SDK_LDFLAGS),$(TEMPLATE_XPCOM_LDFLAGS.darwin)) $(VBOX_DARWIN_DEF_SDK_10_6_LDFLAGS)
    457512 TEMPLATE_XPCOMOSX106_DEFS.darwin        = $(filter-out $(VBOX_DARWIN_DEF_SDK_DEFS),$(TEMPLATE_XPCOM_DEFS.darwin)) $(VBOX_DARWIN_DEF_SDK_10_6_DEFS)
    458513 TEMPLATE_XPCOMOSX106_INCS.darwin        = $(VBOX_PATH_MACOSX_SDK_10_6)/Developer/Headers/FlatCarbon
     
    462517 #
    463518 # Template for building VBoxPhython against the Mac OS X 10.7 SDK.
    464519 # ASSUMES that the SDK bits are in the .darwin properties we're overriding below.
    465 @@ -264,6 +269,7 @@
     520@@ -259,6 +264,7 @@
    466521 TEMPLATE_XPCOMOSX107_LDFLAGS.darwin     = $(filter-out $(VBOX_DARWIN_DEF_SDK_LDFLAGS),$(TEMPLATE_XPCOM_LDFLAGS.darwin)) $(VBOX_DARWIN_DEF_SDK_10_7_LDFLAGS)
    467522 TEMPLATE_XPCOMOSX107_DEFS.darwin        = $(filter-out $(VBOX_DARWIN_DEF_SDK_DEFS),$(TEMPLATE_XPCOM_DEFS.darwin)) $(VBOX_DARWIN_DEF_SDK_10_7_DEFS)
    468523 TEMPLATE_XPCOMOSX107_INCS.darwin        = $(VBOX_PATH_MACOSX_SDK_10_7)/Developer/Headers/FlatCarbon
     
    470525 
    471526 
    472527 #
    473 --- src/libs/xpcom18a4/python/Makefile.kmk.orig 2012-08-21 20:52:14.000000000 -0400
    474 +++ src/libs/xpcom18a4/python/Makefile.kmk      2012-08-21 20:53:59.000000000 -0400
    475 @@ -34,14 +34,14 @@
    476    VBOX_PYTHON25_LIB = $(VBOX_PATH_MACOSX_SDK)/usr/lib/libpython2.5.dylib
     528--- src/libs/xpcom18a4/python/Makefile.kmk.orig 2013-11-01 13:59:00.000000000 -0400
     529+++ src/libs/xpcom18a4/python/Makefile.kmk      2013-11-03 23:52:09.000000000 -0500
     530@@ -35,15 +35,15 @@
     531   VBOX_PYTHON25_LIB_X86 = $(VBOX_PYTHON25_LIB)
    477532  endif
    478533  if  !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6) \
    479534-  && (   !defined(VBOX_OSE) \
    480535-      || "$(wildcard $(VBOX_PATH_MACOSX_SDK_10_6)/usr/lib/libpython2.6.dylib)" != "")
    481 && defined(VBOX_PATH_MACOSX_SDK_10_6)
    482 && ("$(wildcard $(VBOX_PATH_MACOSX_SDK_10_6)/usr/lib/libpython2.6.dylib)" != "")
     536    && defined(VBOX_PATH_MACOSX_SDK_10_6) \
     537    && ("$(wildcard $(VBOX_PATH_MACOSX_SDK_10_6)/usr/lib/libpython2.6.dylib)" != "")
    483538   VBOX_PYTHON26_INC = $(VBOX_PATH_MACOSX_SDK_10_6)/usr/include/python2.6
    484539   VBOX_PYTHON26_LIB = $(VBOX_PATH_MACOSX_SDK_10_6)/usr/lib/libpython2.6.dylib
     540   VBOX_PYTHON26_LIB_X86 = $(VBOX_PYTHON26_LIB)
    485541  endif
    486542  if  !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_7) \
    487543-  && (   defined(VBOX_NOT_OSE_LATER_SOMETIME) \
    488544-      || "$(wildcard $(VBOX_PATH_MACOSX_SDK_10_7)/usr/lib/libpython2.7.dylib)" != "")
    489 && defined(VBOX_PATH_MACOSX_SDK_10_7)
    490 && ("$(wildcard $(VBOX_PATH_MACOSX_SDK_10_7)/usr/lib/libpython2.7.dylib)" != "")
     545    && defined(VBOX_PATH_MACOSX_SDK_10_7) \
     546    && ("$(wildcard $(VBOX_PATH_MACOSX_SDK_10_7)/usr/lib/libpython2.7.dylib)" != "")
    491547   VBOX_PYTHON27_INC = $(VBOX_PATH_MACOSX_SDK_10_7)/usr/include/python2.7
    492548   VBOX_PYTHON27_LIB = $(VBOX_PATH_MACOSX_SDK_10_7)/usr/lib/libpython2.7.dylib
    493   endif
     549   VBOX_PYTHON27_LIB_X86 = $(VBOX_PYTHON27_LIB)
  • config/macports/emulators/virtualbox/files/patch-startup.diff

    diff --git a/config/macports/emulators/virtualbox/files/patch-startup.diff b/config/macports/emulators/virtualbox/files/patch-startup.diff
    index 97f4b7c..26631c9 100644
    a b  
    1 --- src/VBox/Installer/darwin/VBoxStartupItems/VirtualBox/VirtualBox.orig       2011-08-15 19:38:17.000000000 -0500
    2 +++ src/VBox/Installer/darwin/VBoxStartupItems/VirtualBox/VirtualBox    2011-08-15 19:38:17.000000000 -0500
    3 @@ -22,46 +22,22 @@
     1--- src/VBox/Installer/darwin/VBoxKEXTs/VirtualBoxStartup.sh.orig       2013-11-01 13:58:02.000000000 -0400
     2+++ src/VBox/Installer/darwin/VBoxKEXTs/VirtualBoxStartup.sh    2013-11-04 00:10:08.000000000 -0500
     3@@ -72,46 +72,22 @@
    44     VBOXUSB="VBoxUSB"
    55 
    66     #
     
    3030-    #
    3131     # Check that all the directories exist first.
    3232     #
    33 -    if [ ! -d /Library/Extensions/${VBOXDRV}.kext ]; then
    34 -        ConsoleMessage "Error: /Library/Extensions/${VBOXDRV}.kext is missing"
    35 +    if [ ! -d @KEXT_DIR@/${VBOXDRV}.kext ]; then
     33-    if [ ! -d "/Library/Application Support/VirtualBox/${VBOXDRV}.kext" ]; then
     34-        ConsoleMessage "Error: /Library/Application Support/VirtualBox/${VBOXDRV}.kext is missing"
     35+    if [ ! -d "@KEXT_DIR@/${VBOXDRV}.kext" ]; then
    3636+        ConsoleMessage "Error: @KEXT_DIR@/${VBOXDRV}.kext is missing"
    3737         VBOX_RC=1
    3838     fi
    39 -    if [ ! -d /Library/Extensions/${VBOXUSB}.kext ]; then
    40 -        ConsoleMessage "Error: /Library/Extensions/${VBOXUSB}.kext is missing"
    41 +    if [ ! -d @KEXT_DIR@/${VBOXUSB}.kext ]; then
     39-    if [ ! -d "/Library/Application Support/VirtualBox/${VBOXUSB}.kext" ]; then
     40-        ConsoleMessage "Error: /Library/Application Support/VirtualBox/${VBOXUSB}.kext is missing"
     41+    if [ ! -d "@KEXT_DIR@/${VBOXUSB}.kext" ]; then
    4242+        ConsoleMessage "Error: @KEXT_DIR@/${VBOXUSB}.kext is missing"
    4343         VBOX_RC=1
    4444     fi
    45 -    if [ ! -d /Library/Extensions/VBoxNetFlt.kext ]; then
    46 -        ConsoleMessage "Error: /Library/Extensions/VBoxNetFlt.kext is missing"
    47 +    if [ ! -d @KEXT_DIR@/VBoxNetFlt.kext ]; then
     45-    if [ ! -d "/Library/Application Support/VirtualBox/VBoxNetFlt.kext" ]; then
     46-        ConsoleMessage "Error: /Library/Application Support/VirtualBox/VBoxNetFlt.kext is missing"
     47+    if [ ! -d "@KEXT_DIR@/VBoxNetFlt.kext" ]; then
    4848+        ConsoleMessage "Error: @KEXT_DIR@/VBoxNetFlt.kext is missing"
    4949         VBOX_RC=1
    5050     fi
    51 -    if [ ! -d /Library/Extensions/VBoxNetAdp.kext ]; then
    52 -        ConsoleMessage "Error: /Library/Extensions/VBoxNetAdp.kext is missing"
    53 +    if [ ! -d @KEXT_DIR@/VBoxNetAdp.kext ]; then
     51-    if [ ! -d "/Library/Application Support/VirtualBox/VBoxNetAdp.kext" ]; then
     52-        ConsoleMessage "Error: /Library/Application Support/VirtualBox/VBoxNetAdp.kext is missing"
     53+    if [ ! -d "@KEXT_DIR@/VBoxNetAdp.kext" ]; then
    5454+        ConsoleMessage "Error: @KEXT_DIR@/VBoxNetAdp.kext is missing"
    5555         VBOX_RC=1
    5656     fi
    5757 
    58 @@ -93,26 +69,26 @@
     58@@ -143,26 +119,26 @@
    5959     #
    6060     if [ $VBOX_RC -eq 0 ]; then
    6161         ConsoleMessage "Loading ${VBOXDRV}.kext"
    62 -        if ! kextload /Library/Extensions/${VBOXDRV}.kext; then
    63 -            ConsoleMessage "Error: Failed to load /Library/Extensions/${VBOXDRV}.kext"
    64 +        if ! kextload @KEXT_DIR@/${VBOXDRV}.kext; then
     62-        if ! kextload "/Library/Application Support/VirtualBox/${VBOXDRV}.kext"; then
     63-            ConsoleMessage "Error: Failed to load /Library/Application Support/VirtualBox/${VBOXDRV}.kext"
     64+        if ! kextload "@KEXT_DIR@/${VBOXDRV}.kext"; then
    6565+            ConsoleMessage "Error: Failed to load @KEXT_DIR@/${VBOXDRV}.kext"
    6666             VBOX_RC=1
    6767         fi
    6868 
    6969         ConsoleMessage "Loading ${VBOXUSB}.kext"
    70 -        if ! kextload -d /Library/Extensions/${VBOXDRV}.kext /Library/Extensions/${VBOXUSB}.kext; then
    71 -            ConsoleMessage "Error: Failed to load /Library/Extensions/${VBOXUSB}.kext"
    72 +        if ! kextload -d @KEXT_DIR@/${VBOXDRV}.kext @KEXT_DIR@/${VBOXUSB}.kext; then
     70-        if ! kextload -d "/Library/Application Support/VirtualBox/${VBOXDRV}.kext" "/Library/Application Support/VirtualBox/${VBOXUSB}.kext"; then
     71-            ConsoleMessage "Error: Failed to load /Library/Application Support/VirtualBox/${VBOXUSB}.kext"
     72+        if ! kextload -d "@KEXT_DIR@/${VBOXDRV}.kext" "@KEXT_DIR@/${VBOXUSB}.kext"; then
    7373+            ConsoleMessage "Error: Failed to load @KEXT_DIR@/${VBOXUSB}.kext"
    7474             VBOX_RC=1
    7575         fi
    7676 
    7777         ConsoleMessage "Loading VBoxNetFlt.kext"
    78 -        if ! kextload -d /Library/Extensions/${VBOXDRV}.kext /Library/Extensions/VBoxNetFlt.kext; then
    79 -            ConsoleMessage "Error: Failed to load /Library/Extensions/VBoxNetFlt.kext"
    80 +        if ! kextload -d @KEXT_DIR@/${VBOXDRV}.kext @KEXT_DIR@/VBoxNetFlt.kext; then
     78-        if ! kextload -d "/Library/Application Support/VirtualBox/${VBOXDRV}.kext" "/Library/Application Support/VirtualBox/VBoxNetFlt.kext"; then
     79-            ConsoleMessage "Error: Failed to load /Library/Application Support/VirtualBox/VBoxNetFlt.kext"
     80+        if ! kextload -d "@KEXT_DIR@/${VBOXDRV}.kext" "@KEXT_DIR@/VBoxNetFlt.kext"; then
    8181+            ConsoleMessage "Error: Failed to load @KEXT_DIR@/VBoxNetFlt.kext"
    8282             VBOX_RC=1
    8383         fi
    8484 
    8585         ConsoleMessage "Loading VBoxNetAdp.kext"
    86 -        if ! kextload -d /Library/Extensions/${VBOXDRV}.kext /Library/Extensions/VBoxNetAdp.kext; then
    87 -            ConsoleMessage "Error: Failed to load /Library/Extensions/VBoxNetAdp.kext"
    88 +        if ! kextload -d @KEXT_DIR@/${VBOXDRV}.kext @KEXT_DIR@/VBoxNetAdp.kext; then
     86-        if ! kextload -d "/Library/Application Support/VirtualBox/${VBOXDRV}.kext" "/Library/Application Support/VirtualBox/VBoxNetAdp.kext"; then
     87-            ConsoleMessage "Error: Failed to load /Library/Application Support/VirtualBox/VBoxNetAdp.kext"
     88+        if ! kextload -d "@KEXT_DIR@/${VBOXDRV}.kext" "@KEXT_DIR@/VBoxNetAdp.kext"; then
    8989+            ConsoleMessage "Error: Failed to load @KEXT_DIR@/VBoxNetAdp.kext"
    9090             VBOX_RC=1
    9191         fi
  • config/macports/emulators/virtualbox/files/patch-vde.diff

    diff --git a/config/macports/emulators/virtualbox/files/patch-vde.diff b/config/macports/emulators/virtualbox/files/patch-vde.diff
    index 7f0f0f4..0b23ca2 100644
    a b  
    11--- configure.orig      2011-08-15 19:38:16.000000000 -0500
    22+++ configure   2011-08-15 19:38:16.000000000 -0500
    3 @@ -2605,7 +2605,7 @@
     3@@ -2705,7 +2705,7 @@
    44 fi
    55 
    66 # VDE