summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Ullmann <jokey@gentoo.org>2008-09-15 19:54:49 +0000
committerMarkus Ullmann <jokey@gentoo.org>2008-09-15 19:54:49 +0000
commit625bcde4277f14d9d8ffb2a1f4d306d10e13010c (patch)
treed3548a221e1899a0b76b6e3e69200f73f31c4512 /app-emulation/virtualbox-ose/virtualbox-ose-9999.ebuild
parent(Proxy-Commit) Port from dev overlay (diff)
downloadgentoo-2-625bcde4277f14d9d8ffb2a1f4d306d10e13010c.tar.gz
gentoo-2-625bcde4277f14d9d8ffb2a1f4d306d10e13010c.tar.bz2
gentoo-2-625bcde4277f14d9d8ffb2a1f4d306d10e13010c.zip
(Proxy-Commit) Port from dev overlay
(Portage version: 2.2_rc8/cvs/Linux 2.6.26-gentoo-r1 i686)
Diffstat (limited to 'app-emulation/virtualbox-ose/virtualbox-ose-9999.ebuild')
-rw-r--r--app-emulation/virtualbox-ose/virtualbox-ose-9999.ebuild141
1 files changed, 96 insertions, 45 deletions
diff --git a/app-emulation/virtualbox-ose/virtualbox-ose-9999.ebuild b/app-emulation/virtualbox-ose/virtualbox-ose-9999.ebuild
index d22cd8c1f414..40635dfc2ad0 100644
--- a/app-emulation/virtualbox-ose/virtualbox-ose-9999.ebuild
+++ b/app-emulation/virtualbox-ose/virtualbox-ose-9999.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-ose/virtualbox-ose-9999.ebuild,v 1.2 2008/09/06 19:21:39 jokey Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-ose/virtualbox-ose-9999.ebuild,v 1.3 2008/09/15 19:54:48 jokey Exp $
EAPI=1
-inherit eutils fdo-mime flag-o-matic linux-mod qt3 subversion toolchain-funcs
+inherit eutils fdo-mime flag-o-matic linux-mod qt4 subversion toolchain-funcs
DESCRIPTION="Softwarefamily of powerful x86 virtualization"
HOMEPAGE="http://www.virtualbox.org/"
@@ -13,7 +13,7 @@ ESVN_REPO_URI="http://virtualbox.org/svn/vbox/trunk"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
-IUSE="pulseaudio sdk"
+IUSE="alsa headless pulseaudio python +qt4 sdk"
RDEPEND="!app-emulation/virtualbox-bin
!app-emulation/virtualbox-ose-additions
@@ -22,16 +22,21 @@ RDEPEND="!app-emulation/virtualbox-bin
>=dev-libs/libxslt-1.1.19
dev-libs/xalan-c
dev-libs/xerces-c
- media-libs/libsdl
- x11-libs/libXcursor
- x11-libs/libXt
- x11-libs/qt:3"
+ !headless? (
+ qt4? ( || ( ( x11-libs/qt-gui x11-libs/qt-core ) =x11-libs/qt-4.3*:4 ) )
+ x11-libs/libXcursor
+ media-libs/libsdl
+ x11-libs/libXt )"
DEPEND="${RDEPEND}
+ dev-util/kbuild
+ >=dev-lang/yasm-0.6.2
sys-devel/bin86
sys-devel/dev86
sys-power/iasl
+ media-libs/libpng
>=media-libs/alsa-lib-1.0.13
- pulseaudio? ( media-sound/pulseaudio )"
+ pulseaudio? ( media-sound/pulseaudio )
+ python? ( >=dev-lang/python-2.3 )"
# sys-apps/hal is required at runtime (bug #197541)
RDEPEND="${RDEPEND}
sys-apps/usermode-utilities
@@ -61,11 +66,27 @@ pkg_setup() {
src_compile() {
local myconf
+ # Don't build vboxdrv kernel module, disable deprecated qt3 support
+ myconf="--disable-kmods --disable-qt3"
+
if ! use pulseaudio; then
myconf="${myconf} --disable-pulse"
fi
+ if ! use python; then
+ myconf="${myconf} --disable-python"
+ fi
+ if ! use alsa; then
+ myconf="${myconf} --disable-alsa"
+ fi
+ if ! use headless; then
+ if ! use qt4; then
+ myconf="${myconf} --disable-qt4"
+ fi
+ else
+ myconf="${myconf} --build-headless"
+ fi
- ./configure \
+ ./configure --with-gcc="$(tc-getCC)" --with-g++="$(tc-getCXX)" \
${myconf} || die "configure failed"
source ./env.sh
@@ -77,6 +98,7 @@ src_compile() {
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"
linux-mod_src_compile
@@ -86,50 +108,79 @@ src_install() {
linux-mod_src_install
cd "${S}"/out/linux.${ARCH}/release/bin
- insinto /opt/VirtualBox
+
+ # create configuration files
+ insinto /etc/vbox
+ newins "${FILESDIR}/${PN}-2.0.2-config" vbox.cfg
+ newins "${FILESDIR}/${PN}-interfaces" interfaces
+
+ # symlink binaries to the shipped wrapper
+ exeinto /usr/lib/${PN}
+ newexe "${FILESDIR}/${PN}-2.0.2-wrapper" "VBox" || die
+ fowners root:vboxusers /usr/lib/${PN}/VBox
+ fperms 0750 /usr/lib/${PN}/VBox
+ newexe "${S}"/src/VBox/Installer/linux/VBoxAddIF.sh "VBoxAddIF" || die
+ fowners root:vboxusers /usr/lib/${PN}/VBoxAddIF
+ fperms 0750 /usr/lib/${PN}/VBoxAddIF
+
+ dosym /usr/lib/${PN}/VBox /usr/bin/VBoxManage
+ dosym /usr/lib/${PN}/VBox /usr/bin/VBoxVRDP
+ dosym /usr/lib/${PN}/VBox /usr/bin/VBoxHeadless
+ dosym /usr/lib/${PN}/VBoxTunctl /usr/bin/VBoxTunctl
+ dosym /usr/lib/${PN}/VBoxAddIF /usr/bin/VBoxAddIF
+ dosym /usr/lib/${PN}/VBoxAddIF /usr/bin/VBoxDeleteIF
+
+ # install binaries and libraries
+ insinto /usr/lib/${PN}
+ doins -r components
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 additions VBoxBFE vditool vboxdrv.ko xpidl SUPInstall \
- SUPUninstall VBox.png
-
- doins -r *
- for each in VBox{Manage,SDL,SVC,XPCOMIPCD,Tunctl} VirtualBox ; do
- fowners root:vboxusers /opt/VirtualBox/${each}
- fperms 0750 /opt/VirtualBox/${each}
+ for each in VBox{Manage,SVC,XPCOMIPCD,Tunctl} *so *r0 *gc ; do
+ doins $each
+ fowners root:vboxusers /usr/lib/${PN}/${each}
+ fperms 0750 /usr/lib/${PN}/${each}
done
- 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/VirtualBox
- dosym /opt/VirtualBox/VBox.sh /usr/bin/VBoxManage
- dosym /opt/VirtualBox/VBox.sh /usr/bin/VBoxSDL
- dosym /opt/VirtualBox/VBoxTunctl /usr/bin/VBoxTunctl
- dosym /opt/VirtualBox/VBoxAddIF.sh /usr/bin/VBoxAddIF
- dosym /opt/VirtualBox/VBoxAddIF.sh /usr/bin/VBoxDeleteIF
-
- # udev rule for vboxdrv
- dodir /etc/udev/rules.d
- echo 'KERNEL=="vboxdrv", GROUP="vboxusers" MODE=660' >> "${D}/etc/udev/rules.d/60-virtualbox.rules"
-
- # create virtualbox configurations files
- insinto /etc/vbox
- newins "${FILESDIR}/${PN}-config" vbox.cfg
- newins "${FILESDIR}/${PN}-interfaces" interfaces
+ if use amd64; then
+ doins VBoxREM2.rel
+ fowners root:vboxusers /usr/lib/${PN}/VBoxREM2.rel
+ fperms 0750 /usr/lib/${PN}/VBoxREM2.rel
+ fi
+
+ if ! use headless; then
+ for each in VBox{SDL,Headless} ; do
+ doins $each
+ fowners root:vboxusers /usr/lib/${PN}/${each}
+ fperms 4750 /usr/lib/${PN}/${each}
+ pax-mark -m "${D}"/usr/lib/${PN}/${each}
+ done
+
+ dosym /usr/lib/${PN}/VBox /usr/bin/VBoxSDL
+
+ if use qt4; then
+ doins VirtualBox
+ fowners root:vboxusers /usr/lib/${PN}/VirtualBox
+ fperms 4750 /usr/lib/${PN}/VirtualBox
+ pax-mark -m "${D}"/usr/lib/${PN}/VirtualBox
+
+ dosym /usr/lib/${PN}/VBox /usr/bin/VirtualBox
+ fi
+
+ newicon "${S}"/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_32px.png ${PN}.png
+ domenu "${FILESDIR}"/${PN}.desktop
+ else
+ doins VBoxHeadless
+ fowners root:vboxusers /usr/lib/${PN}/VBoxHeadless
+ fperms 4750 /usr/lib/${PN}/VBoxHeadless
+ pax-mark -m "${D}"/usr/lib/${PN}/VBoxHeadless
+ fi
+
+ insinto /usr/share/${PN}
+ doins -r nls
- # desktop entry
- newicon "${S}"/src/VBox/Frontends/VirtualBox/images/ico32x01.png ${PN}.png
- domenu "${FILESDIR}"/${PN}.desktop
}
pkg_postinst() {