Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VirtualBox: 64bit build, fixed build, cleanup
We finally have VirtualBox support for 64 bit. This actually was a small change and results in the simulator not being able to handle 32bit perfectly anymore, but at least it compiles on 64bit lunar boxes.
- Loading branch information
Showing
2 changed files
with
63 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,70 @@ | ||
( | ||
# make configure accept gcc 4.8 | ||
sedit "s:cc_min -gt 7:cc_min -gt 8:" configure && | ||
sedit "s:VBOX_GCC_WERR ?= -Werror:VBOX_GCC_WERR ?=:" Config.kmk && | ||
|
||
# Fixes a gcc 4.4 build failure. | ||
echo "VBOX_WITH_TESTCASES =" > LocalConfig.kmk && | ||
# don't build tests | ||
echo "VBOX_WITH_TESTCASES =" >> LocalConfig.kmk && | ||
echo "VBOX_WITH_TESTSUITE =" >> LocalConfig.kmk && | ||
|
||
if in_depends $MODULE sun-jdk ; then | ||
# Location of javac | ||
. /etc/profile.d/sun-jdk.rc && | ||
export VBOX_JAVA_HOME=$JAVA_HOME | ||
fi && | ||
if in_depends $MODULE sun-jdk ; then | ||
# Location of javac | ||
. /etc/profile.d/sun-jdk.rc && | ||
export VBOX_JAVA_HOME=$JAVA_HOME | ||
fi && | ||
|
||
if in_depends $MODULE qt4 ; then | ||
# We need the qt4 paths | ||
. /etc/profile.d/qt4.rc && | ||
sedit "s:qt4/lib/pkgconfig:qt4/pkgconfig:g" configure | ||
fi && | ||
if in_depends $MODULE qt4 ; then | ||
# We need the qt4 paths | ||
. /etc/profile.d/qt4.rc && | ||
sedit "s:qt4/lib/pkgconfig:qt4/pkgconfig:g" configure | ||
fi && | ||
|
||
# Build VirtualBox | ||
# Disable hardening, so normal users can run it | ||
OPTS+=" --disable-hardening" && | ||
./configure $OPTS && | ||
source ./env.sh && | ||
if ! module_installed Linux-PAM ; then | ||
sedit "s/VBOX_WITH_PAM/VBOX_WITHOUT_PAM/" Config.kmk | ||
fi && | ||
kmk && | ||
# Build VirtualBox | ||
# Disable hardening, so normal users can run it | ||
OPTS+=" --disable-hardening" && | ||
./configure $OPTS && | ||
source ./env.sh && | ||
if ! module_installed Linux-PAM ; then | ||
sedit "s/VBOX_WITH_PAM/VBOX_WITHOUT_PAM/" Config.kmk | ||
fi && | ||
kmk && | ||
|
||
# Build source package for kernel module | ||
pushd out/linux.x86/release/bin/ && | ||
message "Building ${MODULE_COLOR}virtualbox-module-${VERSION_COLOR}${VERSION}${DEFAULT_COLOR}." && | ||
message "This may take a while..." && | ||
tar -cjf $SOURCE_CACHE/virtualbox-module-$VERSION.tar.bz2 src && | ||
popd && | ||
# Build source package for kernel module | ||
pushd out/linux.*/release/bin/ && | ||
message "Building ${MODULE_COLOR}virtualbox-module-${VERSION_COLOR}${VERSION}${DEFAULT_COLOR}." && | ||
message "This may take a while..." && | ||
tar -cjf $SOURCE_CACHE/virtualbox-module-$VERSION.tar.bz2 src && | ||
popd && | ||
|
||
# Prepare for installation | ||
prepare_install && | ||
# Prepare for installation | ||
prepare_install && | ||
|
||
# Create install directory | ||
mkdir -p $MODULE_PREFIX && | ||
# Create install directory | ||
mkdir -p $MODULE_PREFIX && | ||
|
||
# Install contents of the build directory | ||
cp -R out/linux.x86/release/bin/* $MODULE_PREFIX/ && | ||
# Install contents of the build directory | ||
cp -R out/linux.*/release/bin/* $MODULE_PREFIX/ && | ||
|
||
cp $SCRIPT_DIRECTORY/VirtualBox . && | ||
# Substitute $INSTALL_DIR with the module prefix | ||
sedit 's:$INSTALL_DIR:'$MODULE_PREFIX':g' VirtualBox && | ||
# Install the startup script to /usr/bin | ||
install -m 755 VirtualBox /usr/bin/ && | ||
cp $SCRIPT_DIRECTORY/VirtualBox . && | ||
# Substitute $INSTALL_DIR with the module prefix | ||
sedit 's:$INSTALL_DIR:'$MODULE_PREFIX':g' VirtualBox && | ||
# Install the startup script to /usr/bin | ||
install -m 755 VirtualBox /usr/bin/ && | ||
|
||
# Install the config file to let VirtualBox know it is installed | ||
echo "INSTALL_DIR=$MODULE_PREFIX" > vbox.cfg && | ||
install -Dm 644 {,/etc/vbox/}vbox.cfg && | ||
# Install the config file to let VirtualBox know it is installed | ||
echo "INSTALL_DIR=$MODULE_PREFIX" > vbox.cfg && | ||
install -Dm 644 {,/etc/vbox/}vbox.cfg && | ||
|
||
if in_depends $MODULE qt4 ; then | ||
# File path for PDF, and make name more recognizable | ||
sed -i -e "s:/opt/VirtualBox/:/usr/share/doc/VirtualBox/:" -e "s:Oracle VM VirtualBox:VirtualBox Oracle VM:1" /usr/lib/virtualbox/virtualbox.desktop && | ||
# Install .desktop entry and icon, then update the icon cache | ||
install -Dm 644 /usr/{lib/virtualbox,share/applications}/virtualbox.desktop && | ||
install -Dm 644 /usr/{lib/virtualbox,share/icons/hicolor/32x32/apps}/VBox.png && | ||
if [ -x /usr/bin/gtk-update-icon-cache ] ; then | ||
gtk-update-icon-cache /usr/share/icons/hicolor | ||
fi | ||
fi && | ||
if in_depends $MODULE qt4 ; then | ||
# File path for PDF, and make name more recognizable | ||
sed -i -e "s:/opt/VirtualBox/:/usr/share/doc/VirtualBox/:" -e "s:Oracle VM VirtualBox:VirtualBox Oracle VM:1" /usr/lib/virtualbox/virtualbox.desktop && | ||
# Install .desktop entry and icon, then update the icon cache | ||
install -Dm 644 /usr/{lib/virtualbox,share/applications}/virtualbox.desktop && | ||
install -Dm 644 /usr/{lib/virtualbox,share/icons/hicolor/32x32/apps}/VBox.png | ||
fi && | ||
|
||
if in_depends $MODULE texlive ; then | ||
install -Dm 644 /usr/{lib/virtualbox,share/doc/VirtualBox}/UserManual.pdf | ||
fi && | ||
if in_depends $MODULE texlive ; then | ||
install -Dm 644 /usr/{lib/virtualbox,share/doc/VirtualBox}/UserManual.pdf | ||
fi && | ||
|
||
# Create the vboxusers group | ||
groupadd -f vboxusers | ||
|
||
) > $C_FIFO 2>&1 | ||
# Create the vboxusers group | ||
groupadd -f vboxusers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
default_pre_build && | ||
cd $SOURCE_DIRECTORY && | ||
|
||
# this removes 32 bit simulation support | ||
echo "VBOX_WITH_RAW_MODE =" > LocalConfig.kmk && | ||
sedit " 1832 d" configure |