[92382] trunk/dports/emulators/virtualbox/Portfile
royliu at macports.org
royliu at macports.org
Fri Apr 27 00:39:29 PDT 2012
Revision: 92382
https://trac.macports.org/changeset/92382
Author: royliu at macports.org
Date: 2012-04-27 00:39:29 -0700 (Fri, 27 Apr 2012)
Log Message:
-----------
virtualbox: remove whitespace
Modified Paths:
--------------
trunk/dports/emulators/virtualbox/Portfile
Modified: trunk/dports/emulators/virtualbox/Portfile
===================================================================
--- trunk/dports/emulators/virtualbox/Portfile 2012-04-27 05:28:49 UTC (rev 92381)
+++ trunk/dports/emulators/virtualbox/Portfile 2012-04-27 07:39:29 UTC (rev 92382)
@@ -27,10 +27,10 @@
master_sites http://download.virtualbox.org/virtualbox/${version}
if {${name} == ${subport}} {
-
+
PortGroup qt4 1.0
revision 1
-
+
# virtualbox installs a kernel extension so it has to build
# for the same architecture as the kernel
set kernel_arch [exec uname -m]
@@ -43,55 +43,55 @@
supported_archs i386 x86_64
}
}
-
+
universal_variant no
-
+
distname VirtualBox-${version}
use_bzip2 yes
-
+
checksums rmd160 68bb81486dad190a1bd74251ad32ee16d47be625 \
sha256 034cfd19d5dd701cd1375b994ad6f2d41c207b6760c6b8c5fe3005e53134dff8
-
+
depends_lib-append port:curl \
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.compiler gcc-4.2
-
+
# Use the apple-gcc-4.2 compiler because Xcode 4.2 no longer
# provides gcc-4.2 and builds with llvm-gcc-4.2 crash.
if {![file executable ${configure.cc}]} {
-
+
depends_build-append port:apple-gcc42
depends_skip_archcheck-append apple-gcc42
patchfiles-append patch-apple-gcc42.diff
configure.compiler apple-gcc-4.2
}
-
+
configure.pre_args-delete --prefix=${prefix}
-
+
configure.args --with-qt-dir=${prefix} \
--with-openssl-dir=${prefix} \
--with-gcc=${configure.cc} \
--with-g++=${configure.cxx}
-
+
# VirtualBox uses kBuild.
build.cmd ". env.sh && kmk"
-
+
# This is the open source edition of VirtualBox.
worksrcdir VirtualBox-${version}
-
+
set kext_dir /Library/Extensions
set startup_items_dir /Library/StartupItems
-
+
post-patch {
-
+
reinplace "s|@APPLICATIONS_DIR@|${applications_dir}|g" \
${worksrcpath}/LocalConfig.kmk
# TODO: The deployment target should be set dynamically, but, because of incompatibilities
@@ -100,82 +100,82 @@
${worksrcpath}/LocalConfig.kmk
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}
copy ${release_dir}/sdk ${destroot}${applications_dir}/VirtualBox.app
-
+
# 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 VBoxBalloonCtrl 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"
}
-
+
foreach executable [list VirtualBox VirtualBoxVM VBoxHeadless VBoxNetAdpCtl VBoxNetDHCP] {
file attributes ${destroot}${applications_dir}/VirtualBox.app/Contents/MacOS/${executable} -permissions "u+s"
}
}
-
+
pre-activate {
-
+
set head_path ${applications_dir}
-
+
while {${head_path} != "/"} {
-
+
if {[file attributes ${head_path} -owner] != "root" || [file attributes ${head_path} -group] != "admin"
|| [expr [file attributes ${head_path} -permissions] & 00002] != 0} {
error "VirtualBox requires the \"${applications_dir}\" directory and its parent directories to be\
root:admin owned and not world writeable."
}
-
+
set head_path [file dirname ${head_path}]
}
}
-
+
variant vde2 description {Enable support for VDE} {
-
+
depends_lib-append port:vde2
patchfiles-append patch-vde.diff
configure.args-append --enable-vde
}
-
+
variant vnc description {Enable support for VNC} {
-
+
depends_lib-append path:lib/pkgconfig/libvncserver.pc:LibVNCServer
configure.args-append --enable-vnc
}
-
+
default_variants +vde2 +vnc
-
+
startupitem.create yes
startupitem.name VirtualBox
startupitem.start "${prefix}${startup_items_dir}/VirtualBox/VirtualBox start"
@@ -195,26 +195,26 @@
subport virtualbox-guest-additions {
license VirtualBoxPUEL
-
+
description guest additions for VirtualBox
-
+
long_description ${description}
-
+
supported_archs noarch
-
+
distfiles VBoxGuestAdditions_${version}.iso
-
+
checksums rmd160 89dde3f04047f5a89fe985c0948ff8122775d2cc \
sha256 a12785fd1f202ff784da27ae75bd3fd43edaa824736b5b30499d9db993c1db64
-
+
depends_run port:virtualbox
-
+
extract.only
-
+
use_configure no
-
+
build {}
-
+
destroot {
set dir ${destroot}${applications_dir}/VirtualBox.app/Contents/MacOS/additions
xinstall -d ${dir}
@@ -256,64 +256,64 @@
description Oracle VM VirtualBox Extension Pack
long_description ${description}
-
+
depends_run port:virtualbox
-
+
distname ${name_extpack}-${version}
-
+
checksums rmd160 54e5748ee840376ca0b539e1956d496eb9c8dc9e \
sha256 82c112ab6003a92e6065a277077b2f3e1a9ca6871773ac3f4b1c771b8e699b42
-
+
worksrcdir ${name_extpack}
extract.suffix .vbox-extpack
extract.mkdir yes
-
+
use_configure no
build {
-
+
# The pre-built libraries use weird prefixes and Oracle recommends setting
# DYLD_LIBRARY_PATH to deal with this. I would rather fix the paths in the
# libraries at install time.
foreach {arch} $extension_archs {
-
+
foreach lib [glob -directory ${worksrcpath}/${arch} *.dylib*] {
-
+
system "install_name_tool -id ${applications_dir}/${ext_dir}/${name_extpack}/${arch}/[strsed ${lib} /^.*\\///] ${lib}"
-
+
# Then for each dependent dylib with a weird path that this dylib
# references, fix the reference to use ${lib_dir}.
foreach dep [exec otool -L ${lib}] {
-
+
if [string match "/Applications/${lib_dir}/*" ${dep}] {
-
+
system "install_name_tool -change ${dep} ${applications_dir}/${lib_dir}/[strsed ${dep} /^.*\\///] ${lib}"
}
}
}
}
}
-
+
destroot {
-
+
xinstall -d -o root -g admin -m 755 ${destroot}${applications_dir}/${ext_dir}/${name_extpack}
foreach {f} [glob -directory ${worksrcpath} -type f *] {
-
+
xinstall -o "root" -g "admin" -m 0755 ${f} \
${destroot}${applications_dir}/${ext_dir}/${name_extpack}
}
foreach {arch} $extension_archs {
-
+
xinstall -o "root" -g "admin" -m 0755 -d \
${destroot}${applications_dir}/${ext_dir}/${name_extpack}/${arch}
foreach {f} [glob -directory ${worksrcpath}/${arch} *] {
-
+
xinstall -o "root" -g "admin" -m 0755 ${f} \
${destroot}${applications_dir}/${ext_dir}/${name_extpack}/${arch}
}
}
}
-
+
livecheck.type regex
livecheck.url https://www.virtualbox.org/wiki/Downloads
livecheck.regex "/Oracle_VM_VirtualBox_Extension_Pack-(\\d(?!\\${extract.suffix}).*)\\${extract.suffix}"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120427/6941f148/attachment.html>
More information about the macports-changes
mailing list