Revision
83173
Author
ryandesign@macports.org
Date
2011-08-26 22:35:20 -0700 (Fri, 26 Aug 2011)

Log Message

virtualbox: the build architecture must match the architecture of the kernel; see #30974

Modified Paths

Diff

Modified: trunk/dports/emulators/virtualbox/Portfile (83172 => 83173)


--- trunk/dports/emulators/virtualbox/Portfile	2011-08-27 03:51:59 UTC (rev 83172)
+++ trunk/dports/emulators/virtualbox/Portfile	2011-08-27 05:35:20 UTC (rev 83173)
@@ -6,7 +6,7 @@
 
 name                virtualbox
 version             4.1.2
-revision            2
+revision            3
 categories          emulators
 maintainers         nomaintainer
 description         open source virtualization technology from Oracle
@@ -18,8 +18,21 @@
     Source Software.
 license             GPL-2
 homepage            http://www.virtualbox.org/
-supported_archs     i386
+
+# virtualbox installs a kernel extension so it has to build for the same architecture as the kernel
+set kernel_arch [exec uname -m]
+switch ${kernel_arch} {
+    i386 -
+    x86_64 {
+        supported_archs ${kernel_arch}
+    }
+    default {
+        supported_archs i386 x86_64
+    }
+}
+
 universal_variant   no
+
 platforms           darwin
 
 master_sites        http://download.virtualbox.org/virtualbox/${version}/