diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2011-01-06 22:47:34 +0000 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2011-01-06 22:47:34 +0000 |
commit | e72016675f32a73f8dc6f31e4375cdd2bc1ce340 (patch) | |
tree | 6eb646b448080a914c5943eea9622f6f9f970fb5 /app-emulation | |
parent | sparc stable (bug 340759) (diff) | |
download | historical-e72016675f32a73f8dc6f31e4375cdd2bc1ce340.tar.gz historical-e72016675f32a73f8dc6f31e4375cdd2bc1ce340.tar.bz2 historical-e72016675f32a73f8dc6f31e4375cdd2bc1ce340.zip |
Initial version
Package-Manager: portage-2.2.0_alpha13/cvs/Linux x86_64
Diffstat (limited to 'app-emulation')
16 files changed, 759 insertions, 0 deletions
diff --git a/app-emulation/virtualbox/ChangeLog b/app-emulation/virtualbox/ChangeLog new file mode 100644 index 000000000000..425bb0df1d2e --- /dev/null +++ b/app-emulation/virtualbox/ChangeLog @@ -0,0 +1,18 @@ +# ChangeLog for app-emulation/virtualbox +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox/ChangeLog,v 1.45 2011/01/06 22:47:34 polynomial-c Exp $ + +*virtualbox-4.0.0 (06 Jan 2011) + + 06 Jan 2011; Lars Wendler <polynomial-c@gentoo.org> + +files/virtualbox-ose.desktop-2, + +files/virtualbox-ose-3.2.8-mesa-check.patch, + +files/virtualbox-ose-3-wrapper, +virtualbox-4.0.0.ebuild, + +files/virtualbox-4-asneeded.patch, +files/virtualbox-4-config, + +files/virtualbox-4-localconfig, +files/virtualbox-4-makeself-check.patch, + +files/virtualbox-4-mkisofs-check.patch, + +files/virtualbox-4-restore_old_machines_dir.patch, + +files/virtualbox-4-vnc.patch, +files/vboxwebsrv-confd, + +files/vboxwebsrv-initd, +metadata.xml: + Initial version. + diff --git a/app-emulation/virtualbox/Manifest b/app-emulation/virtualbox/Manifest new file mode 100644 index 000000000000..97112beeba0e --- /dev/null +++ b/app-emulation/virtualbox/Manifest @@ -0,0 +1,16 @@ +AUX vboxwebsrv-confd 623 RMD160 ad4a86aa317d466e556d613e57a7fa6a195db986 SHA1 f6f0f568a10093f082b3f8e09c9dfa515a560adc SHA256 8a6773013072e3049fa3ede7b5117e59dde9b35bc3402fc31e9985361b5f9147 +AUX vboxwebsrv-initd 749 RMD160 3cfe8484be4fe67d7be25044a4ab79c44ad42492 SHA1 5dddd297edd74a2e12a731e19f663128d6289b4b SHA256 279addc442d19f982c6b209c8900fe9bd65d73e2dcf98b96cd08b168eb8bf54d +AUX virtualbox-4-asneeded.patch 587 RMD160 5da679af98e6afcfa12404245171bd46993f877b SHA1 4bdbaf71657256e1d189bd7a1a294ee6eb974efb SHA256 1b4a9aa33f75d2deab85e125b5929d74acaf1131b6ee94fa4dc376548e59fdc8 +AUX virtualbox-4-config 38 RMD160 44974362ca28f2762c0501b4d4c18de2634aa063 SHA1 d475cbdbf469dd3a178fa9a4a8580859aacd7c37 SHA256 cc3cd896be49a421b06665683a22edb0fe17d6588fc259140b139c3d8a8581b5 +AUX virtualbox-4-localconfig 1434 RMD160 773b58324831c919afaf6a85ddbbccd03c49dead SHA1 6ab0f7e45f5778c1d392025dcec07c332678546a SHA256 e7d23a6c15b5982f7132c38ee5d660bae111a46c6a5603c2212488637cdcfe20 +AUX virtualbox-4-makeself-check.patch 289 RMD160 ff0385e86ad83501d58ff051b6c80c5122f6d956 SHA1 aa54f6621bf40da58897539aa4efda6f21a26a96 SHA256 31ddafbeef6d35696d76de06988412f888fd5403854952bb00ceab99f5ed4966 +AUX virtualbox-4-mkisofs-check.patch 356 RMD160 2562cee4530976224ae128a732ae99d79eece99d SHA1 050479d15ee5fed1504646c0687fd6e2c8a22dc1 SHA256 0e72a5ef8d915c550fd92865b40c265153dc2d4621714a599d3a7172726b6fff +AUX virtualbox-4-restore_old_machines_dir.patch 506 RMD160 663e6dd09c77c4e578d09f0acc1fe2e015f1874d SHA1 2ae740adc15fbd2523ae17c78669b6a0000ed503 SHA256 0bf28d75a01d041145b12730917c880a382e42b3d5ad3b2fa85c9d9f233b6d99 +AUX virtualbox-4-vnc.patch 2471 RMD160 3e86ed80f592ee0258fdc295245ddf228ce3e41c SHA1 14bf8b20ec60024336d50c06d15cba37b29265af SHA256 5d7219d05928021af0e333a9459dc3c3bcc98c8babfe75f221f1a7f3bc2d6d37 +AUX virtualbox-ose-3-wrapper 2931 RMD160 c73f7fca4531dc8023484b860c81c0a5805f022c SHA1 1d51680f1dc67394b0bf2c0533305e54c68ef177 SHA256 7ed4834ece201cb6a9da57e36a1a9b47bd054057d2ac4a46343a9966ff460644 +AUX virtualbox-ose-3.2.8-mesa-check.patch 701 RMD160 061b6eaf0b3cdbcaac7258d85909d1e9d89cdeb3 SHA1 7e5cf6d11421d392d4f2a7bf9846cc71d9688d03 SHA256 6b4ce64673cda33631e7a60ac94f23ab2d020d52b6160bb072ad8d6f9547c251 +AUX virtualbox-ose.desktop-2 201 RMD160 9cf3ef83d1fda93142d192b0bb4eae9d6dc62118 SHA1 58d6c89123034510476a65a8b4836fac5d0c57aa SHA256 fa7fc3dae940e768560559db944289c578acb691db2dcb51c8c85bfaf3298a25 +DIST VirtualBox-4.0.0.tar.bz2 70279717 RMD160 8cfce949fc8fc3fccdcb46781fd1d861f385b83c SHA1 2d0a763d148622569f2a23254b35bce5e112f7e8 SHA256 c60b42385b4956780babd133d2b694dade4838e18ef723a78f899fc3bd8543a0 +EBUILD virtualbox-4.0.0.ebuild 10214 RMD160 cde481430bdc7f3d3c2adcc352be5db1920f3c00 SHA1 cd6b4ea1f0f871885a80107d667a4751350d2f6d SHA256 79ce8a8be5833990ac06e5a8e7d08e7504e6ae016a41708367c9b4706d090c83 +MISC ChangeLog 819 RMD160 163fe9539d4ac346812fc403a4d0ad7e8d7f6425 SHA1 22c20c9901b01faf0d84a08a6eafe2b13a2d8911 SHA256 76aca2e0cbe2e912f190563a147298c73fb3dd97f550b4b710e575a540a7c362 +MISC metadata.xml 787 RMD160 ba43b02e20c2649a3bfb0dbf1b7d8ce30d5c0beb SHA1 6efd8b7802c97c203b8be8154bb2913cd3e24266 SHA256 9250eb6045eadd27afda974481dbea721de9f5d5157dddc3f0786ba2fcc98d21 diff --git a/app-emulation/virtualbox/files/vboxwebsrv-confd b/app-emulation/virtualbox/files/vboxwebsrv-confd new file mode 100644 index 000000000000..92d61e9eee81 --- /dev/null +++ b/app-emulation/virtualbox/files/vboxwebsrv-confd @@ -0,0 +1,18 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox/files/vboxwebsrv-confd,v 1.1 2011/01/06 22:47:33 polynomial-c Exp $ + +# The host to bind to (defaults to "localhost"). +VBOXWEBSRV_HOST="localhost" + +# Which port to on the host (defaults to 18083). +VBOXWEBSRV_PORT="18083" + +# Session timeout, in seconds. (defaults to 20). +VBOXWEBSRV_TIMEOUT=20 + +# The interval in which the webservice checks for +# timed-out clients, in seconds. Normally does not +# need to be changed (defaults to 5). +VBOXWEBSRV_INTERVAL=5 + diff --git a/app-emulation/virtualbox/files/vboxwebsrv-initd b/app-emulation/virtualbox/files/vboxwebsrv-initd new file mode 100644 index 000000000000..d04cdc2bbc54 --- /dev/null +++ b/app-emulation/virtualbox/files/vboxwebsrv-initd @@ -0,0 +1,24 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox/files/vboxwebsrv-initd,v 1.1 2011/01/06 22:47:34 polynomial-c Exp $ + +depend() { + need net +} + +start() { + #checkconfig || return $? + + ebegin "Starting VirtualBox WebService" + start-stop-daemon --start --quiet --pidfile /var/run/vboxwebsrv.pid \ + --background --make-pidfile --exec /usr/bin/vboxwebsrv \ + -- -H ${VBOXWEBSRV_HOST} -p ${VBOXWEBSRV_PORT} -t ${VBOXWEBSRV_TIMEOUT} -i ${VBOXWEBSRV_INTERVAL} + eend $? +} + +stop() { + ebegin "Stopping VirtualBox WebService" + start-stop-daemon --stop --quiet --pidfile /var/run/vboxwebsrv.pid + eend $? +} diff --git a/app-emulation/virtualbox/files/virtualbox-4-asneeded.patch b/app-emulation/virtualbox/files/virtualbox-4-asneeded.patch new file mode 100644 index 000000000000..b67f1221162a --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-4-asneeded.patch @@ -0,0 +1,16 @@ +--- VirtualBox-4.0.0_OSE/src/libs/xpcom18a4/Makefile.kmk ++++ VirtualBox-4.0.0_OSE/src/libs/xpcom18a4/Makefile.kmk +@@ -469,9 +469,11 @@ + libIDL_config_cflags := $(shell $(VBOX_LIBIDL_CONFIG) --cflags) + libIDL_config_libs := $(shell $(VBOX_LIBIDL_CONFIG) --libs) + xpidl_CFLAGS = \ +- $(libIDL_config_cflags) ++ $(shell pkg-config --cflags libIDL-2.0) + xpidl_LDFLAGS = \ +- $(libIDL_config_libs) ++ $(shell pkg-config --libs-only-L libIDL-2.0) ++xpidl_LIBS.linux = \ ++ $(shell pkg-config --libs-only-l libIDL-2.0 | sed -e 's/-l//g') + xpidl_LDFLAGS.linux = \ + $(VBOX_LD_as_needed) + endif diff --git a/app-emulation/virtualbox/files/virtualbox-4-config b/app-emulation/virtualbox/files/virtualbox-4-config new file mode 100644 index 000000000000..af7822146560 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-4-config @@ -0,0 +1 @@ +INSTALL_DIR=/usr/MY_LIBDIR/virtualbox diff --git a/app-emulation/virtualbox/files/virtualbox-4-localconfig b/app-emulation/virtualbox/files/virtualbox-4-localconfig new file mode 100644 index 000000000000..5138d9252698 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-4-localconfig @@ -0,0 +1,45 @@ +# -*- Makefile -*- +# +# Overwrite some default kBuild settings +# + +# +# Copyright (C) 2006-2008 Sun Microsystems, Inc. +# +# This file is part of VirtualBox Open Source Edition (OSE), as +# available from http://www.virtualbox.org. This file is free software; +# you can redistribute it and/or modify it under the terms of the GNU +# General Public License as published by the Free Software Foundation, +# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE +# distribution. VirtualBox OSE is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY of any kind. +# + +# shut up wine complaining about unknown locale +EXEC_X86_WIN32 := wine + +# don't build testcases to save time, they are not needed for the package +VBOX_WITH_TESTCASES := +VBOX_WITH_TESTSUITE := +VBOX_DOCBOOK_WITH_LATEX := 1 + +KBUILD_MSG_STYLE := brief + +## paths, origin, hardening +VBOX_WITH_HARDENING := 1 +VBOX_WITH_ORIGIN := +VBOX_PATH_APP_PRIVATE_ARCH := /usr/MY_LIBDIR/virtualbox +VBOX_PATH_SHARED_LIBS := $(VBOX_PATH_APP_PRIVATE_ARCH) +VBOX_WITH_RUNPATH := $(VBOX_PATH_APP_PRIVATE_ARCH) +VBOX_PATH_APP_PRIVATE := /usr/share/virtualbox +VBOX_PATH_APP_DOCS = $(VBOX_PATH_PACKAGE_DOCS) + +## don't build unwanted/splitted stuff +VBOX_WITHOUT_ADDITIONS := 1 +VBOX_WITH_VBOXDRV := +VBOX_WITH_VBOXBFE := +VBOX_WITH_KCHMVIEWER := + +## don't build with -Werror +VBOX_WITH_WARNINGS_AS_ERRORS := + diff --git a/app-emulation/virtualbox/files/virtualbox-4-makeself-check.patch b/app-emulation/virtualbox/files/virtualbox-4-makeself-check.patch new file mode 100644 index 000000000000..e1fcb8c2f471 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-4-makeself-check.patch @@ -0,0 +1,10 @@ +--- VirtualBox-4.0.0_OSE/configure ++++ VirtualBox-4.0.0_OSE/configure +@@ -2527,7 +2527,6 @@ + check_compiler_h + [ "$BUILD_MACHINE" = "amd64" -a $WITH_VMMRAW -eq 1 ] && check_32bit + # tools/common/makeself* +- [ $OSE -ge 1 ] && check_makeself + fi + + [ -n "$SETUP_WINE" ] && setup_wine diff --git a/app-emulation/virtualbox/files/virtualbox-4-mkisofs-check.patch b/app-emulation/virtualbox/files/virtualbox-4-mkisofs-check.patch new file mode 100644 index 000000000000..8b0d59123f54 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-4-mkisofs-check.patch @@ -0,0 +1,10 @@ +--- VirtualBox-4.0.0_OSE/configure ++++ VirtualBox-4.0.0_OSE/configure +@@ -2499,7 +2499,6 @@ + # don't check for yasm for the time beeing as 0.40 and 0.50 both have known bugs + # [ "$OS" != "darwin" ] && check_yasm + [ "$OS" != "darwin" ] && check_xsltproc +-[ "$OS" != "darwin" ] && check_mkisofs + + # the libraries + [ "$OS" != "darwin" ] && check_pthread diff --git a/app-emulation/virtualbox/files/virtualbox-4-restore_old_machines_dir.patch b/app-emulation/virtualbox/files/virtualbox-4-restore_old_machines_dir.patch new file mode 100644 index 000000000000..a6770f455cf9 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-4-restore_old_machines_dir.patch @@ -0,0 +1,12 @@ +--- VirtualBox-4.0.0_OSE/src/VBox/Main/SystemPropertiesImpl.cpp ++++ VirtualBox-4.0.0_OSE/src/VBox/Main/SystemPropertiesImpl.cpp +@@ -1035,7 +1035,8 @@ + // new default with VirtualBox 4.0: "$HOME/VirtualBox VMs" + HRESULT rc = getUserHomeDirectory(path); + if (FAILED(rc)) return rc; +- path += RTPATH_SLASH_STR "VirtualBox VMs"; ++ path += RTPATH_SLASH_STR ".VirtualBox"; ++ path += RTPATH_SLASH_STR "Machines"; + } + + if (!RTPathStartsWithRoot(path.c_str())) diff --git a/app-emulation/virtualbox/files/virtualbox-4-vnc.patch b/app-emulation/virtualbox/files/virtualbox-4-vnc.patch new file mode 100644 index 000000000000..1546ff206e1b --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-4-vnc.patch @@ -0,0 +1,101 @@ +--- VirtualBox-4.0.0_OSE/configure ++++ VirtualBox-4.0.0_OSE/configure +@@ -88,6 +88,7 @@ + WITH_OPENGL=1 + WITH_HARDENING=1 + WITH_VDE=0 ++WITH_VNC=0 + WITH_DOCS=1 + BUILD_LIBXML2= + BUILD_LIBXSLT= +@@ -123,6 +124,8 @@ + MESA="-lGL" + INCZ="" + LIBZ="-lz" ++INCVNCSERVER="" ++LIBVNCSERVER="-lvncserver" + CXX_FLAGS="" + if [ "$OS" = "freebsd" ]; then + INCCURL="-I/usr/local/include" +@@ -956,6 +959,47 @@ + } + + # ++# Check for libvncserver, needed for VNC ++# ++check_vncserver() ++{ ++ test_header libvncserver ++ cat > $ODIR.tmp_src.cc <<EOF ++#include <cstdio> ++#include <rfb/rfbconfig.h> ++ ++extern "C" int main() ++{ ++ const char* v=LIBVNCSERVER_VERSION; ++ unsigned int major = 0, minor = 0, micro = 0; ++ ++ for (; *v !='.' && *v != '\0'; v++) major = major*10 + *v-'0'; ++ if (*v == '.') v++; ++ for (; *v !='.' && *v != '\0'; v++) minor = minor*10 + *v-'0'; ++ if (*v == '.') v++; ++ for (; *v !='.' && *v != '\0'; v++) micro = micro*10 + *v-'0'; ++ ++ printf("found version %s", LIBVNCSERVER_PACKAGE_VERSION); ++ if (major*10000 + minor*100 + micro >= 907) ++ { ++ printf(", OK.\n"); ++ return 0; ++ } ++ else ++ { ++ printf(", expected version 0.9.7 or higher\n"); ++ return 1; ++ } ++} ++EOF ++ if test_compile "$LIBVNCSERVER $INCVNCSERVER" libvncserver libvncserver; then ++ if test_execute; then ++ cnf_append "VBOX_WITH_VNC" "1" ++ fi ++ fi ++} ++ ++# + # Check for libcurl, needed by S3 + # + check_curl() +@@ -2116,6 +2160,7 @@ + [ $WITH_OPENGL -eq 1 ] && echo " --disable-opengl disable OpenGL support (2D & 3D)" + [ $WITH_GSOAP -eq 0 ] && echo " --enable-webservice enable the webservice stuff" + [ $WITH_DOCS -eq 1 ] && echo " --disable-docs don't build the documentation" ++[ $OSE -eq 1 ] && echo " --enable-vnc enable the VNC server" + [ "$OS" = "linux" -o "$OS" = "freebsd" ] && echo " --enable-vde enable VDE networking" + cat << EOF + --disable-hardening don't be strict about /dev/vboxdrv access +@@ -2280,6 +2325,9 @@ + --enable-webservice) + [ $WITH_GSOAP -eq 0 ] && WITH_GSOAP=1 + ;; ++ --enable-vnc) ++ WITH_VNC=1 ++ ;; + --disable-hardening) + WITH_HARDENING=0 + ;; +@@ -2553,6 +2601,15 @@ + cnf_append "VBOX_WITH_DOCS_PACKING" "" + fi + ++# VNC server support ++if [ $OSE -ge 1 ]; then ++ if [ $WITH_VNC = 1 ]; then ++ check_vncserver ++ else ++ cnf_append "VBOX_WITH_VNC" "" ++ fi ++fi ++ + # success! + echo + echo "Successfully generated '$CNF' and '$ENV'." diff --git a/app-emulation/virtualbox/files/virtualbox-ose-3-wrapper b/app-emulation/virtualbox/files/virtualbox-ose-3-wrapper new file mode 100755 index 000000000000..6f2da490065d --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-ose-3-wrapper @@ -0,0 +1,104 @@ +#!/bin/sh +# +# Sun VirtualBox +# +# Copyright (C) 2006-2009 Sun Microsystems, Inc. +# +# This file is part of VirtualBox Open Source Edition (OSE), as +# available from http://www.virtualbox.org. This file is free software; +# you can redistribute it and/or modify it under the terms of the GNU +# General Public License (GPL) as published by the Free Software +# Foundation, in version 2 as it comes in the "COPYING" file of the +# VirtualBox OSE distribution. VirtualBox OSE is distributed in the +# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. +# +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa +# Clara, CA 95054 USA or visit http://www.sun.com if you need +# additional information or have any questions. +# + +PATH="/usr/bin:/bin:/usr/sbin:/sbin" +CONFIG="/etc/vbox/vbox.cfg" + +if [ ! -r "$CONFIG" ]; then + echo "Could not find VirtualBox installation. Please reinstall." + exit 1 +fi + +. "$CONFIG" + +# Note: This script must not fail if the module was not successfully installed +# because the user might not want to run a VM but only change VM params! + +if [ "$1" = "shutdown" ]; then + SHUTDOWN="true" +elif ! lsmod|grep -q vboxdrv; then + cat << EOF +WARNING: The VirtualBox kernel modules are not loaded. + Please load all the needed kernel modules by: + + for m in vbox{drv,netadp,netflt}; do modprobe \$m; done + + You will not be able to start VMs until this problem is fixed. +EOF +elif [ ! -c /dev/vboxdrv ]; then + cat << EOF +WARNING: The character device /dev/vboxdrv does not exist. + Please try to reload all the needed kernel modules by: + + for m in vbox{netflt,netadp,drv}; do rmmod \$m; done + for m in vbox{drv,netadp,netflt}; do modprobe \$m; done + + and if that is not successful, try to re-install the package by: + + emerge -1av app-emulation/virtualbox-modules + + You will not be able to start VMs until this problem is fixed. +EOF +fi + +SERVER_PID=`ps -U \`whoami\` | grep VBoxSVC | awk '{ print $1 }'` +if [ -z "$SERVER_PID" ]; then + # Server not running yet/anymore, cleanup socket path. + # See IPC_GetDefaultSocketPath()! + if [ -n "$LOGNAME" ]; then + rm -rf /tmp/.vbox-$LOGNAME-ipc > /dev/null 2>&1 + else + rm -rf /tmp/.vbox-$USER-ipc > /dev/null 2>&1 + fi +fi + +if [ "$SHUTDOWN" = "true" ]; then + if [ -n "$SERVER_PID" ]; then + kill -TERM $SERVER_PID + sleep 2 + fi + exit 0 +fi + +APP=`which $0` +APP=`basename $APP` +APP=${APP##/*/} +case "$APP" in + VirtualBox) + exec "$INSTALL_DIR/VirtualBox" "$@" + ;; + VBoxManage) + exec "$INSTALL_DIR/VBoxManage" "$@" + ;; + VBoxSDL) + exec "$INSTALL_DIR/VBoxSDL" "$@" + ;; + VBoxVRDP) + exec "$INSTALL_DIR/VBoxHeadless" "$@" + ;; + VBoxHeadless) + exec "$INSTALL_DIR/VBoxHeadless" "$@" + ;; + vboxwebsrv) + exec "$INSTALL_DIR/vboxwebsrv" "$@" + ;; + *) + echo "Unknown application - $APP" + ;; +esac diff --git a/app-emulation/virtualbox/files/virtualbox-ose-3.2.8-mesa-check.patch b/app-emulation/virtualbox/files/virtualbox-ose-3.2.8-mesa-check.patch new file mode 100644 index 000000000000..6813a1744695 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-ose-3.2.8-mesa-check.patch @@ -0,0 +1,36 @@ +--- configure ++++ configure +@@ -1225,10 +1225,7 @@ + XCloseDisplay(dpy); + } + EOF +- [ -n "$INCX11" ] && I_INCX11=`prefix_I "$INCX11"` +- if test_compile "$LIBX11 $I_INCX11" Xlibs Xlibs; then +- log_success "found" +- fi ++ test_compile "$LIBX11 $I_INCX11" Xlibs Xlibs + } + + +@@ -1382,21 +1379,6 @@ + #include <GL/glu.h> + extern "C" int main(void) + { +- Display *dpy; +- int major, minor; +- +- dpy = XOpenDisplay(NULL); +- if (dpy) +- { +- Bool glx_version = glXQueryVersion(dpy, &major, &minor); +- XCloseDisplay(dpy); +- if (glx_version) +- { +- printf("found version %u.%u, OK.\n", major, minor); +- return 0; +- } +- } +- printf("found (inactive), OK.\n"); + return 0; + } + EOF diff --git a/app-emulation/virtualbox/files/virtualbox-ose.desktop-2 b/app-emulation/virtualbox/files/virtualbox-ose.desktop-2 new file mode 100644 index 000000000000..ce798dacbdf3 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-ose.desktop-2 @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=Oracle xVM VirtualBox +Type=Application +Comment=Run several virtual systems on a single host computer +Exec=VirtualBox +TryExec=VirtualBox +Icon=virtualbox +Categories=System;Emulator; diff --git a/app-emulation/virtualbox/metadata.xml b/app-emulation/virtualbox/metadata.xml new file mode 100644 index 000000000000..9441310b9ca2 --- /dev/null +++ b/app-emulation/virtualbox/metadata.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>no-herd</herd> + <maintainer> + <email>polynomial-c@gentoo.org</email> + <name>Lars Wendler</name> + </maintainer> + <maintainer> + <email>patrick@gentoo.org</email> + <name>Patrick Lauer</name> + </maintainer> +<maintainer> + <email>swapon@gmail.com</email> + <name>Alessio Cassibba</name> +</maintainer> +<use> + <flag name='additions'>Install Guest System Tools ISO</flag> + <flag name='extensions'>Install extension module packages</flag> + <flag name='headless'>Build without any graphic frontend</flag> + <flag name='sdk'>Enable building of SDK</flag> + <flag name='vboxwebsrv'>Build and install the VirtualBox webservice</flag> +</use> +</pkgmetadata> diff --git a/app-emulation/virtualbox/virtualbox-4.0.0.ebuild b/app-emulation/virtualbox/virtualbox-4.0.0.ebuild new file mode 100644 index 000000000000..2e0eed6dcbeb --- /dev/null +++ b/app-emulation/virtualbox/virtualbox-4.0.0.ebuild @@ -0,0 +1,316 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox/virtualbox-4.0.0.ebuild,v 1.1 2011/01/06 22:47:34 polynomial-c Exp $ + +EAPI=2 + +inherit eutils fdo-mime flag-o-matic linux-info pax-utils qt4-r2 toolchain-funcs java-pkg-2 + +if [[ ${PV} == "9999" ]] ; then + # XXX: should finish merging the -9999 ebuild into this one ... + ESVN_REPO_URI="http://www.virtualbox.org/svn/vbox/trunk" + inherit linux-mod subversion +else + MY_P=VirtualBox-${PV} + SRC_URI="http://download.virtualbox.org/virtualbox/${PV}/${MY_P}.tar.bz2" + S="${WORKDIR}/${MY_P}_OSE" +fi + +DESCRIPTION="Software family of powerful x86 virtualization" +HOMEPAGE="http://www.virtualbox.org/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+additions alsa doc extensions headless java pulseaudio +opengl python +qt4 sdk vboxwebsrv vnc" + +RDEPEND="!app-emulation/virtualbox-bin + !app-emulation/virtualbox-ose + ~app-emulation/virtualbox-modules-${PV} + dev-libs/libIDL + >=dev-libs/libxslt-1.1.19 + net-misc/curl + !headless? ( + qt4? ( x11-libs/qt-gui:4 x11-libs/qt-core:4 opengl? + ( x11-libs/qt-opengl:4 ) ) + opengl? ( virtual/opengl media-libs/freeglut ) + x11-libs/libXcursor + media-libs/libsdl[X,video] + x11-libs/libXt + ) + headless? ( x11-libs/libX11 ) + vnc? ( >=net-libs/libvncserver-0.9.7 )" +DEPEND="${RDEPEND} + >=dev-util/kbuild-0.1.5-r1 + >=dev-lang/yasm-0.6.2 + sys-devel/bin86 + sys-devel/dev86 + sys-power/iasl + media-libs/libpng + sys-libs/libcap + doc? ( + dev-texlive/texlive-basic + dev-texlive/texlive-latex + dev-texlive/texlive-latexrecommended + dev-texlive/texlive-latexextra + dev-texlive/texlive-fontsrecommended + dev-texlive/texlive-fontsextra + ) + java? ( virtual/jdk ) + dev-util/pkgconfig + alsa? ( >=media-libs/alsa-lib-1.0.13 ) + !headless? ( x11-libs/libXinerama ) + pulseaudio? ( media-sound/pulseaudio ) + python? ( >=dev-lang/python-2.3[threads] ) + vboxwebsrv? ( >=net-libs/gsoap-2.7.13 )" +PDEPEND="additions? ( ~app-emulation/virtualbox-additions-${PV} ) + extensions? ( ~app-emulation/virtualbox-extpack-oracle-${PV} )" + +QA_TEXTRELS_x86="usr/lib/virtualbox-ose/VBoxGuestPropSvc.so + usr/lib/virtualbox/VBoxSDL.so + usr/lib/virtualbox/VBoxSharedFolders.so + usr/lib/virtualbox/VBoxDD2.so + usr/lib/virtualbox/VBoxOGLrenderspu.so + usr/lib/virtualbox/VBoxPython.so + usr/lib/virtualbox/VBoxDD.so + usr/lib/virtualbox/VBoxDDU.so + usr/lib/virtualbox/VBoxREM64.so + usr/lib/virtualbox/VBoxSharedClipboard.so + usr/lib/virtualbox/VBoxHeadless.so + usr/lib/virtualbox/VBoxRT.so + usr/lib/virtualbox/VBoxREM.so + usr/lib/virtualbox/VBoxSettings.so + usr/lib/virtualbox/VBoxKeyboard.so + usr/lib/virtualbox/VBoxSharedCrOpenGL.so + usr/lib/virtualbox/VBoxVMM.so + usr/lib/virtualbox/VirtualBox.so + usr/lib/virtualbox/VBoxOGLhosterrorspu.so + usr/lib/virtualbox/components/VBoxC.so + usr/lib/virtualbox/components/VBoxSVCM.so + usr/lib/virtualbox/components/VBoxDDU.so + usr/lib/virtualbox/components/VBoxRT.so + usr/lib/virtualbox/components/VBoxREM.so + usr/lib/virtualbox/components/VBoxVMM.so + usr/lib/virtualbox/VBoxREM32.so + usr/lib/virtualbox/VBoxPython2_4.so + usr/lib/virtualbox/VBoxPython2_5.so + usr/lib/virtualbox/VBoxPython2_6.so + usr/lib/virtualbox/VBoxPython2_7.so + usr/lib/virtualbox/VBoxXPCOMC.so + usr/lib/virtualbox/VBoxOGLhostcrutil.so + usr/lib/virtualbox/VBoxNetDHCP.so" + +pkg_setup() { + if ! use headless && ! use qt4 ; then + einfo "No USE=\"qt4\" selected, this build will not include" + einfo "any Qt frontend." + elif use headless && use qt4 ; then + einfo "You selected USE=\"headless qt4\", defaulting to" + einfo "USE=\"headless\", this build will not include any X11/Qt frontend." + fi + + if ! use opengl ; then + einfo "No USE=\"opengl\" selected, this build will lack" + einfo "the OpenGL feature." + fi +} + +src_prepare() { + # Remove shipped binaries (kBuild,yasm), see bug #232775 + rm -rf kBuild/bin tools + + # Disable things unused or split into separate ebuilds + sed -e "s/MY_LIBDIR/$(get_libdir)/" \ + "${FILESDIR}"/${PN}-4-localconfig > LocalConfig.kmk || die + + # unset useless/problematic mesa checks in configure + epatch "${FILESDIR}/${PN}-ose-3.2.8-mesa-check.patch" + # unset useless makeself checks in configure + epatch "${FILESDIR}/${PN}-4-makeself-check.patch" + # unset useless mkisofs checks in configure + epatch "${FILESDIR}/${PN}-4-mkisofs-check.patch" + + # fix build with --as-needed (bug #249295) + epatch "${FILESDIR}/${PN}-4-asneeded.patch" + + # add the --enable-vnc option to configure script (bug #348204) + epatch "${FILESDIR}/${PN}-4-vnc.patch" + + # We still want to use ${HOME}/.VirtualBox/Machines as machines dir. + epatch "${FILESDIR}/${PN}-4-restore_old_machines_dir.patch" + + # add correct java path + if use java ; then + sed "s:/usr/lib/jvm/java-6-sun:$(java-config -O):" \ + -i "${S}"/Config.kmk || die + fi +} + +src_configure() { + local myconf + use alsa || myconf+=" --disable-alsa" + use opengl || myconf+=" --disable-opengl" + use pulseaudio || myconf+=" --disable-pulse" + use python || myconf+=" --disable-python" + use java || myconf+=" --disable-java" + use vboxwebsrv && myconf+=" --enable-webservice" + use doc || myconf+=" --disable-docs" + use vnc && myconf+=" --enable-vnc" + if ! use headless ; then + use qt4 || myconf+=" --disable-qt4" + else + myconf+=" --build-headless --disable-opengl" + fi + # not an autoconf script + ./configure \ + --with-gcc="$(tc-getCC)" \ + --with-g++="$(tc-getCXX)" \ + --disable-kmods \ + --disable-dbus \ + ${myconf} \ + || die "configure failed" +} + +src_compile() { + source ./env.sh + + # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529) + # and strip all flags + # strip-flags + + MAKE="kmk" emake \ + TOOL_GCC3_CC="$(tc-getCC)" TOOL_GCC3_CXX="$(tc-getCXX)" \ + TOOL_GCC3_AS="$(tc-getCC)" TOOL_GCC3_AR="$(tc-getAR)" \ + TOOL_GCC3_LD="$(tc-getCXX)" TOOL_GCC3_LD_SYSMOD="$(tc-getLD)" \ + TOOL_GCC3_CFLAGS="${CFLAGS}" TOOL_GCC3_CXXFLAGS="${CXXFLAGS}" \ + TOOL_YASM_AS=yasm KBUILD_PATH="${S}/kBuild" \ + all || die "kmk failed" +} + +src_install() { + cd "${S}"/out/linux.${ARCH}/release/bin || die + + # Create configuration files + insinto /etc/vbox + newins "${FILESDIR}/${PN}-4-config" vbox.cfg + + # Set the right libdir + sed -i \ + -e "s/MY_LIBDIR/$(get_libdir)/" \ + "${D}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed" + + # Symlink binaries to the shipped wrapper + exeinto /usr/$(get_libdir)/${PN} + newexe "${FILESDIR}/${PN}-ose-3-wrapper" "VBox" || die + fowners root:vboxusers /usr/$(get_libdir)/${PN}/VBox + fperms 0750 /usr/$(get_libdir)/${PN}/VBox + + dosym /usr/$(get_libdir)/${PN}/VBox /usr/bin/VBoxManage + dosym /usr/$(get_libdir)/${PN}/VBox /usr/bin/VBoxVRDP + dosym /usr/$(get_libdir)/${PN}/VBox /usr/bin/VBoxHeadless + dosym /usr/$(get_libdir)/${PN}/VBoxTunctl /usr/bin/VBoxTunctl + + # Install binaries and libraries + insinto /usr/$(get_libdir)/${PN} + doins -r components || die + + if use sdk ; then + doins -r sdk || die + fi + + if use vboxwebsrv ; then + doins vboxwebsrv || die + fowners root:vboxusers /usr/$(get_libdir)/${PN}/vboxwebsrv + fperms 0750 /usr/$(get_libdir)/${PN}/vboxwebsrv + dosym /usr/$(get_libdir)/${PN}/VBox /usr/bin/vboxwebsrv + newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv + newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv + fi + + for each in VBox{Manage,SVC,XPCOMIPCD,Tunctl,NetAdpCtl,NetDHCP,ExtPackHelperApp} *so *r0 *gc ; do + doins $each || die + fowners root:vboxusers /usr/$(get_libdir)/${PN}/${each} + fperms 0750 /usr/$(get_libdir)/${PN}/${each} + done + # VBoxNetAdpCtl and VBoxNetDHCP binaries need to be suid root in any case.. + fperms 4750 /usr/$(get_libdir)/${PN}/VBoxNetAdpCtl + fperms 4750 /usr/$(get_libdir)/${PN}/VBoxNetDHCP + + if ! use headless ; then + for each in VBox{SDL,Headless} ; do + doins $each || die + fowners root:vboxusers /usr/$(get_libdir)/${PN}/${each} + fperms 4750 /usr/$(get_libdir)/${PN}/${each} + pax-mark -m "${D}"/usr/$(get_libdir)/${PN}/${each} + done + + if use opengl && use qt4 ; then + doins VBoxTestOGL || die + fowners root:vboxusers /usr/$(get_libdir)/${PN}/VBoxTestOGL + fperms 0750 /usr/$(get_libdir)/${PN}/VBoxTestOGL + fi + + dosym /usr/$(get_libdir)/${PN}/VBox /usr/bin/VBoxSDL + + if use qt4 ; then + doins VirtualBox || die + fowners root:vboxusers /usr/$(get_libdir)/${PN}/VirtualBox + fperms 4750 /usr/$(get_libdir)/${PN}/VirtualBox + pax-mark -m "${D}"/usr/$(get_libdir)/${PN}/VirtualBox + + dosym /usr/$(get_libdir)/${PN}/VBox /usr/bin/VirtualBox + fi + + newicon "${S}"/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_32px.png ${PN}.png + newmenu "${FILESDIR}"/${PN}-ose.desktop-2 ${PN}.desktop + else + doins VBoxHeadless || die + fowners root:vboxusers /usr/$(get_libdir)/${PN}/VBoxHeadless + fperms 4750 /usr/$(get_libdir)/${PN}/VBoxHeadless + pax-mark -m "${D}"/usr/$(get_libdir)/${PN}/VBoxHeadless + fi + + # Install EFI Firmware files (bug #320757) + pushd "${S}"/src/VBox/Devices/EFI/FirmwareBin &>/dev/null || die + for fwfile in VBoxEFI{32,64}.fd ; do + doins ${fwfile} || die + fowners root:vboxusers /usr/$(get_libdir)/${PN}/${fwfile} || die + done + popd &>/dev/null || die + + insinto /usr/share/${PN} + if ! use headless && use qt4 ; then + doins -r nls + fi + + # set an env-variable for 3rd party tools + echo -n "VBOX_APP_HOME=/usr/$(get_libdir)/${PN}" > "${T}/90virtualbox" + doenvd "${T}/90virtualbox" +} + +pkg_postinst() { + fdo-mime_desktop_database_update + if ! use headless && use qt4 ; then + elog "To launch VirtualBox just type: \"VirtualBox\"" + fi + elog "You must be in the vboxusers group to use VirtualBox." + elog "" + elog "The latest user manual is available for download at:" + elog "http://download.virtualbox.org/virtualbox/${PV}/UserManual.pdf" + elog "" + elog "For advanced networking setups you should emerge:" + elog "net-misc/bridge-utils and sys-apps/usermode-utilities" + elog "" + elog "IMPORTANT!" + elog "If you upgrade from app-emulation/virtualbox-ose make sure to run" + elog "\"env-update\" as root and logout and relogin as the user you wish" + elog "to run ${PN} as." + elog "" + elog "Starting with version 4.0.0, ${PN} has USB-1 support." + elog "For USB-2 support as well as PXE-boot ability please emerge" + elog "app-emulation/virtualbox-extpack-oracle package." +} + +pkg_postrm() { + fdo-mime_desktop_database_update +} |