--- Portfile.orig	2011-11-07 16:43:24.000000000 -0500
+++ Portfile	2011-11-07 16:43:24.000000000 -0500
@@ -42,6 +42,9 @@
                     sha1    19a801444102a10d2b62ab35daacb7ddc415bab0 \
                     rmd160  1bf368464ac0d431ac799e4710835f3426a9a5f6
 
+# TODO: Use the apple-gcc42 compiler because Xcode 4.2 no longer provides gcc-4.2 and builds with llvm-gcc-4.2 crash.
+depends_build-append        port:apple-gcc42
+
 depends_lib-append          port:curl \
                             port:libidl \
                             path:lib/pkgconfig/libxml-2.0.pc:libxml2 \
--- files/patch-build.diff.orig	2011-11-07 16:43:24.000000000 -0500
+++ files/patch-build.diff	2011-11-07 16:43:24.000000000 -0500
@@ -9,29 +9,26 @@
  endif
  
  # Keep in sync with G_virtualBoxPackage in glue-jaxws.xsl and glue-java.xsl
-@@ -1781,11 +1781,13 @@
+@@ -1781,11 +1781,11 @@
     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_PREFIX ?= llvm-
-+    VBOX_MACOSX_GCC_SUFFIX ?= -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)
 -    VBOX_MACOSX_GCC_INFIX ?= -4.0
-+    VBOX_MACOSX_GCC_PREFIX ?= llvm-
-+    VBOX_MACOSX_GCC_SUFFIX ?= -4.2
++    VBOX_MACOSX_GCC_INFIX ?= -apple-4.0
     endif
    else
     if $(VBOX_XCODE_VERSION_MAJOR) >= 4
-@@ -1793,28 +1795,30 @@
+@@ -1793,14 +1795,14 @@
     endif
     VBOX_DEF_MACOSX_VERSION_MIN ?= 10.4
     VBOX_DARWIN_NO_COMPACT_LINKEDIT ?=
 -   VBOX_MACOSX_GCC_INFIX ?= -4.0
-+   VBOX_MACOSX_GCC_PREFIX ?=
-+   VBOX_MACOSX_GCC_SUFFIX ?= -4.0
++   VBOX_MACOSX_GCC_INFIX ?= -apple-4.0
    endif
   else
    if $(VBOX_XCODE_VERSION_MAJOR) < 4 && "$(VBOX_XCODE_VERSION)" != "3.2"
@@ -39,37 +36,10 @@
    endif
    VBOX_DEF_MACOSX_VERSION_MIN ?= 10.6
 -  VBOX_MACOSX_GCC_INFIX ?= -4.2
-+  VBOX_MACOSX_GCC_PREFIX ?= llvm-
-+  VBOX_MACOSX_GCC_SUFFIX ?= -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)
-- TOOL_GCC4MACHO_CXX = g++$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
-- TOOL_GCC4MACHO_AS  = gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
-- TOOL_GCC4MACHO_LD  = gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
-- TOOL_GCC4MACHO_LD_SYSMOD = gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
-- TOOL_GXX4MACHO_CC  = gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
-- TOOL_GXX4MACHO_CXX = g++$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
-- TOOL_GXX4MACHO_OBJC= gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE) $(if-expr $(KBUILD_TARGET_ARCH) == "x86",-m32,-m64) -fvisibility=hidden
-- TOOL_GXX4MACHO_OBJCXX = gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE) $(if-expr $(KBUILD_TARGET_ARCH) == "x86",-m32,-m64) -fvisibility=hidden -fvisibility-inlines-hidden
-- TOOL_GXX4MACHO_AS  = gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
-- TOOL_GXX4MACHO_LD  = g++$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
-- TOOL_GXX4MACHO_LD_SYSMOD = g++$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
-+ TOOL_GCC4MACHO_CC  = $(VBOX_MACOSX_GCC_PREFIX)gcc$(VBOX_MACOSX_GCC_SUFFIX)$(HOSTSUFF_EXE)
-+ TOOL_GCC4MACHO_CXX = $(VBOX_MACOSX_GCC_PREFIX)g++$(VBOX_MACOSX_GCC_SUFFIX)$(HOSTSUFF_EXE)
-+ TOOL_GCC4MACHO_AS  = $(VBOX_MACOSX_GCC_PREFIX)gcc$(VBOX_MACOSX_GCC_SUFFIX)$(HOSTSUFF_EXE)
-+ TOOL_GCC4MACHO_LD  = $(VBOX_MACOSX_GCC_PREFIX)gcc$(VBOX_MACOSX_GCC_SUFFIX)$(HOSTSUFF_EXE)
-+ TOOL_GCC4MACHO_LD_SYSMOD = $(VBOX_MACOSX_GCC_PREFIX)gcc$(VBOX_MACOSX_GCC_SUFFIX)$(HOSTSUFF_EXE)
-+ TOOL_GXX4MACHO_CC  = $(VBOX_MACOSX_GCC_PREFIX)gcc$(VBOX_MACOSX_GCC_SUFFIX)$(HOSTSUFF_EXE)
-+ TOOL_GXX4MACHO_CXX = $(VBOX_MACOSX_GCC_PREFIX)g++$(VBOX_MACOSX_GCC_SUFFIX)$(HOSTSUFF_EXE)
-+ TOOL_GXX4MACHO_OBJC= $(VBOX_MACOSX_GCC_PREFIX)gcc$(VBOX_MACOSX_GCC_SUFFIX)$(HOSTSUFF_EXE) $(if-expr $(KBUILD_TARGET_ARCH) == "x86",-m32,-m64) -fvisibility=hidden
-+ TOOL_GXX4MACHO_OBJCXX = $(VBOX_MACOSX_GCC_PREFIX)gcc$(VBOX_MACOSX_GCC_SUFFIX)$(HOSTSUFF_EXE) $(if-expr $(KBUILD_TARGET_ARCH) == "x86",-m32,-m64) -fvisibility=hidden -fvisibility-inlines-hidden
-+ TOOL_GXX4MACHO_AS  = $(VBOX_MACOSX_GCC_PREFIX)gcc$(VBOX_MACOSX_GCC_SUFFIX)$(HOSTSUFF_EXE)
-+ TOOL_GXX4MACHO_LD  = $(VBOX_MACOSX_GCC_PREFIX)g++$(VBOX_MACOSX_GCC_SUFFIX)$(HOSTSUFF_EXE)
-+ TOOL_GXX4MACHO_LD_SYSMOD = $(VBOX_MACOSX_GCC_PREFIX)g++$(VBOX_MACOSX_GCC_SUFFIX)$(HOSTSUFF_EXE)
-  ifeq ($(VBOX_DEF_MACOSX_VERSION_MIN),10.4)
-   ifeq ($(origin VBOX_DARWIN_CLASSIC_LINKER),undefined)
-    VBOX_DARWIN_CLASSIC_LINKER := $(shell ld -v 2>&1 )
+  TOOL_GCC4MACHO_CC  = gcc$(VBOX_MACOSX_GCC_INFIX)$(HOSTSUFF_EXE)
 @@ -2063,22 +2063,22 @@
  VBOX_GCC32_CHECK_CXX = $(2)
  else
--- files/patch-vde.diff.orig	2011-11-07 16:43:24.000000000 -0500
+++ files/patch-vde.diff	2011-11-07 16:43:24.000000000 -0500
@@ -1,6 +1,6 @@
 --- configure.orig	2011-08-15 19:38:16.000000000 -0500
 +++ configure	2011-08-15 19:38:16.000000000 -0500
-@@ -2555,7 +2555,7 @@
+@@ -2553,7 +2553,7 @@
  fi
  
  # VDE
