]> git.pld-linux.org Git - packages/VirtualBox.git/commitdiff
This commit was manufactured by cvs2git to create branch 'AC-branch'. AC-branch
authorcvs2git <feedback@pld-linux.org>
Wed, 23 May 2012 04:32:16 +0000 (04:32 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Sprout from master 2012-05-23 04:32:16 UTC Arkadiusz Miśkiewicz <arekm@maven.pl> '- release 6'
Cherrypick from master 2008-06-08 19:25:25 UTC hawk <hawk@pld-linux.org> '- updated for 1.6.2':
    VirtualBox-configure.patch -> 1.9
    VirtualBox-disable-xclient-build.patch -> 1.4
    VirtualBox-qt-paths.patch -> 1.4
    VirtualBox-shared-libstdc++.patch -> 1.4
    VirtualBox.desktop -> 1.2
Cherrypick from master 2008-03-02 16:36:00 UTC Elan Ruusamäe <glen@pld-linux.org> '- add subsys locking for %post scriptlet':
    VirtualBox.init -> 1.3

VirtualBox-configure.patch [new file with mode: 0644]
VirtualBox-disable-xclient-build.patch [new file with mode: 0644]
VirtualBox-qt-paths.patch [new file with mode: 0644]
VirtualBox-shared-libstdc++.patch [new file with mode: 0644]
VirtualBox.desktop [new file with mode: 0644]
VirtualBox.init [new file with mode: 0644]

diff --git a/VirtualBox-configure.patch b/VirtualBox-configure.patch
new file mode 100644 (file)
index 0000000..328d063
--- /dev/null
@@ -0,0 +1,157 @@
+--- configure.orig     2008-04-30 16:06:04.000000000 +0200
++++ configure  2008-05-05 09:33:29.000000000 +0200
+@@ -66,9 +66,6 @@
+ LIBZ="-lz"
+ INCPNG=""
+ LIBPNG="-lpng"
+-QT3DIR="/usr/qt/3 /usr/lib/qt3 /usr/lib/qt-3.3 /usr/share/qt3 /usr/lib64/qt-3.3 /usr/X11R6 /usr/lib/qt"
+-QT4DIR="/usr/lib/qt4 /usr/share/qt4 /usr"
+-QT4UIC3DIR="/usr/bin"
+ KBUILDDIR="`cd \`dirname $0\`; pwd`/kBuild"
+ DEVDIR="`cd \`dirname $0\`; pwd`/tools"
+ if [ -d "/lib/modules/`uname -r`/build" ]; then
+@@ -207,8 +204,8 @@
+   echo "compiling the following source file:" >> $LOG
+   cat .tmp_src.cc >> $LOG
+   echo "using the following command line:" >> $LOG
+-  echo "$CXX -O -Wall -o .tmp_out .tmp_src.cc \"$1\"" >> $LOG
+-  $CXX -O -Wall -o .tmp_out .tmp_src.cc $1 >> $LOG 2>&1
++  echo "$CXX -O -Wall -o .tmp_out .tmp_src.cc -L/usr/X11R6/lib \"$1\"" >> $LOG
++  $CXX -O -Wall -o .tmp_out .tmp_src.cc -L/usr/X11R6/lib $1 >> $LOG 2>&1
+   if [ $? -ne 0 ]; then
+     if [ -z "$4" ]; then
+       echo
+@@ -1181,37 +1178,25 @@
+ }
+ EOF
+   found_qt=0
+-  libs="lib"
+-  [ "$LIB" = "lib64" ] && libs="$libs lib64"
+-  for q in $QT3DIR; do
+-    for l in $libs; do
+-      echo "compiling the following source file:" >> $LOG
+-      cat .tmp_src.cc >> $LOG
+-      echo "using the following command line:" >> $LOG
+-      echo "$CXX -O -Wall -o .tmp_out .tmp_src.cc -I$q/include -L$q/$l -lqt-mt $LIBPTHREAD" >> $LOG
+-      $CXX -O -Wall -o .tmp_out .tmp_src.cc -I$q/include -L$q/$l -lqt-mt $LIBPTHREAD >> $LOG 2>&1
+-      if [ $? -eq 0 ]; then
+-        if test_execute; then
+-          cnf_append "QTDIR" "`cd $q ; pwd`"
+-          found_qt=1
+-          break
+-        fi
+-      fi
+-    done
+-    if [ $found_qt -eq 1 ]; then
+-      break
++  echo "compiling the following source file:" >> $LOG
++  cat .tmp_src.cc >> $LOG
++  echo "using the following command line:" >> $LOG
++  echo "$CXX -O -Wall -o .tmp_out .tmp_src.cc -I/usr/include/qt -L/usr/lib -lqt-mt $LIBPTHREAD" >> $LOG
++  $CXX -O -Wall -o .tmp_out .tmp_src.cc -I/usr/include/qt -L/usr/lib -lqt-mt $LIBPTHREAD >> $LOG 2>&1
++  if [ $? -eq 0 ]; then
++    if test_execute; then
++      found_qt=1
+     fi
+-  done
++  fi
+   if [ $found_qt -ne 1 ]; then
+     echo
+-    echo "  Qt3 not found at \"$QT3DIR\" or Qt3 headers not found"
+     echo "  Check the file $LOG for detailed error information."
+     fail
+     return 1
+   fi
+   test_header "Qt3 devtools"
+-  if check_avail "$q/bin/moc" QT3DIR/bin; then
+-    moc_ver=`$q/bin/moc 2>&1 -v|sed 's+^.*(Qt \(.*\))+\1+'`
++  if check_avail "/usr/bin/moc"; then
++    moc_ver=`/usr/bin/moc 2>&1 -v|sed 's+^.*(Qt \(.*\))+\1+'`
+     if [ $? -ne 0 ]; then
+       log_failure "not found"
+       fail
+@@ -1280,40 +1265,34 @@
+     [ -n "$INCQT4" ] && I_INCQT4=`prefix_I "$INCQT4"`
+     if test_compile "$LIBQT4 $LIBPTHREAD $I_INCQT4 $FLDQT4" qt4 qt4 nofatal; then
+       if test_execute; then
+-#        cnf_append "SDK_VBOX_LIBQT4_INCS" "$INCQT4"
+-#        cnf_append "SDK_VBOX_LIBQT4_LIBS" "`strip_l "$LIBQT4"`"
+         if [ "$OS" = "darwin" ]; then
+           cnf_append "VBOX_WITH_QT4GUI" "1"
+         else
+           test_header "Qt4 devtools"
+-          for q in $QT4DIR; do
+-            if which_wrapper "$q/bin/moc" > /dev/null; then
+-              moc_ver=`$q/bin/moc -v 2>&1|sed 's+^.*(Qt \(.*\))+\1+'`
+-              if [ $? -ne 0 ]; then
+-                log_failure "not found"
+-                fail
+-              else
+-                log_success "found version $moc_ver"
+-                cnf_append "VBOX_PATH_QT4" "$q"
+-                test_header "Qt4 uic3"
+-                for r in $q/bin $QT4UIC3DIR; do
+-                  if which_wrapper "$r/uic3" > /dev/null; then
+-                    uic3_ver=`$r/uic3 -version 2>&1|sed 's+^.*version \(.*\)+\1+'`
+-                    if [ $? -ne 0 ]; then
+-                      log_failure "not found"
+-                      fail
+-                    else
+-                      log_success "found version $uic3_ver"
+-                      cnf_append "VBOX_UIC3" "$r/uic3"
+-                      return
+-                    fi
+-                  fi
+-                done
+-                log_failure "not found"
+-                fail
++          if which_wrapper "/usr/bin/moc-qt4" > /dev/null; then
++            moc_ver=`/usr/bin/moc-qt4 -v 2>&1|sed 's+^.*(Qt \(.*\))+\1+'`
++            if [ $? -ne 0 ]; then
++              log_failure "not found"
++              fail
++            else
++              log_success "found version $moc_ver"
++              cnf_append "VBOX_PATH_QT4" "$q"
++              test_header "Qt4 uic3"
++              if which_wrapper "/usr/bin/uic3" > /dev/null; then
++                uic3_ver=`/usr/bin/uic3 -version 2>&1|sed 's+^.*version \(.*\)+\1+'`
++                if [ $? -ne 0 ]; then
++                  log_failure "not found"
++                  fail
++                else
++                  log_success "found version $uic3_ver"
++                  cnf_append "VBOX_UIC3" "$r/uic3"
++                  return
++                fi
+               fi
++              log_failure "not found"
++              fail
+             fi
+-          done
++          fi
+         fi
+       fi
+     else
+@@ -1604,8 +1583,6 @@
+   --with-iasl=PATH         location of the iasl compiler [$IASL]
+   --with-linux=DIR         Linux kernel source directory [$LINUX]
+   --with-mkisofs=PATH      location of mkisofs [$MKISOFS]
+-  --with-qt-dir=DIR        directory for Qt3 headers/libraries [$QT3DIR]
+-  --with-qt4-dir=DIR       directory for Qt4 headers/libraries [$QT4DIR]
+ Build type:
+   -d, --build-debug        build with debugging symbols and assertions
+@@ -1645,12 +1622,6 @@
+         exit 1
+       fi
+       ;;
+-    --with-qt-dir=*)
+-      QT3DIR=`echo $option | cut -d'=' -f2`
+-      ;;
+-    --with-qt4-dir=*)
+-      QT4DIR=`echo $option | cut -d'=' -f2`
+-      ;;
+     --with-iasl=*)
+       IASL=`echo $option | cut -d'=' -f2`
+       ;;
diff --git a/VirtualBox-disable-xclient-build.patch b/VirtualBox-disable-xclient-build.patch
new file mode 100644 (file)
index 0000000..ea6c072
--- /dev/null
@@ -0,0 +1,10 @@
+--- VirtualBox-1.6.2/src/VBox/Additions/x11/Makefile.kmk.orig  2008-05-13 11:57:37.000000000 +0200
++++ VirtualBox-1.6.2/src/VBox/Additions/x11/Makefile.kmk       2008-06-08 21:22:56.000000000 +0200
+@@ -24,7 +24,6 @@
+ # Include sub-makefiles.
+ if1of ($(KBUILD_TARGET), freebsd l4 linux solaris)
+- include $(PATH_SUB_CURRENT)/xclient/Makefile.kmk
+  include $(PATH_SUB_CURRENT)/xgraphics/Makefile.kmk
+  include $(PATH_SUB_CURRENT)/xmouse/Makefile.kmk
+ endif
diff --git a/VirtualBox-qt-paths.patch b/VirtualBox-qt-paths.patch
new file mode 100644 (file)
index 0000000..882cc7e
--- /dev/null
@@ -0,0 +1,39 @@
+--- Config.kmk.orig    2007-01-16 11:39:32.000000000 +0100
++++ Config.kmk 2007-01-18 14:32:24.000000000 +0100
+@@ -838,10 +838,10 @@
+ else
+  VBOX_PATH_QT_HOST ?= $(QTDIR)
+ endif
+-VBOX_UIC      ?= $(VBOX_PATH_QT_HOST)/bin/uic$(HOSTSUFF_EXE)
+-VBOX_MOC      ?= $(VBOX_PATH_QT_HOST)/bin/moc$(HOSTSUFF_EXE)
+-VBOX_LUPDATE  ?= $(VBOX_PATH_QT_HOST)/bin/lupdate$(HOSTSUFF_EXE)
+-VBOX_LRELEASE ?= $(VBOX_PATH_QT_HOST)/bin/lrelease$(HOSTSUFF_EXE)
++VBOX_UIC      ?= /usr/bin/uic$(HOSTSUFF_EXE)
++VBOX_MOC      ?= /usr/bin/moc$(HOSTSUFF_EXE)
++VBOX_LUPDATE  ?= /usr/bin/lupdate$(HOSTSUFF_EXE)
++VBOX_LRELEASE ?= /usr/bin/lrelease$(HOSTSUFF_EXE)
+ #
+ # The linux kernel headers(/sources).
+@@ -1441,7 +1441,7 @@
+ TEMPLATE_VBOXQTGUIEXE_DEFS = IN_RING3 QT_NO_DEBUG QT_THREAD_SUPPORT $(ARCH_BITS_DEFS)
+ TEMPLATE_VBOXQTGUIEXE_INCS = \
+       $(VBOX_PATH_SDK)/include \
+-      $(VBOX_PATH_QT)/include
++      /usr/include/qt
+ ifeq ($(BUILD_TARGET),win)
+  TEMPLATE_VBOXQTGUIEXE_TOOL = $(VBOX_VCC_TOOL)
+@@ -1843,10 +1843,10 @@
+  ifeq ($(BUILD_TARGET_ARCH),amd64)
+   TEMPLATE_VBOXQTGUIEXE_LIBPATH = \
+-      $(VBOX_PATH_QT)/lib64 $(VBOX_PATH_QT)/lib
++      /usr/lib64 /usr/lib
+  else
+   TEMPLATE_VBOXQTGUIEXE_LIBPATH = \
+-      $(VBOX_PATH_QT)/lib
++      /usr/lib
+  endif
+  ifeq ($(BUILD_TARGET),darwin)
diff --git a/VirtualBox-shared-libstdc++.patch b/VirtualBox-shared-libstdc++.patch
new file mode 100644 (file)
index 0000000..2eaf963
--- /dev/null
@@ -0,0 +1,64 @@
+--- VirtualBox-1.6.0_OSE/src/VBox/Additions/x11/xclient/Makefile.kmk   2008-04-30 16:05:59.000000000 +0200
++++ VirtualBox-1.6.0_OSE/src/VBox/Additions/x11/xclient/Makefile.kmk   2008-05-05 09:42:04.000000000 +0200
+@@ -63,14 +63,14 @@
+ # Link aginst libstdc++.a. (http://www.trilithium.com/johan/2005/06/static-libstdc/).
+ # (It would've been preferred to avoid features depending on libstdc++, of course...)
+ #
+-VBoxClient_LIBPATH  += $(PATH_TARGET)/VBoxClient
+-VBoxClient_ORDERDEPS = $(PATH_TARGET)/VBoxClient/libstdc++.a
+-VBoxClient_CLEAN     = $(PATH_TARGET)/VBoxClient/libstdc++.a
+-$(PATH_TARGET)/VBoxClient/libstdc++.a:
+-      $(call MSG_L1,Forcing static libstdc++)
+-      $(QUIET)$(MKDIR) -p $(@D)
+-      $(QUIET)$(LN_EXT) -sf `$(TOOL_$(VBOX_GCC32_TOOL)_CXX) -print-file-name=libstdc++.a` $@ \
+-           || $(CP_EXT) -f  `$(TOOL_$(VBOX_GCC32_TOOL)_CXX) -print-file-name=libstdc++.a` $@
++#VBoxClient_LIBPATH  += $(PATH_TARGET)/VBoxClient
++#VBoxClient_ORDERDEPS = $(PATH_TARGET)/VBoxClient/libstdc++.a
++#VBoxClient_CLEAN     = $(PATH_TARGET)/VBoxClient/libstdc++.a
++#$(PATH_TARGET)/VBoxClient/libstdc++.a:
++#     $(call MSG_L1,Forcing static libstdc++)
++#     $(QUIET)$(MKDIR) -p $(@D)
++#     $(QUIET)$(LN_EXT) -sf `$(TOOL_$(VBOX_GCC32_TOOL)_CXX) -print-file-name=libstdc++.a` $@ \
++#          || $(CP_EXT) -f  `$(TOOL_$(VBOX_GCC32_TOOL)_CXX) -print-file-name=libstdc++.a` $@
+ ifdef VBOX_X11_SEAMLESS_GUEST
+--- VirtualBox-1.6.0_OSE/configure.orig        2008-05-12 10:07:04.000000000 +0200
++++ VirtualBox-1.6.0_OSE/configure     2008-05-12 10:09:23.000000000 +0200
+@@ -1302,28 +1302,6 @@
+   fi
+ }
+-
+-#
+-# Check whether static libstdc++ is installed
+-#
+-check_staticlibstdcxx()
+-{
+-  test_header "static stc++ library"
+-  libstdcxx=`$CXX -print-file-name=libstdc++.a`
+-  cat > .tmp_src.cc << EOF
+-#include <string>
+-
+-extern "C" int main(void)
+-{
+-  std::string s = "test";
+-  return 0;
+-}
+-EOF
+-  if test_compile "$libstdcxx" libstdc++ libstdc++; then
+-    log_success "found"
+-  fi
+-}
+-
+ #
+ # Check for Linux sources
+ #
+@@ -1816,7 +1794,6 @@
+ # Linux-specific
+ if [ "$OS" = "linux" ]; then
+-  check_staticlibstdcxx
+   if [ $WITH_KMODS -eq 1 ]; then
+     check_linux
+   else
diff --git a/VirtualBox.desktop b/VirtualBox.desktop
new file mode 100644 (file)
index 0000000..9c33633
--- /dev/null
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=VirtualBox
+Type=Application
+Comment=VirtualBox
+Comment[pl]=VirtualBox
+Exec=VirtualBox
+Icon=VBox
+Terminal=false
+Categories=Utility;Emulator;
+# vi: encoding=utf-8
diff --git a/VirtualBox.init b/VirtualBox.init
new file mode 100644 (file)
index 0000000..51cd2cf
--- /dev/null
@@ -0,0 +1,93 @@
+#!/bin/sh
+#
+# virtualbox   VirtualBox virtualizer for x86 hardware
+#
+# chkconfig:   345 84 25
+#
+# description: InnoTek VirtualBox is a general-purpose full virtualizer for x86 
+#              hardware. Targeted at server, desktop and embedded use.
+#
+# $Id$
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+VBOX_DEVICE="/dev/vboxdrv"
+VBOX_MODULE="vboxdrv"
+
+# Get service config - may override defaults
+[ -f /etc/sysconfig/virtualbox ] && . /etc/sysconfig/virtualbox
+
+start() {
+       if [ ! -f /var/lock/subsys/virtualbox ]; then
+               modprobe -s $VBOX_MODULE
+               # set proper /dev/vboxdrv for systems with static dev
+               if ! [ -d /dev/.udev/ ]; then
+                       show "Setting $VBOX_DEVICE entry"
+                       busy
+                       rm -f $VBOX_DEVICE
+                       VBOX_MAJOR=$(awk '$2 == "vboxdrv" {print $1}' /proc/devices)
+                       if [ -n "$VBOX_MAJOR" ]; then
+                               VBOX_MINOR=0
+                       else
+                               VBOX_MINOR=$(awk '$2 == "vboxdrv" {print $1}' /proc/misc)
+                               if [ -n "$VBOX_MINOR" ]; then
+                                       VBOX_MAJOR=$(awk '$2 == "misc" {print $1}' /proc/devices)
+                               fi
+                       fi
+                       if [ -z "$VBOX_MAJOR" ]; then
+                               /sbin/rmmod $VBOX_MODULE
+                               fail
+                       elif ! mknod -m 0660 $VBOX_DEVICE c $VBOX_MAJOR $VBOX_MINOR; then
+                               rmmod $VBOX_MODNAME
+                               fail
+                       elif ! chown root:vbox $VBOX_DEVICE; then
+                               fail
+                       else
+                               ok
+                       fi
+               fi
+
+               touch /var/lock/subsys/virtualbox
+       fi
+}
+
+stop() {
+       # NOTE: rmmod will wait if device is in use, so automatic rmmod probably not the best idea
+       /sbin/rmmod $VBOX_MODULE
+       rm -f /var/lock/subsys/virtualbox
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
+       ;;
+  stop)
+       stop
+       ;;
+  restart)
+       stop
+       start
+       ;;
+  status)
+       if ! is_module $VBOX_MODULE; then
+               echo "$VBOX_MODULE module is loaded"
+       else
+               echo "$VBOX_MODULE module is not loaded"
+               RETVAL=3
+       fi
+       if [ ! -c $VBOX_DEVICE ]; then
+               echo "$VBOX_DEVICE does not exist"
+               RETVAL=3
+       else
+               echo "$VBOX_DEVICE exists with major/minor $(ls -l $VBOX_DEVICE | awk '{print $5 $6}')"
+       fi
+       ;;
+  *)
+       msg_usage "$0 {start|stop|restart|status}"
+       exit 3
+esac
+
+exit $RETVAL
This page took 0.061193 seconds and 4 git commands to generate.