From 3c77de518e6ecb2394578d15d9aaab95c1a5a1e0 Mon Sep 17 00:00:00 2001 From: Lars Wendler Date: Mon, 21 Oct 2013 12:24:35 +0000 Subject: Fixed installation of NAT module Package-Manager: portage-2.2.7/cvs/Linux x86_64 Manifest-Sign-Key: 0x981CA6FC --- app-emulation/virtualbox/ChangeLog | 8 +- app-emulation/virtualbox/Manifest | 22 +- .../virtualbox/virtualbox-4.3.0-r1.ebuild | 403 +++++++++++++++++++++ app-emulation/virtualbox/virtualbox-4.3.0.ebuild | 403 --------------------- 4 files changed, 426 insertions(+), 410 deletions(-) create mode 100644 app-emulation/virtualbox/virtualbox-4.3.0-r1.ebuild delete mode 100644 app-emulation/virtualbox/virtualbox-4.3.0.ebuild (limited to 'app-emulation/virtualbox') diff --git a/app-emulation/virtualbox/ChangeLog b/app-emulation/virtualbox/ChangeLog index 508cdf4537b2..9d786b6f1bac 100644 --- a/app-emulation/virtualbox/ChangeLog +++ b/app-emulation/virtualbox/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-emulation/virtualbox # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox/ChangeLog,v 1.161 2013/10/20 22:36:47 chainsaw Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox/ChangeLog,v 1.162 2013/10/21 12:24:34 polynomial-c Exp $ + +*virtualbox-4.3.0-r1 (21 Oct 2013) + + 21 Oct 2013; Lars Wendler -virtualbox-4.3.0.ebuild, + +virtualbox-4.3.0-r1.ebuild: + Fixed installation of NAT module. 20 Oct 2013; Tony Vroon virtualbox-4.2.18.ebuild: Marked stable on AMD64 based on arch testing by Elijah "Armageddon" El diff --git a/app-emulation/virtualbox/Manifest b/app-emulation/virtualbox/Manifest index b37abfbe90ef..f9f4f98ddab2 100644 --- a/app-emulation/virtualbox/Manifest +++ b/app-emulation/virtualbox/Manifest @@ -16,14 +16,24 @@ DIST virtualbox-4.1.22-patches-01.tar.xz 3752 SHA256 2ff58f8d2bdfdcbf1ae4bbe9f68 DIST virtualbox-4.2.18-patches-01.tar.xz 3788 SHA256 9a147e3a3da7e1e07b70aed67042c822897c7874ccaa3690c9497862373d8222 SHA512 021f8a566ede223ead5a2605bff3917195165c543f760ee7af004ab97d5dcf0771e6ccb62148d7986a34872ea8c35db952286fb8534b1f69804e192701bd8108 WHIRLPOOL 9818df1703636fecfbda1bbeb4d167d845701fe9de2827a97573a26ffb3cb9feaa22ee2849c45d3ea700a9c305185eb404b15572b0f4e666f8a8e6158a48b9eb EBUILD virtualbox-4.1.26.ebuild 12296 SHA256 01cc60107f53c6259671c87c9ecf7b2f06e39d40a70661961adf43910e6cc282 SHA512 80c6f3b2b07eb0758de11386e24b0b6f6ee00ee9591f50312629c48f268362319a8fb14e7f39411e82673e9bc5b81a33f470b28a91bf875897ab02f078cbddff WHIRLPOOL 20bfcd1ebf56ad8b0c9fd21bc575b99cc87d596988c6e9ac381af02584ebdf1e6de94760326e7ac29b973ad14631648cf0a3a10b52abbb5bd362a5eee336b0b8 EBUILD virtualbox-4.2.18.ebuild 12220 SHA256 b1c0119b37dade28b3828f561e27a454e81bf2c7a8d549a273e9dc10191c99a4 SHA512 a63c8d9d03c28587711039a49cfd0506319166552d7726412ce07d830b02a8e253b29d88bd60512616760e257155bd5426dc6f8a8a86ff22fa07f3c9080753bf WHIRLPOOL ffcb7eda57d180b1f568f51cb23eae64f692104c552f1f7cb43d0cdf7ba02db86ce80f4c415952dc6103dab2ab29e7818956a88809f3f8bb421aad41754db7da -EBUILD virtualbox-4.3.0.ebuild 12407 SHA256 06b27ca95da4d1b43ef1f3005640e1a40041cfa8d5588739273c81e209047b6c SHA512 df99c7e0d949d093c87cda59c420535b4539d579c3c384da24301fc772ad23102f22210c4a4fce06ed533b0ef46c84574c7771cef4be636f3999c077f7863be5 WHIRLPOOL c22555ff448a63171144147c309cd8705d786be53552df2ca903120f7edf9caa6433b73f15700e0cdfb7a3aded02047c7a90970dd5b4b55c33a1e41bcf891427 +EBUILD virtualbox-4.3.0-r1.ebuild 12417 SHA256 66f2f8d49d016d5cc51ff38f8e2d37b90a9425e138ae940b3c49f3d683221468 SHA512 c3181fc4941685a97d1037010c5bffe084103e48d363ca4bd56bdafac87b13f7ceae922430fc888a7611765aef24674713b13d1dc6a98d1c6a663b8c62fcf557 WHIRLPOOL be4465d100fe87a1f97af15705fb1398385de5ccca4d190b647585849edcf622066a02196491f5ae91d0e214910a297ae5a19d337a1ed54bf22e10257610f2b4 EBUILD virtualbox-9999.ebuild 5123 SHA256 8cd24ad4cc1fab5562d58ebcf531b3131796eb24c40489d98bfb2078cd0b3803 SHA512 3c4658a749419a64f7ed8636e62f385db059639d58a2152ac1b136f54f8577407ba0553f612511ea7819eb4e26727ab516f62b11faac5d2e4b6de73892206430 WHIRLPOOL 317967e118951cda333e6db60a6e8f37df7a53599d752271d8f29873caa1e9bb22774963e8972989516031516b293c5b8dd9f7f5e680ac785d7f16437bf8c2ca -MISC ChangeLog 23443 SHA256 ba9faaa6744aea500429c2f8e0bd4341c4aca8776f9a895e2cf17ff4f4504668 SHA512 155330012d6cd3dd472c7aabcbf10e5a77c11d955e6561f68b79ca1be4ca06820edd22d1b7aed77c6c62e6b48cdf19fbb8db2c23e8b609c79f77ddc4785cd974 WHIRLPOOL c3d726a89a60a66eb19f5f5486a702458f41447971ffd07a42de63a97566d8027cedaf31e2a1b622a91b460e0a99322355a8aaa913cfebedd034fd89f9a73b83 +MISC ChangeLog 23631 SHA256 6586bdf7136a26a59b65bca06aff64b9b70653f0ae8e2b3ef6d139073ef6004b SHA512 c5bf17e84e9be35b885f15b8caecbd7361b024cd2fd2170e4b2398df953d120bc5b05cdc7ee38eba19cda0d415755bc0668e0923f0a07bdcc6820649bd50f602 WHIRLPOOL a187b6d9226065deaa0e7868480795ced6827182023a49323d58de48a2e36fceca52b7ef81b2d8c1f5f611b1dafd26f258b193a8b50bd28eafe006e99162534d MISC metadata.xml 673 SHA256 5cf3053a2f23eff40c24dfdb7af90d4bf905df95a7406f6298ae9e5e547cbe79 SHA512 79b4b7477041212815e0b509016b692ac719625534ba93540ac5afe655e47ed2ed27d7ba51b494a49a6ac603733ba0b66a2a517f27e4d0e6b7563eb7d4e640ec WHIRLPOOL 6bcb7711e01036fa3ff064ffdc5021da6fca464d4da77d8e93d033304c7c1d3ed105723d5d5e7fa3328daec929c7c7a90c9c82572bb082765f286b53c3feb688 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.20 (GNU/Linux) +Version: GnuPG v2.0.22 (GNU/Linux) -iEYEAREIAAYFAlJkXBgACgkQp5vW4rUFj5pO5gCfRlZOT00r0/XMPz82nniJ1Bxw -qpAAnj618eTxPP2lK0fhXw8AIZniY3j+ -=5iEy +iQIcBAEBCAAGBQJSZR0DAAoJEPiazRVxLXTFWTQP/iB4CBmbNfIoAqJ2UQcZvxuM +Kr4AK527P35gRTt36Wv3HrepP02ldytd0gd4cMVnxull8CbPXvNvwdQb/CU4hvt2 +Py/vxs0PB3Z6+CK4Jb8DADqkmNu/MWaRzdjGqPsoT7iecIcYVgw+V+XJXKbWgYG0 +yG1yKPhYc4XDjS0wEBGmfAArGmoTMxHt4zgFbFeLEUHKfgs9cvtJViM223qbdFRd +rYQiQBDnnDV4I/Q963Kz4OoSgwiZPqmlybUWOFaAdjTM8WA0eVfv8EtwUt5oBBt2 +7sFIwxw2C1lu4TiXJaqLN07vwpQn8XJRuOpB235qaQSxvrUDvwKliWcftUlqac7c +sxl5SQo4liYJy/9a368vrjtdArVdIqpIsHAsLQWbX2qJQR+kZNtBxN5n5rJPPIhT +nE88bFnz5r/llhQcXGX9YOTtuoqsr+up5w58O0GELdF2kmjdaAmhTKoyIVRUepwg +m/c2637csh+cZBP7bv+zV7FzBqpNxlfH1vjWa1C4JetIwhc2BESEUIG2zMlGs9M3 +R2of0g6gnx3ersb+Y21FYq0xvdLW8KhIEiJucQyAQvHPupFBomSNASj9zndCnLuQ ++a2wmdBt7vXeEuKubPgBS0zN2zQ2VRKK9zuRGGj+Z2UBzQWlZqsjeQXz7ZJm2ZSE +VUhvo1Vjq91ogOwcxWja +=oCRc -----END PGP SIGNATURE----- diff --git a/app-emulation/virtualbox/virtualbox-4.3.0-r1.ebuild b/app-emulation/virtualbox/virtualbox-4.3.0-r1.ebuild new file mode 100644 index 000000000000..a104194daabf --- /dev/null +++ b/app-emulation/virtualbox/virtualbox-4.3.0-r1.ebuild @@ -0,0 +1,403 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox/virtualbox-4.3.0-r1.ebuild,v 1.1 2013/10/21 12:24:34 polynomial-c Exp $ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) +inherit eutils fdo-mime flag-o-matic linux-info multilib pax-utils python-single-r1 qt4-r2 toolchain-funcs java-pkg-opt-2 udev + +MY_PV="${PV/beta/BETA}" +MY_PV="${MY_PV/rc/RC}" +MY_P=VirtualBox-${MY_PV} +SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2 + http://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-4.2.18-patches-01.tar.xz" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="Family of powerful x86 virtualization products for enterprise as well as home use" +HOMEPAGE="http://www.virtualbox.org/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+additions alsa doc extensions headless java multilib pam pulseaudio +opengl python +qt4 +sdk vboxwebsrv vnc" + +RDEPEND="!app-emulation/virtualbox-bin + ~app-emulation/virtualbox-modules-${PV} + dev-libs/libIDL + >=dev-libs/libxslt-1.1.19 + net-misc/curl + dev-libs/openssl + dev-libs/libxml2 + media-libs/libpng + media-libs/libvpx + sys-libs/zlib + >=virtual/udev-171 + !headless? ( + qt4? ( + dev-qt/qtgui:4 + dev-qt/qtcore:4 + opengl? ( dev-qt/qtopengl:4 ) + x11-libs/libXinerama + ) + opengl? ( virtual/opengl media-libs/freeglut ) + x11-libs/libX11 + x11-libs/libXcursor + x11-libs/libXext + x11-libs/libXmu + x11-libs/libXt + media-libs/libsdl:0[X,video] + ) + vnc? ( >=net-libs/libvncserver-0.9.9 ) + java? ( || ( virtual/jre:1.7 virtual/jre:1.6 ) )" +DEPEND="${RDEPEND} + >=dev-util/kbuild-0.1.9998_pre20120806 + >=dev-lang/yasm-0.6.2 + sys-devel/bin86 + sys-power/iasl + pam? ( sys-libs/pam ) + 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:1.7 virtual/jdk:1.6 ) ) + virtual/pkgconfig + alsa? ( >=media-libs/alsa-lib-1.0.13 ) + !headless? ( x11-libs/libXinerama ) + pulseaudio? ( media-sound/pulseaudio ) + vboxwebsrv? ( LocalConfig.kmk || die + + # Respect LDFLAGS + sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \ + -i Config.kmk src/libs/xpcom18a4/Config.kmk || die + + # Use PAM only when pam USE flag is enbaled (bug #376531) + if ! use pam ; then + elog "Disabling PAM removes the possibility to use the VRDP features." + sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die + sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \ + src/VBox/HostServices/Makefile.kmk || die + fi + + # add correct java path + if use java ; then + sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \ + -i "${S}"/Config.kmk || die + java-pkg-opt-2_src_prepare + fi + + if ! gcc-specs-pie ; then + EPATCH_EXCLUDE="050_${PN}-4.2.0-nopie.patch" + fi + + EPATCH_SUFFIX="patch" \ + EPATCH_FORCE="yes" \ + epatch "${WORKDIR}/patches" + + # fix location of ifconfig binary (bug #455902) + local ifcfg="$(type -p ifconfig)" + if [ "${ifcfg}" != "/sbin/ifconfig" ] ; then + sed "/VBOXADPCTL_IFCONFIG_PATH/s@/sbin/ifconfig@${ifcfg}@" \ + -i "${S}"/src/apps/adpctl/VBoxNetAdpCtl.cpp \ + || die + fi +} + +src_configure() { + local myconf + use alsa || myconf+=" --disable-alsa" + use doc || myconf+=" --disable-docs" + use java || myconf+=" --disable-java" + use opengl || myconf+=" --disable-opengl" + use pulseaudio || myconf+=" --disable-pulse" + use python || myconf+=" --disable-python" + use vboxwebsrv && myconf+=" --enable-webservice" + use vnc && myconf+=" --enable-vnc" + if ! use headless ; then + use qt4 || myconf+=" --disable-qt4" + else + myconf+=" --build-headless --disable-opengl" + fi + if use amd64 && ! use multilib ; then + myconf+=" --disable-vmmraw" + fi + # not an autoconf script + ./configure \ + --with-gcc="$(tc-getCC)" \ + --with-g++="$(tc-getCXX)" \ + --disable-kmods \ + --disable-dbus \ + --disable-devmapper \ + ${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 \ + VBOX_BUILD_PUBLISHER=_Gentoo \ + 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}" \ + VBOX_GCC_OPT="${CXXFLAGS}" \ + TOOL_YASM_AS=yasm KBUILD_PATH="${S}/kBuild" \ + KBUILD_VERBOSE=2 \ + all +} + +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" + 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 + + if use sdk ; then + doins -r sdk + fi + + if use vboxwebsrv ; then + doins vboxwebsrv + 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 + + local GCFILE="*gc" + if use amd64 && ! use multilib ; then + GCFILE="" + fi + + for each in VBox{Manage,SVC,XPCOMIPCD,Tunctl,NetAdpCtl,NetDHCP,NetNAT,ExtPackHelperApp} *so *r0 ${GCFILE} ; do + doins $each + 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 + + # VBoxSVC needs to be pax-marked (bug #403453) + pax-mark -m "${D}"/usr/$(get_libdir)/${PN}/VBoxSVC || die + + if ! use headless ; then + for each in VBox{SDL,Headless} ; do + doins $each + 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 + 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 + 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 + + newmenu "${FILESDIR}"/${PN}-ose.desktop-2 ${PN}.desktop + fi + + pushd "${S}"/src/VBox/Resources/OSE &>/dev/null || die + for size in 16 32 48 64 128 ; do + newicon -s ${size} ${PN}-${size}px.png ${PN}.png + done + newicon ${PN}-48px.png ${PN}.png + popd &>/dev/null || die + else + doins VBoxHeadless + 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 + + insinto /usr/$(get_libdir)/${PN} + # 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} + fowners root:vboxusers /usr/$(get_libdir)/${PN}/${fwfile} + done + popd &>/dev/null || die + + # New way of handling USB device nodes for VBox (bug #356215) + local udevdir="$(udev_get_udevdir)" + insinto ${udevdir} + doins VBoxCreateUSBNode.sh + fowners root:vboxusers ${udevdir}/VBoxCreateUSBNode.sh + fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh + insinto ${udevdir}/rules.d + doins "${FILESDIR}"/10-virtualbox.rules + sed "s@%UDEVDIR%@${udevdir}@" \ + -i "${D}"${udevdir}/rules.d/10-virtualbox.rules || die + + insinto /usr/share/${PN} + if ! use headless && use qt4 ; then + doins -r nls + fi + + # VRDPAuth only works with this (bug #351949) + dosym VBoxAuth.so /usr/$(get_libdir)/${PN}/VRDPAuth.so + + # set an env-variable for 3rd party tools + echo -n "VBOX_APP_HOME=/usr/$(get_libdir)/${PN}" > "${T}/90virtualbox" + doenvd "${T}/90virtualbox" + + if use java ; then + java-pkg_regjar "${D}/usr/$(get_libdir)/${PN}/sdk/bindings/xpcom/java/vboxjxpcom.jar" + java-pkg_regso "${D}/usr/$(get_libdir)/${PN}/libvboxjxpcom.so" + fi +} + +pkg_postinst() { + fdo-mime_desktop_database_update + + udevadm control --reload-rules && udevadm trigger --subsystem-match=usb + + 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, PXE-boot ability and VRDP support please emerge" + elog " app-emulation/virtualbox-extpack-oracle" + elog "package." + if [ -e "${ROOT}/etc/udev/rules.d/10-virtualbox.rules" ] ; then + elog "" + elog "Please remove \"${ROOT}/etc/udev/rules.d/10-virtualbox.rules\"" + elog "or else USB in ${PN} won't work." + fi +} + +pkg_postrm() { + fdo-mime_desktop_database_update +} diff --git a/app-emulation/virtualbox/virtualbox-4.3.0.ebuild b/app-emulation/virtualbox/virtualbox-4.3.0.ebuild deleted file mode 100644 index de33e4350cda..000000000000 --- a/app-emulation/virtualbox/virtualbox-4.3.0.ebuild +++ /dev/null @@ -1,403 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox/virtualbox-4.3.0.ebuild,v 1.3 2013/10/18 11:43:08 polynomial-c Exp $ - -EAPI=5 - -PYTHON_COMPAT=( python2_7 ) -inherit eutils fdo-mime flag-o-matic linux-info multilib pax-utils python-single-r1 qt4-r2 toolchain-funcs java-pkg-opt-2 udev - -MY_PV="${PV/beta/BETA}" -MY_PV="${MY_PV/rc/RC}" -MY_P=VirtualBox-${MY_PV} -SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2 - http://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-4.2.18-patches-01.tar.xz" -S="${WORKDIR}/${MY_P}" - -DESCRIPTION="Family of powerful x86 virtualization products for enterprise as well as home use" -HOMEPAGE="http://www.virtualbox.org/" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="+additions alsa doc extensions headless java multilib pam pulseaudio +opengl python +qt4 +sdk vboxwebsrv vnc" - -RDEPEND="!app-emulation/virtualbox-bin - ~app-emulation/virtualbox-modules-${PV} - dev-libs/libIDL - >=dev-libs/libxslt-1.1.19 - net-misc/curl - dev-libs/openssl - dev-libs/libxml2 - media-libs/libpng - media-libs/libvpx - sys-libs/zlib - >=virtual/udev-171 - !headless? ( - qt4? ( - dev-qt/qtgui:4 - dev-qt/qtcore:4 - opengl? ( dev-qt/qtopengl:4 ) - x11-libs/libXinerama - ) - opengl? ( virtual/opengl media-libs/freeglut ) - x11-libs/libX11 - x11-libs/libXcursor - x11-libs/libXext - x11-libs/libXmu - x11-libs/libXt - media-libs/libsdl:0[X,video] - ) - vnc? ( >=net-libs/libvncserver-0.9.9 ) - java? ( || ( virtual/jre:1.7 virtual/jre:1.6 ) )" -DEPEND="${RDEPEND} - >=dev-util/kbuild-0.1.9998_pre20120806 - >=dev-lang/yasm-0.6.2 - sys-devel/bin86 - sys-power/iasl - pam? ( sys-libs/pam ) - 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:1.7 virtual/jdk:1.6 ) ) - virtual/pkgconfig - alsa? ( >=media-libs/alsa-lib-1.0.13 ) - !headless? ( x11-libs/libXinerama ) - pulseaudio? ( media-sound/pulseaudio ) - vboxwebsrv? ( LocalConfig.kmk || die - - # Respect LDFLAGS - sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \ - -i Config.kmk src/libs/xpcom18a4/Config.kmk || die - - # Use PAM only when pam USE flag is enbaled (bug #376531) - if ! use pam ; then - elog "Disabling PAM removes the possibility to use the VRDP features." - sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die - sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \ - src/VBox/HostServices/Makefile.kmk || die - fi - - # add correct java path - if use java ; then - sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \ - -i "${S}"/Config.kmk || die - java-pkg-opt-2_src_prepare - fi - - if ! gcc-specs-pie ; then - EPATCH_EXCLUDE="050_${PN}-4.2.0-nopie.patch" - fi - - EPATCH_SUFFIX="patch" \ - EPATCH_FORCE="yes" \ - epatch "${WORKDIR}/patches" - - # fix location of ifconfig binary (bug #455902) - local ifcfg="$(type -p ifconfig)" - if [ "${ifcfg}" != "/sbin/ifconfig" ] ; then - sed "/VBOXADPCTL_IFCONFIG_PATH/s@/sbin/ifconfig@${ifcfg}@" \ - -i "${S}"/src/apps/adpctl/VBoxNetAdpCtl.cpp \ - || die - fi -} - -src_configure() { - local myconf - use alsa || myconf+=" --disable-alsa" - use doc || myconf+=" --disable-docs" - use java || myconf+=" --disable-java" - use opengl || myconf+=" --disable-opengl" - use pulseaudio || myconf+=" --disable-pulse" - use python || myconf+=" --disable-python" - use vboxwebsrv && myconf+=" --enable-webservice" - use vnc && myconf+=" --enable-vnc" - if ! use headless ; then - use qt4 || myconf+=" --disable-qt4" - else - myconf+=" --build-headless --disable-opengl" - fi - if use amd64 && ! use multilib ; then - myconf+=" --disable-vmmraw" - fi - # not an autoconf script - ./configure \ - --with-gcc="$(tc-getCC)" \ - --with-g++="$(tc-getCXX)" \ - --disable-kmods \ - --disable-dbus \ - --disable-devmapper \ - ${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 \ - VBOX_BUILD_PUBLISHER=_Gentoo \ - 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}" \ - VBOX_GCC_OPT="${CXXFLAGS}" \ - TOOL_YASM_AS=yasm KBUILD_PATH="${S}/kBuild" \ - KBUILD_VERBOSE=2 \ - all -} - -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" - 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 - - if use sdk ; then - doins -r sdk - fi - - if use vboxwebsrv ; then - doins vboxwebsrv - 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 - - local GCFILE="*gc" - if use amd64 && ! use multilib ; then - GCFILE="" - fi - - for each in VBox{Manage,SVC,XPCOMIPCD,Tunctl,NetAdpCtl,NetDHCP,ExtPackHelperApp} *so *r0 ${GCFILE} ; do - doins $each - 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 - - # VBoxSVC needs to be pax-marked (bug #403453) - pax-mark -m "${D}"/usr/$(get_libdir)/${PN}/VBoxSVC || die - - if ! use headless ; then - for each in VBox{SDL,Headless} ; do - doins $each - 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 - 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 - 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 - - newmenu "${FILESDIR}"/${PN}-ose.desktop-2 ${PN}.desktop - fi - - pushd "${S}"/src/VBox/Resources/OSE &>/dev/null || die - for size in 16 32 48 64 128 ; do - newicon -s ${size} ${PN}-${size}px.png ${PN}.png - done - newicon ${PN}-48px.png ${PN}.png - popd &>/dev/null || die - else - doins VBoxHeadless - 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 - - insinto /usr/$(get_libdir)/${PN} - # 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} - fowners root:vboxusers /usr/$(get_libdir)/${PN}/${fwfile} - done - popd &>/dev/null || die - - # New way of handling USB device nodes for VBox (bug #356215) - local udevdir="$(udev_get_udevdir)" - insinto ${udevdir} - doins VBoxCreateUSBNode.sh - fowners root:vboxusers ${udevdir}/VBoxCreateUSBNode.sh - fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh - insinto ${udevdir}/rules.d - doins "${FILESDIR}"/10-virtualbox.rules - sed "s@%UDEVDIR%@${udevdir}@" \ - -i "${D}"${udevdir}/rules.d/10-virtualbox.rules || die - - insinto /usr/share/${PN} - if ! use headless && use qt4 ; then - doins -r nls - fi - - # VRDPAuth only works with this (bug #351949) - dosym VBoxAuth.so /usr/$(get_libdir)/${PN}/VRDPAuth.so - - # set an env-variable for 3rd party tools - echo -n "VBOX_APP_HOME=/usr/$(get_libdir)/${PN}" > "${T}/90virtualbox" - doenvd "${T}/90virtualbox" - - if use java ; then - java-pkg_regjar "${D}/usr/$(get_libdir)/${PN}/sdk/bindings/xpcom/java/vboxjxpcom.jar" - java-pkg_regso "${D}/usr/$(get_libdir)/${PN}/libvboxjxpcom.so" - fi -} - -pkg_postinst() { - fdo-mime_desktop_database_update - - udevadm control --reload-rules && udevadm trigger --subsystem-match=usb - - 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, PXE-boot ability and VRDP support please emerge" - elog " app-emulation/virtualbox-extpack-oracle" - elog "package." - if [ -e "${ROOT}/etc/udev/rules.d/10-virtualbox.rules" ] ; then - elog "" - elog "Please remove \"${ROOT}/etc/udev/rules.d/10-virtualbox.rules\"" - elog "or else USB in ${PN} won't work." - fi -} - -pkg_postrm() { - fdo-mime_desktop_database_update -} -- cgit v1.2.3-65-gdbad