Index: /trunk/dports/emulators/virtualbox/Portfile
===================================================================
--- /trunk/dports/emulators/virtualbox/Portfile	(revision 97828)
+++ /trunk/dports/emulators/virtualbox/Portfile	(revision 97829)
@@ -5,9 +5,9 @@
 
 name                virtualbox
-version             4.1.20
+version             4.2.0
 # Note: On virtualbox version changes please update the checksums of all
 # subports, and update extension_pack_build to match the current build
 # of the extension pack.
-set extension_pack_build   80170
+set extension_pack_build   80737
 
 categories          emulators
@@ -48,6 +48,6 @@
     use_bzip2           yes
 
-    checksums           rmd160  ba91d9284c47bac69d064f9bdf98a152fab7672b \
-                        sha256  b132dbc5c6e9ed77aba737ec35b488ac152aa362c3ad49d466897bc410324aeb
+    checksums           rmd160  9ed426203e6e01a27ce791ec83a89d1133d20f88 \
+                        sha256  895426ecac371bef4c070e8bcc9306f0c57dcbd6be25188d915b63ddde6f49e6
 
     depends_lib-append          port:curl \
@@ -59,5 +59,4 @@
 
     patchfiles                  patch-build.diff \
-                                patch-glext.h.diff \
                                 patch-startup.diff
 
@@ -208,6 +207,6 @@
     distfiles               VBoxGuestAdditions_${version}.iso
 
-    checksums               rmd160  52741ca396fb507dcebfb4af04df61e567d2bba3 \
-                            sha256  04ab744725c17db441077ef471eeb41db5fc6e4569ac54e6c4f52923737b0494
+    checksums               rmd160  8bd5fd7f0c96f62fd9a5a328aa285f9bdf89e937 \
+                            sha256  ef274ecdcb48adec469656959e51c8468b6d3a7733ddf93f9a3713f77f1604f3
 
     depends_run             port:virtualbox
@@ -265,6 +264,6 @@
     distname            ${name_extpack}-${version}
 
-    checksums           rmd160  84c1662501fe7be803f3ab470cfc6b2a3739414c \
-                        sha256  3aa9a2d65e63b8fcf3fc02070bde23d27f4e061953c8c8f1a1e1d492244bfa2a
+    checksums           rmd160  52629c70a7dff3c0d760eee167fe999aea9d049c \
+                        sha256  18055795fa95d3a49ac00fd7e5009113d871a0c87a5e0f864f88c4eeb3222218
 
     worksrcdir          ${name_extpack}
Index: /trunk/dports/emulators/virtualbox/files/patch-apple-gcc42.diff
===================================================================
--- /trunk/dports/emulators/virtualbox/files/patch-apple-gcc42.diff	(revision 97828)
+++ /trunk/dports/emulators/virtualbox/files/patch-apple-gcc42.diff	(revision 97829)
@@ -1,20 +1,15 @@
 --- Config.kmk.orig	2012-08-19 17:42:19.000000000 -0500
 +++ Config.kmk	2012-08-19 17:42:19.000000000 -0500
-@@ -1783,7 +1783,7 @@
-    if "$(VBOX_XCODE_VERSION_MAJOR)" == "4"
-     VBOX_DEF_MACOSX_VERSION_MIN ?= 10.6
-     VBOX_DARWIN_NO_COMPACT_LINKEDIT ?=
--    VBOX_MACOSX_GCC_INFIX ?= -4.2
-+    VBOX_MACOSX_GCC_INFIX ?= -apple-4.2
-    else
-     VBOX_DEF_MACOSX_VERSION_MIN ?= 10.5
-     VBOX_DARWIN_NO_COMPACT_LINKEDIT ?= $(VBOX_LD_no_compact_linkedit)
-@@ -1802,7 +1802,7 @@
-    $(error 64-bit darwin builds require Xcode 3.2 or later, you have $(VBOX_XCODE_VERSION))
+@@ -1913,10 +1913,8 @@
+    $(error VBox: 64-bit darwin builds require Xcode 3.2 or later, you have $(VBOX_XCODE_VERSION))
    endif
-   VBOX_DEF_MACOSX_VERSION_MIN ?= 10.6
--  VBOX_MACOSX_GCC_INFIX ?= -4.2
-+  VBOX_MACOSX_GCC_INFIX ?= -apple-4.2
-   VBOX_DARWIN_NO_COMPACT_LINKEDIT ?=
   endif
-  TOOL_GCC4MACHO_CC  = gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
+- if $(VBOX_XCODE_VERSION_MAJOR) == 4 && $(VBOX_XCODE_VERSION_MINOR) >= 2
+-  TOOL_GXX4MACHO_PREFIX ?= llvm-
+- endif
+- TOOL_GXX4MACHO_SUFFIX ?= -4.2
++ TOOL_GXX4MACHO_PREFIX ?=
++ TOOL_GXX4MACHO_SUFFIX ?= -apple-4.2
+  VBOX_DARWIN_NO_COMPACT_LINKEDIT ?=
+ 
+  TOOL_GCC4MACHO_SUFFIX ?= $(TOOL_GXX4MACHO_SUFFIX)$(HOSTSUFF_EXE)
Index: /trunk/dports/emulators/virtualbox/files/patch-build.diff
===================================================================
--- /trunk/dports/emulators/virtualbox/files/patch-build.diff	(revision 97828)
+++ /trunk/dports/emulators/virtualbox/files/patch-build.diff	(revision 97829)
@@ -1,5 +1,5 @@
 --- Config.kmk.orig	2012-06-20 08:07:42.000000000 -0500
 +++ Config.kmk	2012-08-19 05:22:48.000000000 -0500
-@@ -1094,7 +1094,7 @@
+@@ -1130,7 +1130,7 @@
  # of VirtualBox binaries.  We request though that you always use something that
  # clearly identifies your build and makes it clear that it is not one done by
@@ -10,37 +10,34 @@
  
  # Keep in sync with G_virtualBoxPackage in glue-jaxws.xsl and glue-java.xsl
-@@ -1828,7 +1828,13 @@
+@@ -1874,7 +1874,11 @@
    endif
-   VBOX_PATH_MACOSX_SDK ?= /Developer/SDKs/MacOSX$(VBOX_DEF_MACOSX_VERSION_MIN)u.sdk
+   VBOX_PATH_MACOSX_SDK ?= $(VBOX_PATH_MACOSX_SDK_ROOT)/MacOSX$(VBOX_DEF_MACOSX_VERSION_MIN)u.sdk
   else
--  VBOX_PATH_MACOSX_SDK ?= /Developer/SDKs/MacOSX$(VBOX_DEF_MACOSX_VERSION_MIN).sdk
-+  ifndef VBOX_PATH_MACOSX_SDK
-+   ifneq ($(wildcard /Developer/SDKs/MacOSX$(VBOX_DEF_MACOSX_VERSION_MIN).sdk),)
-+    VBOX_PATH_MACOSX_SDK         = /Developer/SDKs/MacOSX$(VBOX_DEF_MACOSX_VERSION_MIN).sdk
-+   else
-+    VBOX_PATH_MACOSX_SDK         = $(shell xcode-select -print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$(VBOX_DEF_MACOSX_VERSION_MIN).sdk
-+   endif
+-  VBOX_PATH_MACOSX_SDK ?= $(VBOX_PATH_MACOSX_SDK_ROOT)/MacOSX$(VBOX_DEF_MACOSX_VERSION_MIN).sdk
++  ifneq ($(wildcard /Developer/SDKs/MacOSX$(VBOX_DEF_MACOSX_VERSION_MIN).sdk),)
++   VBOX_PATH_MACOSX_SDK = /Developer/SDKs/MacOSX$(VBOX_DEF_MACOSX_VERSION_MIN).sdk
++  else
++   VBOX_PATH_MACOSX_SDK = $(shell xcode-select -print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$(VBOX_DEF_MACOSX_VERSION_MIN).sdk
 +  endif
   endif
-  VBOX_DARWIN_DEF_SDK_DEFS        := MAC_OS_X_VERSION_MIN_REQUIRED=$(subst .,,$(VBOX_DEF_MACOSX_VERSION_MIN))0 \
-                                     MAC_OS_X_VERSION_MAX_ALLOWED=$(subst .,,$(VBOX_DEF_MACOSX_VERSION_MIN))0
-@@ -1871,7 +1877,13 @@
+ 
+  ## The Xcode version.
+@@ -1968,6 +1972,13 @@
   endif
  
   if1of ($(VBOX_DEF_MACOSX_VERSION_MIN), 10.4 10.5 10.6)
--  VBOX_PATH_MACOSX_SDK_10_6            ?= /Developer/SDKs/MacOSX10.6.sdk
 +  ifndef VBOX_PATH_MACOSX_SDK_10_6
-+   ifneq ($(wildcard /Developer/SDKs/MacOSX10.6.sdk),)
-+    VBOX_PATH_MACOSX_SDK_10_6           = /Developer/SDKs/MacOSX10.6.sdk
++   ifneq ($(wildcard $(VBOX_PATH_MACOSX_SDK_ROOT)/MacOSX10.6.sdk),)
++    VBOX_PATH_MACOSX_SDK_10_6           = $(VBOX_PATH_MACOSX_SDK_ROOT)/MacOSX10.6.sdk
 +   else
 +    VBOX_PATH_MACOSX_SDK_10_6           = $(shell xcode-select -print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
 +   endif
 +  endif
+   VBOX_PATH_MACOSX_SDK_10_6            ?= $(VBOX_PATH_MACOSX_SDK_ROOT)/MacOSX10.6.sdk
    VBOX_DARWIN_DEF_SDK_10_6_DEFS        := MAC_OS_X_VERSION_MIN_REQUIRED=1060 MAC_OS_X_VERSION_MAX_ALLOWED=1060
    VBOX_DARWIN_DEF_SDK_10_6_CFLAGS      := -mmacosx-version-min=10.6 -isysroot $(VBOX_PATH_MACOSX_SDK_10_6)
-   VBOX_DARWIN_DEF_SDK_10_6_CXXFLAGS    := -mmacosx-version-min=10.6 -isysroot $(VBOX_PATH_MACOSX_SDK_10_6)
-@@ -1889,7 +1901,7 @@
-    ifneq ($(wildcard /Developer/SDKs/MacOSX10.7.sdk),)
-     VBOX_PATH_MACOSX_SDK_10_7           = /Developer/SDKs/MacOSX10.7.sdk
+@@ -1986,7 +1997,7 @@
+    ifneq ($(wildcard $(VBOX_PATH_MACOSX_SDK_ROOT)/MacOSX10.7.sdk),)
+     VBOX_PATH_MACOSX_SDK_10_7           = $(VBOX_PATH_MACOSX_SDK_ROOT)/MacOSX10.7.sdk
     else
 -    VBOX_PATH_MACOSX_SDK_10_7           = $(PATH_DEVTOOLS)/darwin.x86/SDKs/MacOSX10.7.sdk
@@ -49,5 +46,5 @@
    endif
    VBOX_DARWIN_DEF_SDK_10_7_DEFS        := MAC_OS_X_VERSION_MIN_REQUIRED=1070 MAC_OS_X_VERSION_MAX_ALLOWED=1070
-@@ -2071,22 +2083,22 @@
+@@ -2166,22 +2177,22 @@
  VBOX_GCC32_CHECK_CXX = $(2)
  else
@@ -76,5 +73,5 @@
     else echo "$(2)"; fi; )
  endif
-@@ -3950,25 +3962,6 @@
+@@ -4214,25 +4225,6 @@
   # be cleaned up properly later some time (not important now).
   #
@@ -90,6 +87,6 @@
 -   endif
 -  else if1of ($(KBUILD_TARGET), win)
--   VBOX_PATH_QT4 ?= $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*)))
--  else if1of ($(KBUILD_TARGET), solaris)
+-   VBOX_PATH_QT4 ?= $(lastword $(filter %-$(tolower $(VBOX_VCC_TOOL_STEM)),$(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*))))
+-  else if1of ($(KBUILD_TARGET), linux solaris)
 -   VBOX_PATH_QT4 ?= $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*)))
 -   ifneq ($(VBOX_PATH_QT4),)
@@ -118,8 +115,11 @@
 --- Makefile.kmk.orig	2011-08-15 19:38:16.000000000 -0500
 +++ Makefile.kmk	2011-08-15 19:38:16.000000000 -0500
-@@ -182,47 +182,6 @@
- # Install our Qt DLLs / Shared Objects / Frameworks.
- # Note: The installer fixes the darwin .dylibs when hardening is enabled.
+@@ -111,53 +111,6 @@
+ endif
+ 
  #
+-# Install our Qt DLLs / Shared Objects / Frameworks.
+-# Note: The installer fixes the darwin .dylibs when hardening is enabled.
+-#
 -ifeq ($(KBUILD_TARGET),darwin)
 - INSTALLS += qt4-bin
@@ -145,5 +145,5 @@
 - endif
 -else
-- ifdef VBOX_WITH_QT4_SUN
+- if defined(VBOX_WITH_QT4_SUN) || defined(VBOX_WITH_QT4_PAYLOAD)
 -  ifeq ($(KBUILD_TARGET),win)
 -   INSTALLS += qt4-bin
@@ -163,10 +163,13 @@
 - endif # VBOX_WITH_QT4_SUN
 -endif
- 
- 
- #
+-
+-
+-#
+ # For building the combined package, just get the additions .ISO
+ # once for amd64 to prevent version inconsistences. In all other
+ # cases we get the .ISO per target architecture.
 --- configure.orig	2011-08-15 19:38:16.000000000 -0500
 +++ configure	2011-08-15 19:38:16.000000000 -0500
-@@ -1017,21 +1017,6 @@
+@@ -1074,21 +1074,6 @@
  check_sdl()
  {
@@ -190,5 +193,5 @@
        FLGSDL=`sdl-config --cflags`
        INCSDL=`strip_I "$FLGSDL"`
-@@ -1040,7 +1025,6 @@
+@@ -1097,7 +1082,6 @@
        FLDSDL=
        foundsdl=1
@@ -198,5 +201,5 @@
    if [ -n "$foundsdl" ]; then
      cat > $ODIR.tmp_src.cc << EOF
-@@ -1388,53 +1372,20 @@
+@@ -1445,53 +1429,20 @@
  {
    foundqt4=
@@ -237,5 +240,5 @@
          # this braindead path is necessary for mdv2008.1
          qt4_ver=`\
--            PKG_CONFIG_PATH=/usr/lib/qt4/lib/pkgconfig \
+-            PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/qt4/lib/pkgconfig \
              pkg-config QtCore --modversion 2>> $LOG`
          if [ $? -ne 0 ]; then
@@ -244,13 +247,13 @@
          else
            FLGQT4=`\
--              PKG_CONFIG_PATH=/usr/lib/qt4/lib/pkgconfig \
+-              PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/qt4/lib/pkgconfig \
                pkg-config QtCore --cflags`
            INCQT4=`strip_I "$FLGQT4"`
            LIBQT4=`\
--              PKG_CONFIG_PATH=/usr/lib/qt4/lib/pkgconfig \
+-              PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/qt4/lib/pkgconfig \
                PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \
                pkg-config QtCore --libs`
            foundqt4=1
-@@ -1476,7 +1427,6 @@
+@@ -1533,7 +1484,6 @@
          fi
        done
@@ -260,5 +263,5 @@
      cat > $ODIR.tmp_src.cc << EOF
  #include <cstdio>
-@@ -1496,21 +1446,6 @@
+@@ -1553,21 +1503,6 @@
      [ -n "$INCQT4" ] && I_INCQT4=`prefix_I "$INCQT4"`
      if test_compile "$LIBQT4 $LIBPTHREAD $I_INCQT4 $FLGQT4" qt4 qt4 nofatal; then
@@ -282,5 +285,5 @@
            INCQT4=`echo "$INCQT4"|$KBUILD_SED 's|\([^ ]*\)/QtCore|\1|g; s| $||g'`
            # store only the first path, remove all other pathes
-@@ -1556,7 +1491,6 @@
+@@ -1613,7 +1548,6 @@
                fi
              fi
@@ -290,5 +293,5 @@
      else
        log_failure "qt4 not working"
-@@ -2013,19 +1947,55 @@
+@@ -2071,19 +2005,55 @@
    test_header "Darwin version"
    darwin_ver=`uname -r`
@@ -350,5 +353,5 @@
        fi
  #      test "$CC" = "gcc" && CC="gcc-4.0"
-@@ -2220,7 +2152,7 @@
+@@ -2279,7 +2249,7 @@
      --with-openssl-dir=*)
        OPENSSLDIR=`echo $option | cut -d'=' -f2`
@@ -357,6 +360,6 @@
 +      LIBCRYPTO="${OPENSSLDIR}/lib/libcrypto.dylib ${OPENSSLDIR}/lib/libssl.dylib"
        ;;
-     --with-gsoap-dir=*)
-       GSOAP=`echo $option | cut -d'=' -f2`
+     --with-ow-dir=*)
+       WATCOM=`echo $option | cut -d'=' -f2`
 --- kBuild/units/qt4.kmk.orig	2011-08-15 19:38:16.000000000 -0500
 +++ kBuild/units/qt4.kmk	2011-08-15 19:38:16.000000000 -0500
Index: unk/dports/emulators/virtualbox/files/patch-glext.h.diff
===================================================================
--- /trunk/dports/emulators/virtualbox/files/patch-glext.h.diff	(revision 97828)
+++ 	(revision )
@@ -1,28 +1,0 @@
---- src/VBox/GuestHost/OpenGL/include/GL/glext.h.orig	2012-08-21 20:52:14.000000000 -0400
-+++ src/VBox/GuestHost/OpenGL/include/GL/glext.h	2012-08-21 20:53:59.000000000 -0400
-@@ -3722,6 +3722,25 @@
- typedef ptrdiff_t GLsizeiptrARB;
- #endif
- 
-+/* VBox: HACK ALERT! When building the host side against Mac OS X 10.7 headers,
-+   /Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/OpenGL.framework/Headers/gltypes.h
-+   is included and it typedefs GLhandleARB differently.  In 10.6 and earlier,
-+   gl.h was included instead of gltypes.h (new file) avoiding the conflicting
-+   typedef in Headers/glext.h.
-+
-+   Since sizeof the gltypes.h typedef is 64-bit on 64-bit platforms, we're in
-+   trouble if the type is used for anything important.  Fortunately, the
-+   conflict only occurs in three files: renderspu_config.c, renderspu_cocoa.c
-+   and renderspu_cocoa_helper.m. */
-+#ifdef RT_OS_DARWIN
-+# ifndef MAC_OS_X_VERSION_MIN_REQUIRED
-+#  error "MAC_OS_X_VERSION_MIN_REQUIRED is not defined"
-+# endif
-+# if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 && defined(__gltypes_h_)
-+#  define GLhandleARB VBoxGLhandleARB
-+# endif
-+#endif
-+
- #ifndef GL_ARB_shader_objects
- /* GL types for handling shader object handles and program/shader text */
- typedef char GLcharARB;		/* native character */
Index: /trunk/dports/emulators/virtualbox/files/patch-vde.diff
===================================================================
--- /trunk/dports/emulators/virtualbox/files/patch-vde.diff	(revision 97828)
+++ /trunk/dports/emulators/virtualbox/files/patch-vde.diff	(revision 97829)
@@ -1,5 +1,5 @@
 --- configure.orig	2011-08-15 19:38:16.000000000 -0500
 +++ configure	2011-08-15 19:38:16.000000000 -0500
-@@ -2532,7 +2532,7 @@
+@@ -2602,7 +2602,7 @@
  fi
  
