[83064] trunk/dports/emulators

rmstonecipher at macports.org rmstonecipher at macports.org
Wed Aug 24 19:29:47 PDT 2011


Revision: 83064
          http://trac.macports.org/changeset/83064
Author:   rmstonecipher at macports.org
Date:     2011-08-24 19:29:47 -0700 (Wed, 24 Aug 2011)
Log Message:
-----------
new port emulators/virtualbox, a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use, closes #28469

Added Paths:
-----------
    trunk/dports/emulators/virtualbox/
    trunk/dports/emulators/virtualbox/Portfile
    trunk/dports/emulators/virtualbox/files/
    trunk/dports/emulators/virtualbox/files/patch-build.diff
    trunk/dports/emulators/virtualbox/files/patch-startup.diff
    trunk/dports/emulators/virtualbox/files/patch-vde.diff

Added: trunk/dports/emulators/virtualbox/Portfile
===================================================================
--- trunk/dports/emulators/virtualbox/Portfile	                        (rev 0)
+++ trunk/dports/emulators/virtualbox/Portfile	2011-08-25 02:29:47 UTC (rev 83064)
@@ -0,0 +1,126 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem          1.0
+PortGroup           qt4 1.0
+
+name                virtualbox
+version             4.1.2
+categories          emulators
+maintainers         nomaintainer
+description         open source virtualization technology from Oracle
+long_description \
+    VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for \
+    enterprise as well as home use. Not only is VirtualBox an extremely \
+    feature rich, high performance product for enterprise customers, it is \
+    also the only professional solution that is freely available as Open \
+    Source Software.
+license             GPL-2
+homepage            http://www.virtualbox.org/
+supported_archs     i386 x86_64
+universal_variant   no
+platforms           darwin
+
+master_sites        http://download.virtualbox.org/virtualbox/${version}/
+distname            VirtualBox-${version}
+use_bzip2           yes
+
+checksums           md5     945d2c94c15a4f47280be4b01b67e244 \
+                    sha1    52e35e0400fb12a5277a6e126478bb8f53c3e46d \
+                    rmd160  0004a00c968ee835083416022240e212903f394d
+
+depends_lib-append          port:libidl \
+                            path:lib/pkgconfig/libxml-2.0.pc:libxml2 \
+                            path:lib/pkgconfig/libxslt.pc:libxslt \
+                            path:lib/pkgconfig/openssl.pc:openssl \
+                            path:lib/pkgconfig/sdl.pc:libsdl
+
+patchfiles                  patch-build.diff \
+                            patch-startup.diff
+
+configure.pre_args-delete   --prefix=${prefix}
+
+configure.args              --disable-hardening \
+                            --with-qt-dir=${prefix} \
+                            --with-openssl-dir=${prefix}
+
+# VirtualBox uses kBuild.
+build.cmd                   ". env.sh && kmk"
+
+# This is the open source edition of VirtualBox.
+worksrcdir                  VirtualBox-${version}_OSE
+
+set kext_dir                /Library/Extensions
+set startup_items_dir       /Library/StartupItems
+
+post-patch {
+
+    reinplace "s|@CONFIGURE\\.CC@|${configure.cc}|g" \
+        ${worksrcpath}/configure
+    reinplace "s|@CONFIGURE\\.CXX@|${configure.cxx}|g" \
+        ${worksrcpath}/configure
+    reinplace "s|@KEXT_DIR@|${prefix}${kext_dir}|g" \
+        ${worksrcpath}/src/VBox/Installer/darwin/VBoxStartupItems/VirtualBox/VirtualBox
+
+    if {[variant_isset vde2]} {
+        reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/include/VBox/VDEPlugSymDefs.h
+    }
+}
+
+destroot {
+
+    set release_dir [lindex [glob -- ${worksrcpath}/out/darwin.*/release/dist] 0]
+
+    xinstall -m 755 -d ${destroot}${applications_dir}
+    copy ${release_dir}/VirtualBox.app ${destroot}${applications_dir}
+
+    # Set the owner and group to root:wheel, which is required for kernel extensions and possibly startup items.
+
+    xinstall -m 755 -o root -g wheel -d ${destroot}${prefix}${kext_dir}
+
+    foreach kext [glob -- ${release_dir}/*.kext] {
+        copy ${kext} ${destroot}${prefix}${kext_dir}
+    }
+
+    xinstall -m 755 -o root -g wheel -d ${destroot}${prefix}${startup_items_dir}
+    copy ${worksrcpath}/src/VBox/Installer/darwin/VBoxStartupItems/VirtualBox ${destroot}${prefix}${startup_items_dir}
+
+    # Create proxies for binaries bundled with VirtualBox.app.
+
+    foreach app_proxy [list VirtualBox VBoxManage VBoxHeadless] {
+
+        set app_proxy_file [open ${destroot}${prefix}/bin/${app_proxy} w]
+
+        puts $app_proxy_file "#!/usr/bin/env bash"
+        puts $app_proxy_file "exec -- ${applications_dir}/VirtualBox.app/Contents/MacOS/${app_proxy} \"\$@\""
+
+        close $app_proxy_file
+
+        file attributes ${destroot}${prefix}/bin/${app_proxy} -permissions "+x"
+    }
+}
+
+variant vde2 description {Enable support for VDE} {
+
+    depends_lib-append      port:vde2
+    patchfiles-append       patch-vde.diff
+    configure.args-append   --enable-vde
+}
+
+default_variants            +vde2
+
+startupitem.create          yes
+startupitem.name            VirtualBox
+startupitem.start           "${prefix}${startup_items_dir}/VirtualBox/VirtualBox start"
+startupitem.stop            "${prefix}${startup_items_dir}/VirtualBox/VirtualBox stop"
+startupitem.restart         "${prefix}${startup_items_dir}/VirtualBox/VirtualBox restart"
+startupitem.pidfile         none
+
+livecheck.type              regex
+
+if {[lindex [split ${version} .] 2] == 0} {
+    livecheck.version       [join [lrange [split ${version} .] 0 1] .]
+}
+
+livecheck.url               ${homepage}
+livecheck.regex             "VirtualBox (\\d+\\.\\d+(?:\\.\\d+)?) released!"


Property changes on: trunk/dports/emulators/virtualbox/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/emulators/virtualbox/files/patch-build.diff
===================================================================
--- trunk/dports/emulators/virtualbox/files/patch-build.diff	                        (rev 0)
+++ trunk/dports/emulators/virtualbox/files/patch-build.diff	2011-08-25 02:29:47 UTC (rev 83064)
@@ -0,0 +1,377 @@
+--- Config.kmk.orig	2011-08-15 19:38:16.000000000 -0500
++++ Config.kmk	2011-08-15 19:38:16.000000000 -0500
+@@ -1094,7 +1094,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
+ # the VirtualBox team.
+- VBOX_BUILD_PUBLISHER = _OSE
++ VBOX_BUILD_PUBLISHER = _MacPorts
+ endif
+ 
+ # Keep in sync with G_virtualBoxPackage in glue-jaxws.xsl and glue-java.xsl
+@@ -2065,22 +2065,22 @@
+ VBOX_GCC32_CHECK_CXX = $(2)
+ else
+ VBOX_GCC_CHECK_CC = $(shell \
+-   if $(TOOL_$(VBOX_GCC_TOOL)_CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; \
++   if $(TOOL_$(VBOX_GCC_TOOL)_CC) $(1) -S -xc /dev/null > /dev/null 2>&1; \
+    then echo "$(1)"; \
+    else echo "$(2)"; fi; )
+ 
+ VBOX_GCC_CHECK_CXX = $(shell \
+-   if $(TOOL_$(VBOX_GCC_TOOL)_CXX) $(1) -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1; \
++   if $(TOOL_$(VBOX_GCC_TOOL)_CXX) $(1) -S -xc++ /dev/null > /dev/null 2>&1; \
+    then echo "$(1)"; \
+    else echo "$(2)"; fi; )
+ 
+ VBOX_GCC_CHECK_LD = $(shell \
+-   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 ;\
++   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 ;\
+    then echo "-Wl,$(1)"; \
+    else echo "$(2)"; fi; )
+ 
+ VBOX_GCC32_CHECK_CXX = $(shell \
+-   if $(TOOL_$(VBOX_GCC32_TOOL)_CXX) $(1) -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1; \
++   if $(TOOL_$(VBOX_GCC32_TOOL)_CXX) $(1) -S -xc++ /dev/null > /dev/null 2>&1; \
+    then echo "$(1)"; \
+    else echo "$(2)"; fi; )
+ endif
+@@ -3945,25 +3945,6 @@
+  # be cleaned up properly later some time (not important now).
+  #
+  ifeq ($(VBOX_PATH_QT4),)
+-  ifeq ($(KBUILD_TARGET),darwin)
+-   VBOX_PATH_QT4 := $(lastword $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*)))
+-   ifeq ($(VBOX_PATH_QT4),)
+-    ifneq ($(wildcard /Library/Frameworks/QtCore.framework),)
+-     # Using the global installation (for OSE).
+-     VBOX_PATH_QT4 ?= /usr
+-     VBOX_PATH_QT4_FRAMEWORKS ?= /Library/Frameworks
+-    endif
+-   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 $(sort $(wildcard $(PATH_DEVTOOLS_TRG)/qt/v4*)))
+-   ifneq ($(VBOX_PATH_QT4),)
+-    VBOX_WITH_QT4_SUN = 1
+-   endif
+-  endif
+- endif
+- ifeq ($(VBOX_PATH_QT4),)
+   if1of ($(USERNAME), bird)
+    # gentoo (64-bit)
+    VBOX_PATH_QT4          ?= /usr
+--- /dev/null	2011-08-15 19:38:06.000000000 -0500
++++ LocalConfig.kmk	2011-08-15 19:38:17.000000000 -0500
+@@ -0,0 +1,3 @@
++VBOX_DEF_MACOSX_VERSION_MIN = 10.6
++VBOX_DARWIN_NO_COMPACT_LINKEDIT =
++VBOX_MACOS_10_5_WORKAROUND =
+--- 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.
+ #
+-ifeq ($(KBUILD_TARGET),darwin)
+- INSTALLS += qt4-bin
+- qt4-bin_MODE = 755
+- qt4-bin_INST = $(INST_VIRTUALBOX)Contents/
+- qt4-bin_SOURCES = $(foreach qtmod,$(VBOX_QT4_MOD_NAMES) \
+-  	,$(PATH_SDK_QT4_LIB)/$(qtmod).framework/Versions/4/$(qtmod)=>Frameworks/$(qtmod).framework/Versions/4/$(qtmod))
+- ifdef VBOX_WITH_COCOA_QT
+-  qt4-bin_SOURCES += \
+-  	$(PATH_SDK_QT4_LIB)/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/classes.nib=>Frameworks/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/classes.nib \
+-  	$(PATH_SDK_QT4_LIB)/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/info.nib=>Frameworks/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/info.nib \
+-  	$(PATH_SDK_QT4_LIB)/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/keyedobjects.nib=>Frameworks/QtGui$(VBOX_QT4_INFIX).framework/Versions/4/Resources/qt_menu.nib/keyedobjects.nib
+- endif
+- ifneq ($(wildcard $(VBOX_PATH_QT4)/plugins/accessible/libqtaccessiblewidgets.dylib),)
+-  qt4-bin_SOURCES += \
+-  	$(VBOX_PATH_QT4)/plugins/accessible/libqtaccessiblewidgets.dylib=>MacOS/accessible/libqtaccessiblewidgets.dylib
+- endif
+- qt4-bin_SYMLINKS = $(foreach qtmod, $(VBOX_QT4_MOD_NAMES) \
+- 		,Frameworks/$(qtmod).framework/$(qtmod)=>Versions/4/$(qtmod))
+- ifdef VBOX_WITH_COCOA_QT
+-  qt4-bin_SYMLINKS += \
+-  	Frameworks/QtGui$(VBOX_QT4_INFIX).framework/Resources=>Versions/4/Resources/
+- endif
+-else
+- ifdef VBOX_WITH_QT4_SUN
+-  ifeq ($(KBUILD_TARGET),win)
+-   INSTALLS += qt4-bin
+-   qt4-bin_MODE = 755
+-   qt4-bin_INST = $(INST_BIN)
+-   qt4-bin_SOURCES = \
+-	$(foreach qtmod,$(VBOX_QT4_MOD_NAMES),$(VBOX_PATH_QT4_LIB)/$(qtmod)4$(SUFF_DLL)) \
+- 	$(VBOX_PATH_QT4)/plugins/accessible/qtaccessiblewidgets4$(SUFF_DLL)=>accessible/qtaccessiblewidgets4$(SUFF_DLL)
+-  else
+-   INSTALLS += qt4-bin
+-   qt4-bin_MODE = 755
+-   qt4-bin_INST = $(INST_BIN)
+-   qt4-bin_SOURCES = \
+-	$(foreach qtmod,$(VBOX_QT4_MOD_NAMES),$(VBOX_PATH_QT4_LIB)/lib$(qtmod)$(SUFF_DLL).4) \
+- 	$(VBOX_PATH_QT4)/plugins/accessible/libqtaccessiblewidgets$(SUFF_DLL)=>accessible/libqtaccessiblewidgets$(SUFF_DLL)
+-  endif
+- endif # VBOX_WITH_QT4_SUN
+-endif
+ 
+ 
+ #
+--- configure.orig	2011-08-15 19:38:16.000000000 -0500
++++ configure	2011-08-15 19:38:16.000000000 -0500
+@@ -96,10 +96,10 @@
+ BUILD_LIBCURL=
+ BUILD_LIBSSL=
+ PASSIVE_MESA=0
+-CC="gcc"
++CC="@CONFIGURE.CC@"
+ CC32=""
+ CC64=""
+-CXX="g++"
++CXX="@CONFIGURE.CXX@"
+ CXX32=""
+ CXX64=""
+ BCC="bcc"
+@@ -1100,21 +1100,6 @@
+ check_sdl()
+ {
+   test_header SDL
+-  if [ "$OS" = "darwin" ]; then
+-    if [ -f "/System/Library/Frameworks/SDL.framework/SDL" ]; then
+-      PATH_SDK_LIBSDL="/System/Library/Frameworks/SDL.framework"
+-    elif [ -f "/Library/Frameworks/SDL.framework/SDL" ]; then
+-      PATH_SDK_LIBSDL="/Library/Frameworks/SDL.framework"
+-    fi
+-    if [ -n "$PATH_SDK_LIBSDL" ]; then
+-      foundsdl=1
+-      INCSDL="$PATH_SDK_LIBSDL/Headers"
+-      FLDSDL="-framework SDL"
+-    else
+-      log_failure "SDL framework not found"
+-      fail
+-    fi
+-  else
+     if which_wrapper sdl-config > /dev/null; then
+       FLGSDL=`sdl-config --cflags`
+       INCSDL=`strip_I "$FLGSDL"`
+@@ -1123,7 +1108,6 @@
+       FLDSDL=
+       foundsdl=1
+     fi
+-  fi
+   [ "$OS" = "linux" -o "$OS" = "darwin" -o "$OS" = "solaris" ] && LIBSDLMAIN=""
+   if [ -n "$foundsdl" ]; then
+     cat > $ODIR.tmp_src.cc << EOF
+@@ -1471,53 +1455,20 @@
+ {
+   foundqt4=
+   test_header Qt4
+-  if [ "$OS" = "darwin" ]; then
+-    # First check if there is the internal version of Qt. If yes nothing else
+-    # has to be done.
+-    QT_INTERNAL=`/bin/ls -rd1 $PWD/tools/$BUILD_TARGET.$BUILD_PLATFORM_ARCH/qt/* 2> /dev/null`
+-    for t in $QT_INTERNAL; do
+-        if [ -f "$t/Frameworks/QtCoreVBox.framework/QtCoreVBox" ]; then
+-          cnf_append "VBOX_WITH_QT4_SUN" "1"
+-          log_success "use internal version"
+-          return
+-        fi
+-    done
+-    # Now try the user provided directory and some of the standard directories.
+-    QT_TRIES="$QT4DIR /System/Library /Library"
+-    for t in $QT_TRIES; do
+-        if [ -f "$t/Frameworks/QtCore.framework/QtCore" ]; then
+-          PATH_SDK_QT4="$t"
+-          break
+-        fi
+-    done
+-    # Add the necessary params for building the test application
+-    if [ -n "$PATH_SDK_QT4" ]; then
+-      foundqt4=1
+-      INCQT4=-I$PATH_SDK_QT4/Frameworks/QtCore.framework/Headers
+-      LIBQT4=-F$PATH_SDK_QT4/Frameworks
+-      FLGQT4="-framework QtCore"
+-    else
+-      log_failure "Qt4 framework not found (can be disabled using --disable-qt4)"
+-      fail
+-    fi
+-  else
+     if [ $QT4DIR_PKGCONFIG -eq 1 ]; then
+       # default is to use pkg-config
+       if which_wrapper pkg-config > /dev/null; then
+         # this braindead path is necessary for mdv2008.1
+         qt4_ver=`\
+-            PKG_CONFIG_PATH=/usr/lib/qt4/lib/pkgconfig \
+             pkg-config QtCore --modversion 2>> $LOG`
+         if [ $? -ne 0 ]; then
+           log_failure "QtCore not found"
+           fail
+         else
+           FLGQT4=`\
+-              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_ALLOW_SYSTEM_LIBS=1 \
+               pkg-config QtCore --libs`
+           foundqt4=1
+@@ -1559,7 +1510,6 @@
+         fi
+       done
+     fi
+-  fi
+   if [ -n "$foundqt4" ]; then
+     cat > $ODIR.tmp_src.cc << EOF
+ #include <cstdio>
+@@ -1579,21 +1529,6 @@
+     [ -n "$INCQT4" ] && I_INCQT4=`prefix_I "$INCQT4"`
+     if test_compile "$LIBQT4 $LIBPTHREAD $I_INCQT4 $FLGQT4" qt4 qt4 nofatal; then
+       if test_execute_path "`strip_L "$LIBQT4"`"; then
+-        if [ "$OS" = "darwin" ]; then
+-          # Successful build & run the test application so add the necessary
+-          # params to AutoConfig.kmk
+-          cnf_append "PATH_SDK_QT4_INC" "$PATH_SDK_QT4/Frameworks"
+-          cnf_append "PATH_SDK_QT4_LIB" "$PATH_SDK_QT4/Frameworks"
+-          cnf_append "PATH_SDK_QT4" "$PATH_SDK_QT4/Frameworks"
+-          # Check for the moc tool in the Qt directory found & some standard
+-          # directories.
+-          for q in $PATH_SDK_QT4 /usr /Developer/Tools/Qt; do
+-            if which_wrapper "$q/bin/moc" > /dev/null; then
+-              cnf_append "PATH_TOOL_QT4" "$q"
+-              cnf_append "PATH_TOOL_QT4_BIN" "$q/bin"
+-            fi
+-          done
+-        else
+           # strip .../QtCore as we add components ourself
+           INCQT4=`echo "$INCQT4"|$KBUILD_SED 's|\([^ ]*\)/QtCore|\1|g; s| $||g'`
+           # store only the first path, remove all other pathes
+@@ -1639,7 +1574,6 @@
+               fi
+             fi
+           done
+-        fi
+       fi
+     else
+       log_failure "qt4 not working"
+@@ -2242,8 +2176,6 @@
+   WITH_PULSE=0
+   WITH_DBUS=0
+   WITH_KMODS=0
+-  BUILD_LIBXSLT=1
+-  BUILD_LIBXML2=1
+   [ $OSE -eq 1 ] || BUILD_LIBCURL=1
+   [ $OSE -eq 1 ] || BUILD_LIBSSL=1
+ fi
+@@ -2281,7 +2213,7 @@
+     --with-openssl-dir=*)
+       OPENSSLDIR=`echo $option | cut -d'=' -f2`
+       INCCRYPTO="-I${OPENSSLDIR}/include"
+-      LIBCRYPTO="${OPENSSLDIR}/lib/libcrypto.a ${OPENSSLDIR}/lib/libssl.a"
++      LIBCRYPTO="${OPENSSLDIR}/lib/libcrypto.dylib ${OPENSSLDIR}/lib/libssl.dylib"
+       ;;
+     --with-gsoap-dir=*)
+       GSOAP=`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
+@@ -70,13 +70,6 @@
+  ifeq ($(PATH_SDK_QT4),)
+   # If target == host, try look for Qt in the various platform specific places.
+   ifeq ($(KBUILD_TARGET),$(KBUILD_HOST))
+-   ifeq ($(KBUILD_TARGET),darwin)
+-    PATH_SDK_QT4 := $(patsubst %/Frameworks/QtCore.framework/Versions/4,%,$(firstword $(wildcard /Library/Frameworks/QtCore.framework/Versions/4)))
+-   else ifeq ($(KBUILD_TARGET),win)
+-    # No idea here yet...
+-   else ifeq ($(KBUILD_TARGET),ose)
+-    # No port...
+-   else
+     # The Unices. Includes and esp. libs are tricky, so override the PATH_SDK_QT4_LIB* stuff if it doesn't work.
+     # Try find the general root of thing by looking for the qt3to4 program, if not found, then look for rcc.
+     PATH_SDK_QT4 := $(patsubst %/bin/qt3to4,%,$(firstword $(wildcard \
+@@ -163,7 +156,6 @@
+      endif
+ 
+     endif
+-   endif # Unices
+   endif
+   # Found it?
+   ifeq ($(PATH_SDK_QT4),)
+@@ -178,18 +170,8 @@
+ 
+ # Libraries can be in either Frameworks or lib depending on how you
+ # build it on the mac. The .dmg installs into Frameworks but builds into lib.
+-ifeq ($(KBUILD_TARGET),darwin)
+- ifndef PATH_SDK_QT4_LIB
+-  ifneq ($(wildcard $(PATH_SDK_QT4)/Frameworks),)
+-   PATH_SDK_QT4_LIB ?= $(PATH_SDK_QT4)/Frameworks
+-  else
+-   PATH_SDK_QT4_LIB ?= $(PATH_SDK_QT4)/lib
+-  endif
+- endif
+-else
+- PATH_SDK_QT4_LIB ?= $(PATH_SDK_QT4)/lib
+- PATH_SDK_QT4_INC ?= $(PATH_SDK_QT4)/include
+-endif
++PATH_SDK_QT4_LIB ?= $(PATH_SDK_QT4)/lib
++PATH_SDK_QT4_INC ?= $(PATH_SDK_QT4)/include
+ 
+ # The bits that kBuild picks up.
+ #  (nothing here)
+@@ -953,23 +935,8 @@
+  	$($(target)_QT_INFIX.$(bld_trg_cpu)) \
+  	$($(target)_QT_INFIX.$(bld_type)) \
+  	$($(target)_QT_INFIX))
+-ifeq ($(bld_trg),darwin)
+- # Adding -F to CXXFLAGS is necessary to make #include <QtCore/qstring.h> stuff work...
+- $(eval $(target)_CXXFLAGS += -F$(PATH_SDK_QT4_LIB) )
+- $(eval $(target)_OBJCXXFLAGS += -F$(PATH_SDK_QT4_LIB) )
+- $(eval $(target)_LDFLAGS  += -F$(PATH_SDK_QT4_LIB) $(foreach module,$(qt_modules), -framework $(qt_prefix)Qt$(module)$(qt_infix)) )
+- $(eval $(target)_INCS     += $(foreach module,$(qt_modules), $(PATH_SDK_QT4_LIB)/$(qt_prefix)Qt$(module)$(qt_infix).framework/Versions/4/Headers) )
+-else
+- ifeq ($(bld_trg),win)
+-  $(eval $(target)_LIBS    += $(foreach module,$(qt_modules), $(PATH_SDK_QT4_LIB)/$(qt_prefix)Qt$(module)$(qt_infix)4$(SUFF_LIB)) )
+-  ifeq ($(tool_do),LINK_PROGRAM)
+-   $(eval $(target)_LIBS   += $(PATH_SDK_QT4_LIB)/$(qt_prefix)qtmain$(qt_infix)$(SUFF_LIB) )
+-  endif
+- else
+-  $(eval $(target)_LIBS    += $(foreach module,$(qt_modules), $(PATH_SDK_QT4_LIB)/lib$(qt_prefix)Qt$(module)$(qt_infix)$(SUFF_DLL)) )
+- endif
+- $(eval $(target)_INCS     += $(addprefix $(PATH_SDK_QT4_INC)/Qt,$(qt_modules)) $(PATH_SDK_QT4_INC) )
+-endif
++$(eval $(target)_LIBS      += $(foreach module,$(qt_modules), $(PATH_SDK_QT4_LIB)/lib$(qt_prefix)Qt$(module)$(qt_infix)$(SUFF_DLL)) )
++$(eval $(target)_INCS      += $(addprefix $(PATH_SDK_QT4_INC)/Qt,$(qt_modules)) $(PATH_SDK_QT4_INC) )
+ $(eval $(target)_DEFS      += $(foreach module,$(toupper $(qt_modules)), QT_$(module)_LIB) )
+ 
+ 
+--- src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp.orig	2011-08-15 19:38:17.000000000 -0500
++++ src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp	2011-08-15 19:38:17.000000000 -0500
+@@ -1454,7 +1454,7 @@
+ 
+     /* Check for the already registered image */
+     CVirtualBox vbox = vboxGlobal().virtualBox();
+-    QString name = QString("VBoxGuestAdditions_%1.iso").arg(vbox.GetVersion().remove("_OSE"));
++    QString name = QString("VBoxGuestAdditions_%1.iso").arg(vbox.GetVersion().remove("_MacPorts"));
+ 
+     CMediumVector vec = vbox.GetDVDImages();
+     for (CMediumVector::ConstIterator it = vec.begin(); it != vec.end(); ++ it)
+@@ -1470,7 +1470,7 @@
+     int result = msgCenter().cannotFindGuestAdditions(QDir::toNativeSeparators(strSrc1), QDir::toNativeSeparators(strSrc2));
+     if (result == QIMessageBox::Yes)
+     {
+-        QString source = QString("http://download.virtualbox.org/virtualbox/%1/").arg(vbox.GetVersion().remove("_OSE")) + name;
++        QString source = QString("http://download.virtualbox.org/virtualbox/%1/").arg(vbox.GetVersion().remove("_MacPorts")) + name;
+         QString target = QDir(vboxGlobal().virtualBox().GetHomeFolder()).absoluteFilePath(name);
+ 
+         UIDownloaderAdditions *pDl = UIDownloaderAdditions::create();
+--- src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp.orig	2011-08-15 19:38:17.000000000 -0500
++++ src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp	2011-08-15 19:38:17.000000000 -0500
+@@ -2833,7 +2833,7 @@
+         UIDownloaderUserManual *pDl = UIDownloaderUserManual::create();
+         /* Configure User Manual downloader: */
+         CVirtualBox vbox = vboxGlobal().virtualBox();
+-        pDl->addSource(QString("http://download.virtualbox.org/virtualbox/%1/").arg(vbox.GetVersion().remove("_OSE")) + strShortFileName);
++        pDl->addSource(QString("http://download.virtualbox.org/virtualbox/%1/").arg(vbox.GetVersion().remove("_MacPorts")) + strShortFileName);
+         pDl->addSource(QString("http://download.virtualbox.org/virtualbox/") + strShortFileName);
+         pDl->setTarget(strUserManualFileName2);
+         pDl->setParentWidget(mainWindowShown());

Added: trunk/dports/emulators/virtualbox/files/patch-startup.diff
===================================================================
--- trunk/dports/emulators/virtualbox/files/patch-startup.diff	                        (rev 0)
+++ trunk/dports/emulators/virtualbox/files/patch-startup.diff	2011-08-25 02:29:47 UTC (rev 83064)
@@ -0,0 +1,92 @@
+--- src/VBox/Installer/darwin/VBoxStartupItems/VirtualBox/VirtualBox.orig	2011-08-15 19:38:17.000000000 -0500
++++ src/VBox/Installer/darwin/VBoxStartupItems/VirtualBox/VirtualBox	2011-08-15 19:38:17.000000000 -0500
+@@ -22,46 +22,22 @@
+     VBOXUSB="VBoxUSB"
+ 
+     #
+-    # Switch the binaries to the right architecture.
+-    #
+-    VBOX_ARCH=`uname -m`
+-    if test "$VBOX_ARCH" = "x86_64"; then
+-        VBOX_ARCH="amd64"
+-    else
+-        VBOX_ARCH="x86"
+-    fi
+-    for VBOX_TRG in `ls /Applications/VirtualBox.app/Contents/MacOS/*-${VBOX_ARCH}`;
+-    do
+-        VBOX_LINKNAME=`echo "$VBOX_TRG" | sed -e 's|-'"${VBOX_ARCH}"'$||' `
+-        if test "$VBOX_LINKNAME" != "$VBOX_TRG"; then
+-            rm -f "$VBOX_LINKNAME"
+-            if ! ln -vh "$VBOX_TRG" "$VBOX_LINKNAME"; then
+-                ConsoleMessage "Error: ln -vh $VBOX_TRG $VBOX_LINKNAME failed"
+-                VBOX_RC=1
+-            fi
+-        else
+-            ConsoleMessage "Error: Script error VBOX_TRG=$VBOX_TRG"
+-            VBOX_RC=1
+-        fi
+-    done
+-
+-    #
+     # Check that all the directories exist first.
+     #
+-    if [ ! -d /Library/Extensions/${VBOXDRV}.kext ]; then
+-        ConsoleMessage "Error: /Library/Extensions/${VBOXDRV}.kext is missing"
++    if [ ! -d @KEXT_DIR@/${VBOXDRV}.kext ]; then
++        ConsoleMessage "Error: @KEXT_DIR@/${VBOXDRV}.kext is missing"
+         VBOX_RC=1
+     fi
+-    if [ ! -d /Library/Extensions/${VBOXUSB}.kext ]; then
+-        ConsoleMessage "Error: /Library/Extensions/${VBOXUSB}.kext is missing"
++    if [ ! -d @KEXT_DIR@/${VBOXUSB}.kext ]; then
++        ConsoleMessage "Error: @KEXT_DIR@/${VBOXUSB}.kext is missing"
+         VBOX_RC=1
+     fi
+-    if [ ! -d /Library/Extensions/VBoxNetFlt.kext ]; then
+-        ConsoleMessage "Error: /Library/Extensions/VBoxNetFlt.kext is missing"
++    if [ ! -d @KEXT_DIR@/VBoxNetFlt.kext ]; then
++        ConsoleMessage "Error: @KEXT_DIR@/VBoxNetFlt.kext is missing"
+         VBOX_RC=1
+     fi
+-    if [ ! -d /Library/Extensions/VBoxNetAdp.kext ]; then
+-        ConsoleMessage "Error: /Library/Extensions/VBoxNetAdp.kext is missing"
++    if [ ! -d @KEXT_DIR@/VBoxNetAdp.kext ]; then
++        ConsoleMessage "Error: @KEXT_DIR@/VBoxNetAdp.kext is missing"
+         VBOX_RC=1
+     fi
+ 
+@@ -93,26 +69,26 @@
+     #
+     if [ $VBOX_RC -eq 0 ]; then
+         ConsoleMessage "Loading ${VBOXDRV}.kext"
+-        if ! kextload /Library/Extensions/${VBOXDRV}.kext; then
+-            ConsoleMessage "Error: Failed to load /Library/Extensions/${VBOXDRV}.kext"
++        if ! kextload @KEXT_DIR@/${VBOXDRV}.kext; then
++            ConsoleMessage "Error: Failed to load @KEXT_DIR@/${VBOXDRV}.kext"
+             VBOX_RC=1
+         fi
+ 
+         ConsoleMessage "Loading ${VBOXUSB}.kext"
+-        if ! kextload -d /Library/Extensions/${VBOXDRV}.kext /Library/Extensions/${VBOXUSB}.kext; then
+-            ConsoleMessage "Error: Failed to load /Library/Extensions/${VBOXUSB}.kext"
++        if ! kextload -d @KEXT_DIR@/${VBOXDRV}.kext @KEXT_DIR@/${VBOXUSB}.kext; then
++            ConsoleMessage "Error: Failed to load @KEXT_DIR@/${VBOXUSB}.kext"
+             VBOX_RC=1
+         fi
+ 
+         ConsoleMessage "Loading VBoxNetFlt.kext"
+-        if ! kextload -d /Library/Extensions/${VBOXDRV}.kext /Library/Extensions/VBoxNetFlt.kext; then
+-            ConsoleMessage "Error: Failed to load /Library/Extensions/VBoxNetFlt.kext"
++        if ! kextload -d @KEXT_DIR@/${VBOXDRV}.kext @KEXT_DIR@/VBoxNetFlt.kext; then
++            ConsoleMessage "Error: Failed to load @KEXT_DIR@/VBoxNetFlt.kext"
+             VBOX_RC=1
+         fi
+ 
+         ConsoleMessage "Loading VBoxNetAdp.kext"
+-        if ! kextload -d /Library/Extensions/${VBOXDRV}.kext /Library/Extensions/VBoxNetAdp.kext; then
+-            ConsoleMessage "Error: Failed to load /Library/Extensions/VBoxNetAdp.kext"
++        if ! kextload -d @KEXT_DIR@/${VBOXDRV}.kext @KEXT_DIR@/VBoxNetAdp.kext; then
++            ConsoleMessage "Error: Failed to load @KEXT_DIR@/VBoxNetAdp.kext"
+             VBOX_RC=1
+         fi
+ 

Added: trunk/dports/emulators/virtualbox/files/patch-vde.diff
===================================================================
--- trunk/dports/emulators/virtualbox/files/patch-vde.diff	                        (rev 0)
+++ trunk/dports/emulators/virtualbox/files/patch-vde.diff	2011-08-25 02:29:47 UTC (rev 83064)
@@ -0,0 +1,22 @@
+--- configure.orig	2011-08-15 19:38:16.000000000 -0500
++++ configure	2011-08-15 19:38:16.000000000 -0500
+@@ -2553,7 +2553,7 @@
+ fi
+ 
+ # VDE
+-if [ "$OS" = "linux" -o "$OS" = "freebsd" ]; then
++if [ "$OS" = "linux" -o "$OS" = "freebsd" -o "$OS" = "darwin" ]; then
+   if [ $WITH_VDE -eq 1 ]; then
+     cnf_append "VBOX_WITH_VDE" "1"
+   fi
+--- include/VBox/VDEPlugSymDefs.h.orig	2011-08-15 19:38:16.000000000 -0500
++++ include/VBox/VDEPlugSymDefs.h	2011-08-15 19:38:16.000000000 -0500
+@@ -43,7 +43,7 @@
+ };
+ 
+ /** The file name of the DBus library */
+-#define VBOX_LIB_VDE_PLUG_NAME "libvdeplug.so"
++#define VBOX_LIB_VDE_PLUG_NAME "@PREFIX@/lib/libvdeplug.dylib"
+ #define RT_RUNTIME_LOADER_LIB_NAME VBOX_LIB_VDE_PLUG_NAME
+ 
+ /** The name of the loader function */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110824/f6526566/attachment-0001.html>


More information about the macports-changes mailing list