[Lunar-commits] <moonbase-other> VirtualBox: 64bit build, fixed build, cleanup

v4hn me at v4hn.de
Sun Jun 2 02:25:48 CEST 2013


commit 9e7111c2974f9441a53632ec983e219d071c74b4
Author: v4hn <me at v4hn.de>
Date: Sat, 01 Jun 2013 17:22:34 -0700
URL: https://github.com/lunar-linux/moonbase-other/commit/9e7111c2974f9441a53632ec983e219d071c74b4

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.
---
  virtual/VirtualBox/BUILD            | +57/-59   
  virtual/VirtualBox/PRE_BUILD.x86_64 | +6/-0     
  2 files changed, 63 insertions(+), 59 deletions(-)

--- a/virtual/VirtualBox/BUILD
+++ b/virtual/VirtualBox/BUILD
@@ -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
--- /dev/null
+++ b/virtual/VirtualBox/PRE_BUILD.x86_64
@@ -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




More information about the Lunar-commits mailing list