add qemu with gcc4 hack

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@591 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one
2008-12-08 11:16:27 +00:00
parent 1cae4c474e
commit 846f57bf93
31 changed files with 2200 additions and 587 deletions

View File

@@ -1,12 +0,0 @@
# ChangeLog for app-emulation/virtualbox
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
03 Jul 2008; Mario Fetka <mario-fetka@gmx.at> +files/virtualbox.desktop,
+files/virtualbox-config, +files/virtualbox-interfaces,
+files/virtualbox-wrapper:
Initial virtualbox with gcc 4.3
03 Jul 2008; Mario Fetka <mario-fetka@gmx.at> +metadata.xml:
Initial virtualbox with gcc 4.3

View File

@@ -1,17 +0,0 @@
AUX VirtualBox-gcc43.patch 1971 RMD160 fbcffbd00e8162301077031d0bf8ab42f2dca70b SHA1 83e6337ffda610fcfabeda88128bd42122a6f038 SHA256 f97d93fc36601094ed477bbab5075669df9fd62f272368c5de5628111e8001a9
AUX use-o3-to-workaround-gcc-ice.diff 845 RMD160 afe61a922260348a979f746b83d27c89ac4ba478 SHA1 f8875f474975d33ef2c8707bde4710c7c72f9727 SHA256 4c99526e026799beb2589b15e1e1d2fdb69673a856c43791f56ec4dcd0d2f58b
AUX vbox-futex.diff 549 RMD160 bccac340ffe59864bac026f0dd28894b6fb9498b SHA1 db9a1829c4d39135e2071ef773bc2712cda03cef SHA256 8dfb4f3be9e0048d1cbcebbb3f9e6e4609de1a652ce65adc59e520c66cc1888e
AUX virtualbox-1.6.2-remove-unused.patch 2964 RMD160 ffef7f5935213c569bc941d2585c68bdac1c3b11 SHA1 d58a6a0caa6c6aca71508ddfd530aada406f2c97 SHA256 881eda1f4ae366bce257a49b399448cc182f7d355d842768a289d946c6950bcf
AUX virtualbox-config 28 RMD160 c03986f0a6ecc77c2d15382d965952bb209ae534 SHA1 43b5fd213ae08bb390ec1962ee2776d4f7fe45fd SHA256 5326f7abdd1a7c8a8a44fd4ab269977ec115286059fc8a4c2fde6805c381236f
AUX virtualbox-gcc43-fixes.diff 504 RMD160 bc535996d68e1640158fa53f722c19d8fd69ef65 SHA1 05c150841982e99a15813250ef8a6290d1670d84 SHA256 adc92255e83c0adc6daa1d48df71bb4bd95548a89083e577b114bbcf76ddf65a
AUX virtualbox-interfaces 218 RMD160 4639b9848cf44ac59cd12585a3c56ef53d72a6d9 SHA1 3268e5759286bdff1c5242598266e6c2a5b17e5d SHA256 50ddbfedce3afd41aad45163eb799fce0956d815948ad9da842f09163aaafd52
AUX virtualbox-ose-64issue.diff 581 RMD160 22e749ae1ad84e73b76d2476c8a179b6768be08f SHA1 15e9f1fbd37d3cf0f0b90ebd829342982754db30 SHA256 709f5b0bfb7149b40dfbc345b239d2496d241e9db4b0a24d042da61bfa03a9d0
AUX virtualbox-system-yasm.diff 1274 RMD160 5602e270dd0834d49e8273a7aa25366519d0c2d9 SHA1 77298debf3a4afabacd454350dd6ca512c25d52d SHA256 60cf79f7c7e5f60c1bf27b7bd977436ee8519a2af64fbfee645bce9164749cad
AUX virtualbox-use-intree-yasm.diff 502 RMD160 00f4e18dd032b84b7e195e6d3fb149466e136607 SHA1 8eeb1ca1398e1215bec0d7eaa012100692af26af SHA256 4d817835192a2b7ab3f26574e6bdb9e5ac623a611a8cf9fd382b1888c6b9fa10
AUX virtualbox-validate-op-gcc43.diff 369 RMD160 082a2665d88d1cb941cbfc1af27eb929160d4a6c SHA1 82e7a7346314bcc7e94e363f501708ca58ad1c2b SHA256 a83a002ebcbf5e2a55e8fb061a3cd1231f394c9f4be340000b404c13022eaeaa
AUX virtualbox-wrapper 3773 RMD160 660ce893fdbd756372cdab9c9231a045b0dae941 SHA1 c8a3c93f4d347002ab1ee0999df33841ea2db574 SHA256 64002e18fc860dc3fa4eb288e55223f3a341a8c627cbc408ecb442b53605342f
AUX virtualbox.desktop 198 RMD160 0e99c539851ee91ba909f1a2ba9259eac032fb07 SHA1 39cabeecd1e635f7a8f47f35303ddf3a45f66b9d SHA256 fdfbaf10c0ff7a9a3811ec2b1fb8fbc8bfe9b6706a3eb55b31ccc3943672a033
DIST VirtualBox-1.6.2-OSE.tar.bz2 35409803 RMD160 9a5fe4746b41a46403921c7a400460cc7abc3c81 SHA1 6811a580b70e651f36002f344033e1db1858fdef SHA256 f458e6ad674ae54ea67b2c8b08816c87b1c4768ec9d43ca041d64a2bcec4eb3b
EBUILD virtualbox-1.6.2.ebuild 5087 RMD160 1b0e7382142987e097ec2a0577d302df0688afdd SHA1 2368868f3f7ba1328c5021757335011a67407baf SHA256 a66d17639c9a05bef4020ef0611d1bbfd6bdc412f1e659ec1742446e0b366105
MISC ChangeLog 420 RMD160 5ff192447a5d2c8748680f1fb90e5e0001eead6c SHA1 28292d145dbb8225ec7a75d684b17583be4011e9 SHA256 9524f416079bb9753a2033799071726fe13491a1532f886cc10a11c411cbc1af
MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42

View File

@@ -1,39 +0,0 @@
--- configure.orig 2008-07-03 14:57:47.000000000 +0200
+++ configure 2008-07-03 15:06:48.000000000 +0200
@@ -337,36 +337,6 @@
fail really
elif [ $cc_maj -eq 4 -a $cc_min -eq 0 -a "OS" = "darwin" ]; then
log_success "found version $cc_ver"
- elif [ $cc_maj -eq 4 -a $cc_min -eq 3 ]; then
- if [ -z "$CC_COMPAT" ]; then
- log ""
- log " ** There are known problems with gcc version 4.3 when compiling the recompiler"
- log " ** stuff. You need to specify a compatibility compiler with version < 4.3. Look"
- log " ** for a package compat-gcc-34 on Fedora systems or something similar on other"
- log " ** distributions and call configure with parameter --with-gcc-compat=gcc34."
- fail really
- fi
- if check_avail "$CC_COMPAT" CC_COMPAT really; then
- cc_compat_ver=`$CC_COMPAT -dumpversion` 2>/dev/null
- if [ $? -ne 0 ]; then
- log_failure "cannot execute '$CC_COMPAT -dumpversion'"
- fail really
- fi
- cc_compat_maj=`echo $cc_compat_ver|cut -d. -f1`
- cc_compat_min=`echo $cc_compat_ver|cut -d. -f2`
- if [ $cc_compat_maj -lt 3 \
- -o \( $cc_compat_maj -eq 3 -a $cc_compat_min -lt 2 \) \
- -o \( $cc_compat_maj -eq 4 -a $cc_compat_min -lt 1 \) \
- -o \( $cc_compat_maj -eq 4 -a $cc_compat_min -gt 2 \) \
- -o $cc_compat_maj -gt 4 ]; then
- log ""
- log " ** Version $cc_compat_ver of the compatibility gcc found. Expected gcc 3.x with x>1"
- log " ** or gcc 4.x with 0<x<3"
- fail really
- fi
- cnf_append "VBOX_RECOMPILER_OP_GCC" "$CC_COMPAT"
- fi
- # gcc-4.0 is allowed for Darwin only
elif [ $cc_maj -lt 3 \
-o \( $cc_maj -eq 3 -a $cc_min -lt 2 \) \
-o \( $cc_maj -eq 4 -a $cc_min -lt 1 -a "$OS" != "darwin" \) \

View File

@@ -1,14 +0,0 @@
--- src/recompiler/Makefile.kmk
+++ src/recompiler/Makefile.kmk
@@ -231,9 +231,9 @@
# Extra flags for these source modules.
target-i386/op.c_CFLAGS = -O2 -fno-strict-aliasing -fomit-frame-pointer -falign-functions=0 -fno-reorder-blocks -fno-optimize-sibling-calls
-target-i386/op.c_CFLAGS.x86 = -fno-gcse -fno-instrument-functions -mpreferred-stack-boundary=2
+target-i386/op.c_CFLAGS.x86 = -O3 -fno-gcse -fno-instrument-functions -mpreferred-stack-boundary=2
target-i386/op.c_CFLAGS.darwin.x86 = -m128bit-long-double -mpreferred-stack-boundary=4
-target-i386/helper.c_CFLAGS.x86 = -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-gcse
+target-i386/helper.c_CFLAGS.x86 = -O3 -fomit-frame-pointer -fno-strict-aliasing -fno-gcse
cpu-exec.c_CFLAGS.x86 = -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-gcse

View File

@@ -1,11 +0,0 @@
--- src/VBox/Runtime/r3/linux/semevent-linux.cpp.old 2008-05-04 02:20:12.000000000 +0200
+++ src/VBox/Runtime/r3/linux/semevent-linux.cpp 2008-05-04 02:20:31.000000000 +0200
@@ -77,7 +77,7 @@ struct RTSEMEVENTINTERNAL
static long sys_futex(int32_t volatile *uaddr, int op, int val, struct timespec *utime, int32_t *uaddr2, int val3)
{
errno = 0;
- long rc = syscall(__NR_futex, uaddr, op, val, utime, uaddr2, val3);
+ long rc = syscall(SYS_futex, uaddr, op, val, utime, uaddr2, val3);
if (rc < 0)
{
Assert(rc == -1);

View File

@@ -1,87 +0,0 @@
--- Config.kmk.orig 2008-06-06 17:14:01.000000000 +0200
+++ Config.kmk 2008-06-06 17:15:47.000000000 +0200
@@ -132,26 +132,26 @@
# This indicates that additions (of some kind or another) is being _built_.
# VBOX_WITHOUT_ADDITIONS overrides it.
-if1of ($(KBUILD_TARGET),l4 linux os2 solaris win)
- VBOX_WITH_ADDITIONS = 1
-else ifdef VBOX_WITH_WIN32_ADDITIONS # for ssh cross builds -remove later!
- VBOX_WITH_ADDITIONS = 1
-else ifdef VBOX_WITH_LINUX_ADDITIONS # for ssh cross builds - remove later!
- VBOX_WITH_ADDITIONS = 1
-endif
+#if1of ($(KBUILD_TARGET),l4 linux os2 solaris win)
+# VBOX_WITH_ADDITIONS = 1
+#else ifdef VBOX_WITH_WIN32_ADDITIONS # for ssh cross builds -remove later!
+# VBOX_WITH_ADDITIONS = 1
+#else ifdef VBOX_WITH_LINUX_ADDITIONS # for ssh cross builds - remove later!
+# VBOX_WITH_ADDITIONS = 1
+#endif
# Build the optional ring-0 part of the additions for syntax checking.
# (Ignored ifndef VBOX_WITH_ADDITIONS. Hack for 32/64 linux issues.)
-VBOX_WITH_ADDITION_DRIVERS = 1
+#VBOX_WITH_ADDITION_DRIVERS = 1
# Build win32 additions (cross building them on linux and l4 using wine).
-if1of ($(KBUILD_TARGET),l4 linux win)
- VBOX_WITH_WIN32_ADDITIONS = 1
-endif
+#if1of ($(KBUILD_TARGET),l4 linux win)
+# VBOX_WITH_WIN32_ADDITIONS = 1
+#endif
# Build linux additions.
# Note! VBOX_WITH_LINUX_ADDITIONS will be removed later and only
# VBOX_WITH_WIN32_ADDITIONS will be kept around for cross building.
-if1of ($(KBUILD_TARGET),l4 linux)
- VBOX_WITH_LINUX_ADDITIONS = 1
-endif
+#if1of ($(KBUILD_TARGET),l4 linux)
+# VBOX_WITH_LINUX_ADDITIONS = 1
+#endif
# Build X11 additions. Can be disabled separately.
ifndef VBOX_WITH_X11_ADDITIONS
ifdef VBOX_WITH_LINUX_ADDITIONS
@@ -207,7 +207,7 @@
# The SDL based GUI.
VBOX_WITH_VBOXSDL = 1
# The basic frontend (w/o Main).
-VBOX_WITH_VBOXBFE = 1
+#VBOX_WITH_VBOXBFE = 1
# The Qt GUI.
VBOX_WITH_QTGUI = 1
# The Qt 4 GUI (experimental).
@@ -243,9 +243,9 @@
# Enable the kchmviewer
VBOX_WITH_KCHMVIEWER = 1
# Build the testsuite.
-VBOX_WITH_TESTSUITE = 1
+#VBOX_WITH_TESTSUITE = 1
# Build the testcases.
-VBOX_WITH_TESTCASES = 1
+#VBOX_WITH_TESTCASES = 1
# Set this to not use COM or XPCOM in places where it can be avoided.
#VBOX_WITHOUT_COM = 1
# Set this to skip installing the redistributable compiler runtime.
--- configure.orig 2008-06-06 17:14:06.000000000 +0200
+++ configure 2008-06-06 17:15:32.000000000 +0200
@@ -1785,14 +1785,14 @@
# some things are not available in for OSE
if [ $OSE -ge 1 ]; then
cnf_append "VBOX_OSE" "1"
- cnf_append "VBOX_WITH_TESTSUITE" ""
+# cnf_append "VBOX_WITH_TESTSUITE" ""
cnf_append "VBOX_WITH_WIN32_ADDITIONS" ""
- if [ "$OS" = "linux" ]; then
- cnf_append "VBOX_WITH_LINUX_ADDITIONS" "1"
- else
- cnf_append "VBOX_WITH_LINUX_ADDITIONS" ""
- fi
+# if [ "$OS" = "linux" ]; then
+# cnf_append "VBOX_WITH_LINUX_ADDITIONS" "1"
+# else
+# cnf_append "VBOX_WITH_LINUX_ADDITIONS" ""
+# fi
echo >> $CNF
fi

View File

@@ -1 +0,0 @@
INSTALL_DIR=/opt/VirtualBox

View File

@@ -1,21 +0,0 @@
--- src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
+++ src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
@@ -28,6 +28,8 @@
#include "VBoxRegistrationDlg.h"
#endif
+#include <stdlib.h>
+
#include <qapplication.h>
#include <qmessagebox.h>
#include <qpixmap.h>
--- src/VBox/Main/VMMDevInterface.cpp
+++ src/VBox/Main/VMMDevInterface.cpp
@@ -27,6 +27,7 @@
#include <VBox/VBoxGuest.h>
#include <VBox/shflsvc.h>
#include <iprt/asm.h>
+#include <stdlib.h>
#ifdef VBOX_HGCM
#include "hgcm/HGCM.h"

View File

@@ -1,4 +0,0 @@
# This file is for registering VirtualBox permanent host networking interfaces
# and optionally adding them to network bridges on the host.
# Each line should be of the format <interface name> <user name> [<bridge>].

View File

@@ -1,11 +0,0 @@
--- src/recompiler/exec.c
+++ src/recompiler/exec.c
@@ -1555,7 +1555,7 @@
ram_addr = (tlb_entry->addr_write & TARGET_PAGE_MASK) +
tlb_entry->addend - (unsigned long)phys_ram_base;
#else
- ram_addr = remR3HCVirt2GCPhys(first_cpu, (tlb_entry->addr_write & TARGET_PAGE_MASK) + tlb_entry->addend);
+ ram_addr = (ram_addr_t)remR3HCVirt2GCPhys(first_cpu, (void *)((tlb_entry->addr_write & TARGET_PAGE_MASK) + tlb_entry->addend));
#endif
if (!cpu_physical_memory_is_dirty(ram_addr)) {
tlb_entry->addr_write |= IO_MEM_NOTDIRTY;

View File

@@ -1,33 +0,0 @@
--- Config.kmk
+++ Config.kmk
@@ -861,7 +861,7 @@
# We need to export YASM for OSE, but since it was converted to .zip we need to
# allow for the location used by the zip to be properly cleaned up first.
ifeq ($(filter-out win.x86 linux.x86 solaris.x86, $(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH)),)
- PATH_TOOL_YASM ?= $(PATH_DEVTOOLS_BLD)/bin
+ PATH_TOOL_YASM ?= /usr/bin
endif
# XPCOM setup for all but win32.
--- configure
+++ configure
@@ -468,8 +468,8 @@
yasm_min=`echo $yasm_ver|cut -d. -f2`
yasm_rev=`echo $yasm_ver|cut -d. -f3`
yasm_ver_mul=`expr $yasm_maj \* 10000 + $yasm_min \* 100 + $yasm_rev`
- if [ $yasm_ver_mul -lt 501 ]; then
- log_failure "found version $yasm_ver, expected at least 0.5.1"
+ if [ $yasm_ver_mul -lt 600 ]; then
+ log_failure "found version $yasm_ver, expected at least 0.6.0"
fail
else
log_success "found version $yasm_ver"
@@ -1503,7 +1503,7 @@
[ "$OS" != "darwin" ] && check_bcc
[ "$OS" != "darwin" ] && check_iasl
# 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_yasm
[ "$OS" != "darwin" ] && check_xsltproc
[ $OSE -eq 0 ] && check_mkisofs

View File

@@ -1,11 +0,0 @@
--- Config.kmk.old 2008-06-12 15:05:11.000000000 +0200
+++ Config.kmk 2008-06-12 15:05:40.000000000 +0200
@@ -968,7 +968,7 @@
# We need to export YASM for OSE, but since it was converted to .zip we need to
# allow for the location used by the zip to be properly cleaned up first.
-if1of ($(KBUILD_HOST).$(KBUILD_HOST_ARCH), win.x86 linux.x86 solaris.x86)
+if1of ($(KBUILD_HOST).$(KBUILD_HOST_ARCH), win.x86 linux.x86 linux.amd64 solaris.x86)
PATH_TOOL_YASM ?= $(PATH_DEVTOOLS_BLD)/bin
endif

View File

@@ -1,11 +0,0 @@
--- src/recompiler/Sun/op-validate.sed.old 2008-05-04 02:38:45.000000000 +0200
+++ src/recompiler/Sun/op-validate.sed 2008-05-04 02:39:18.000000000 +0200
@@ -63,6 +63,8 @@
/\.Lfe[0-9][0-9]*:/d
/\.LFE[0-9][0-9]*:/d
/size[[:space:]]/d
+/p2align[[:space:]]/d
+/^[/#][[:space:]]0[[:space:]]\"\"[[:space:]]2[[:space:]]*$/d
/^[/#]NO_APP[[:space:]]*$/d
/^$/!b bad
b end

View File

@@ -1,130 +0,0 @@
#!/bin/sh
#
# innotek VirtualBox
#
# Copyright (C) 2006-2007 innotek GmbH
#
# 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.
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 [ ! -e /lib/modules/`uname -r`/misc/vboxdrv.ko ]; then
cat << EOF
WARNING: There is no module available for the current kernel (`uname -r`).
Please recompile the kernel module and install it by:
sudo emerge -1 app-emulation/virtualbox-modules
You will not be able to start VMs until this problem is fixed.
EOF
elif ! lsmod|grep -q vboxdrv; then
cat << EOF
WARNING: The vboxdrv kernel module is not loaded.
Please load the kernel module by:
sudo modprobe vboxdrv
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 the kernel module by:
sudo rmmod vboxdrv; sleep 2; sudo modprobe vboxdrv
and if that is not successful, try to re-install the package by:
sudo emerge -1 app-emulation/virtualbox-modules
You will not be able to start VMs until this problem is fixed.
EOF
elif [ ! -w /dev/vboxdrv ]; then
if [ "`id | grep vboxusers`" = "" ]; then
cat << EOF
WARNING: You are not a member of the "vboxusers" group.
Please add yourself to this group before starting VirtualBox.
You will not be able to start VMs until this problem is fixed.
EOF
else
cat << EOF
WARNING: /dev/vboxdrv not writable for some reason.
If you recently added the current user to the "vboxusers" group
then you have to logout and re-login to take the change effect.
You will not be able to start VMs until this problem is fixed.
EOF
fi
elif [ ! -e /usr/lib/libhal.so ]; then
cat << EOF
WARNING: libhal was not found on this system.
This can create several side effects thus problems,
when accessing host resources (eg: Cd/Dvd readers).
The use of "sys-apps/hal" is still recommended, please install it
to meet this requirement by:
sudo emerge sys-apps/hal
EOF
fi
export LD_LIBRARY_PATH="$INSTALL_DIR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
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=${APP##/*/}
case "$APP" in
VirtualBox)
exec "$INSTALL_DIR/VirtualBox" "$@"
;;
VBoxManage)
exec "$INSTALL_DIR/VBoxManage" "$@"
;;
VBoxSDL)
exec "$INSTALL_DIR/VBoxSDL" "$@"
;;
VBoxHeadless)
exec "$INSTALL_DIR/VBoxHeadless" "$@"
;;
*)
echo "Unknown application - $APP"
;;
esac

View File

@@ -1,8 +0,0 @@
[Desktop Entry]
Name=Sun xVM VirtualBox
Type=Application
Comment=Run several virtual systems on a single host computer
Exec=VirtualBox
TryExec=VirtualBox
Icon=virtualbox
Categories=System;Emulator;

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>maintainer-wanted</herd>
</pkgmetadata>

View File

@@ -1,172 +0,0 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox/virtualbox-1.6.2.ebuild,v 1.1 2008/06/13 22:45:18 cardoe Exp $
inherit eutils fdo-mime flag-o-matic qt3 toolchain-funcs
MY_P=VirtualBox-${PV}-OSE
DESCRIPTION="Softwarefamily of powerful x86 virtualization"
HOMEPAGE="http://www.virtualbox.org/"
SRC_URI="http://www.virtualbox.org/download/${PV}/${MY_P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="additions alsa headless pulseaudio sdk"
RDEPEND="!app-emulation/virtualbox-bin
~app-emulation/virtualbox-modules-${PV}
dev-libs/libIDL
>=dev-libs/libxslt-1.1.19
dev-libs/xalan-c
dev-libs/xerces-c
!headless? (
$(qt_min_version 3.3.5)
x11-libs/libXcursor
media-libs/libsdl
x11-libs/libXt )"
DEPEND="${RDEPEND}
sys-devel/bin86
sys-devel/dev86
sys-power/iasl
alsa? ( >=media-libs/alsa-lib-1.0.13 )
pulseaudio? ( media-sound/pulseaudio )"
# sys-apps/hal is required at runtime (bug #197541)
RDEPEND="${RDEPEND}
additions? ( ~app-emulation/virtualbox-additions-${PV} )
sys-apps/usermode-utilities
net-misc/bridge-utils
sys-apps/hal"
S=${WORKDIR}/${MY_P/-OSE/}
pkg_setup() {
# The VBoxSDL frontend needs media-libs/libsdl compiled
# with USE flag X enabled (bug #177335)
if ! use headless; then
if ! built_with_use media-libs/libsdl X; then
eerror "media-libs/libsdl was compiled without the \"X\" USE flag enabled."
eerror "Please re-emerge media-libs/libsdl with USE=\"X\"."
die "media-libs/libsdl should be compiled with the \"X\" USE flag."
fi
fi
}
src_unpack() {
unpack ${A}
cd "${S}"
# Don't build things unused or splitted into separate ebuilds (eg: additions)
epatch "${FILESDIR}/${P}-remove-unused.patch"
epatch "${FILESDIR}/use-o3-to-workaround-gcc-ice.diff"
epatch "${FILESDIR}/virtualbox-ose-64issue.diff"
epatch "${FILESDIR}/vbox-futex.diff"
epatch "${FILESDIR}/VirtualBox-gcc43.patch"
epatch "${FILESDIR}/virtualbox-gcc43-fixes.diff"
epatch "${FILESDIR}/virtualbox-validate-op-gcc43.diff"
# epatch "${FILESDIR}/virtualbox-system-yasm.diff"
# epatch "${FILESDIR}/virtualbox-use-intree-yasm.diff"
}
src_compile() {
local myconf
# Don't build vboxdrv kernel module
myconf="--disable-kmods"
if ! use pulseaudio; then
myconf="${myconf} --disable-pulse"
fi
if ! use alsa; then
myconf="${myconf} --disable-alsa"
fi
if use headless; then
myconf="${myconf} --build-headless"
fi
./configure \
${myconf} || die "configure failed"
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}" \
all || die "kmk failed"
}
src_install() {
cd "${S}"/out/linux.${ARCH}/release/bin
# create virtualbox configurations files
insinto /etc/vbox
newins "${FILESDIR}/${PN}-config" vbox.cfg
newins "${FILESDIR}/${PN}-interfaces" interfaces
insinto /opt/VirtualBox
if use sdk; then
doins -r sdk
fowners root:vboxusers /opt/VirtualBox/sdk/bin/xpidl
fperms 0750 /opt/VirtualBox/sdk/bin/xpidl
fi
rm -rf sdk src tst* testcase xpidl SUPInstall SUPUninstall VBox.png \
VBoxBFE vditool VBoxSysInfo.sh vboxkeyboard.tar.gz
doins -r *
if ! use headless; then
for each in VBox{Manage,SDL,SVC,XPCOMIPCD,Tunctl,Headless} VirtualBox ; do
fowners root:vboxusers /opt/VirtualBox/${each}
fperms 0750 /opt/VirtualBox/${each}
done
dosym /opt/VirtualBox/VBox.sh /usr/bin/VirtualBox
dosym /opt/VirtualBox/VBox.sh /usr/bin/VBoxSDL
newicon "${S}"/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_32px.png ${PN}.png
domenu "${FILESDIR}"/${PN}.desktop
else
for each in VBox{Manage,SVC,XPCOMIPCD,Tunctl,Headless} ; do
fowners root:vboxusers /opt/VirtualBox/${each}
fperms 0750 /opt/VirtualBox/${each}
done
fi
exeinto /opt/VirtualBox
newexe "${FILESDIR}/${PN}-wrapper" "VBox.sh" || die
fowners root:vboxusers /opt/VirtualBox/VBox.sh
fperms 0750 /opt/VirtualBox/VBox.sh
newexe "${S}"/src/VBox/Installer/linux/VBoxAddIF.sh "VBoxAddIF.sh" || die
fowners root:vboxusers /opt/VirtualBox/VBoxAddIF.sh
fperms 0750 /opt/VirtualBox/VBoxAddIF.sh
dosym /opt/VirtualBox/VBox.sh /usr/bin/VBoxManage
dosym /opt/VirtualBox/VBox.sh /usr/bin/VBoxHeadless
dosym /opt/VirtualBox/VBoxTunctl /usr/bin/VBoxTunctl
dosym /opt/VirtualBox/VBoxAddIF.sh /usr/bin/VBoxAddIF
dosym /opt/VirtualBox/VBoxAddIF.sh /usr/bin/VBoxDeleteIF
}
pkg_postinst() {
fdo-mime_desktop_database_update
elog ""
if ! use headless; then
elog "To launch VirtualBox just type: \"VirtualBox\""
fi
elog "You must be in the vboxusers group to use VirtualBox,"
elog ""
elog "The last user manual is available for download at:"
elog "http://www.virtualbox.org/download/UserManual.pdf"
elog ""
}
pkg_postrm() {
fdo-mime_desktop_database_update
}