From 536c3711867ec947c1738f2c4b96f22e4863322d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 18 Nov 2018 09:38:27 +0000 Subject: gentoo resync : 18.11.2018 --- app-emulation/virtualbox/Manifest | 12 +- .../files/virtualbox-6.0.0_beta2-no_libopus.patch | 39 ++ .../virtualbox/virtualbox-5.2.14-r1.ebuild | 15 +- app-emulation/virtualbox/virtualbox-5.2.18.ebuild | 473 -------------------- app-emulation/virtualbox/virtualbox-5.2.20.ebuild | 13 +- app-emulation/virtualbox/virtualbox-5.2.22.ebuild | 476 ++++++++++++++++++++ .../virtualbox/virtualbox-6.0.0_beta2.ebuild | 479 +++++++++++++++++++++ 7 files changed, 1019 insertions(+), 488 deletions(-) create mode 100644 app-emulation/virtualbox/files/virtualbox-6.0.0_beta2-no_libopus.patch delete mode 100644 app-emulation/virtualbox/virtualbox-5.2.18.ebuild create mode 100644 app-emulation/virtualbox/virtualbox-5.2.22.ebuild create mode 100644 app-emulation/virtualbox/virtualbox-6.0.0_beta2.ebuild (limited to 'app-emulation/virtualbox') diff --git a/app-emulation/virtualbox/Manifest b/app-emulation/virtualbox/Manifest index c0cd8534143b..a25ea2219329 100644 --- a/app-emulation/virtualbox/Manifest +++ b/app-emulation/virtualbox/Manifest @@ -5,15 +5,19 @@ AUX vboxwebsrv-initd 646 BLAKE2B d71673a3afea56aea69ab1d795d8b265bb5fc62296e35d6 AUX virtualbox-4-config 38 BLAKE2B 8eab341f3264a056a89633fe43dd58f274d0d877602156d97a4dcc6260dd8e446509173742988fa40346e62b1fe9368ff3fc9a97e3316cb919962d9a03340d52 SHA512 5455b70b8ac6f25365bae776b78c3ef5710ae2d5a9e939c7013d72c35f65f178268966ebd291a42666913e45f43c7196f8953331be0b0cc88eba66df39205b08 AUX virtualbox-5-localconfig 1553 BLAKE2B dc1e946e97eb6b19a99b5ecf34640ef09c444637c19ea55ae7f0e34583a048b20ea4049e83ef3714a51e44545c50922b1f2758210145319f9881ca71b7d561d4 SHA512 1ec62f872a19ad76ce7d10ed70ee0503c65e817e123d82c20753e6ae4ac7d2ceb4e236da6be1fe3d63b0b104dd355de2cffd6e9d0ec0603c82fbf89662eeb34b AUX virtualbox-5.2.8-paxmark-bldprogs.patch 2732 BLAKE2B a3966e0f1a990c648cba0dfd245229d66040294f068f5fa3f52d7cd55f56819fa1ed505465bc6e524c147f958af3460ecc9e4c3b1628dcb456067181521b7ef5 SHA512 2c436dd64ff3135ce31dc7ab2c05a38fe0b1b1a2b2cc687b1f58fa09f7de2384a6f067ff67c0ab4ecb5ddd42a94a9379517e1901a085e3cb7f43c38a07c28a16 +AUX virtualbox-6.0.0_beta2-no_libopus.patch 1306 BLAKE2B 4e89c323a8fe8e54efb1c97d258c5b2ff2542cc9784425238650c076d4008f9f570016fb20edfc26b66512eaa8fd90698bb62d7946de08b523475efaa85d862b SHA512 e66eaeb9826461a64bb53576134d67d7f77ffd686909aadc32ab549e110b65447a7fd5353b96bc6f6562bdba53cb440a97f6d8ae8db4a4be78234984a79bb8cc AUX virtualbox-ose-5-wrapper 3405 BLAKE2B 92001ed3397a22abb5955617451bfb78d1f1f62f9be99cf87c57c42d118abb42b9436a0a83736d882b34360c9f8e67f9a8adaeffe7e9a3456c4ddc93a7850e53 SHA512 96f9ab8e2a83b5aebbb66916cbca0a7af0e2d69285296fe87869f096149791e0491dec2408f21f7249b68d928eebe396ab710a4ec6b6d6bc9c67120d323effa0 AUX virtualbox-ose.desktop-2 201 BLAKE2B 05fbf657e8c1d8ec46f1b88e681efd50a4e5ab2a0f32f3fd25ca956e1e9bff6357c69a96628e3eba26b01869b6dc596f68f739f9330fa3018c186dfa0fdcea06 SHA512 a678e237ad0451e8785f242ebf822b4f3b03d2e2280a62f71728f79bdcfc84d3465ee60cad90db75e64b2c89a1b0b224de00519728fb605df67ca7c9aee0874c AUX virtualbox-vboxusb_tmpfilesd 35 BLAKE2B 56937e236a0e4d1a2aa085271e8ae0af9553fdf7c3b804af4d3fda3aa8dbc32d63762fee90bc949390cb9cd67f2f0111894c8af084731dab6920ae1675c69a64 SHA512 72e4602f5f214f8833486f5c787c263a10390e8bdf65b5615d67c35ec44048f02add12fe43b19f9c57a9d2f12d768c52e54fcfb9052c0611d06cc988a698c171 DIST VirtualBox-5.2.14.tar.bz2 118597539 BLAKE2B 5e0a8d92405378eb438cae375041609f7a0e1288b040d3a0bcc06157f16ddd48b3537f2f026aa12a71c5319bdef56d6f3907785ac51ebe05a8b7143e04f22d0a SHA512 b8202eccd83e9f2c92a77548d003082b6b3ff7838bb32ae48c3a25dcd622bfdc8ceca42cc49b855eeabf4439c55ad42df9b3959dd1bab77de154468e139c904e -DIST VirtualBox-5.2.18.tar.bz2 118700952 BLAKE2B 5e9a5ca5379d80a8d9d0d53fe7b1f7cd98e03b6c535867932d55aa6a936e65f2d294264da014f332c2caa933a262ced3e350d9eb685ad99dec02a02ffcf5e7cb SHA512 f67c17cdd39e699e6c80af82a2c2d0c5dab073ddba2b55393740e605debb973030c48ce736ae753fc1e680845f0b62209c0f8951db08b665e9cdd83c52d5be20 DIST VirtualBox-5.2.20.tar.bz2 118760364 BLAKE2B 7a5f72340796d3278ef5f3210f4b25bf4d999ec93cdd0449853faf68b38c45a6ffd00fe2c88f12296029882f7715c012d1793cfff9d1c2441aa4db414fa3225e SHA512 ff039e487c43b584c5c5959df1622151d82f6c39101af869262f800d07e68a68005ed442112e36ebe249ed79de34c0b974bbd43e7889a5d40df2ebe7dec77a15 +DIST VirtualBox-5.2.22.tar.bz2 118757134 BLAKE2B be795cdbfb09d3d443f63e190b63898239622f5a57aefdd90f382d9a849d09cc1abc2624071fbc60b2c04a12f33376184540cc362c19225733f99a3bcc8ff6a3 SHA512 4f6c4611a3114778f45419587dc1519ca07410c1ea6474cdb18ecd3b068639a4fdac3f25146fe9b8e006e30f19eba134ce9f665182008b033f6f78497e1ea722 +DIST VirtualBox-6.0.0_BETA2.tar.bz2 150947619 BLAKE2B 53ed4cfea4a9e62cb8ba68089e3b6cea04b33950496e8aa945591f0d30bb69bbf02428b6bd6dd67afbc916d612b0135ea10124741c0538b917749f46935cf834 SHA512 10f7bd5c7c14d79ed1bf4662fce76d66f4f61bba1a9c8c7dfff57dad2dd6eaf2ae03911fdc994d53769f872079d7a04a1732126fc1aa9907237cbdccefda3348 DIST virtualbox-5.2.12-patches-01.tar.xz 2616 BLAKE2B 5731484d185414d83588ee227bbc1eef266451d1a3a710adf1b769cd6404ef1750dba7a60549f2ab9f3fb81ef15809db9ea0190127caefc72d7bc9bb8b741fb0 SHA512 712b55392a8e8357e95abb42ea4f8dac3391ecbf9cbecf27c7dbf674c40f42a1eb19d227a1b3adcf621384a9f64a6438d20fb43866c736189097fb5770c5c654 DIST virtualbox-5.2.16-patches-02.tar.xz 3152 BLAKE2B c8d8f3872f544a465c7d1aa07291599307120ac9eabfb299ddd788a11f85ca6c2d84b8e7306ee4ad436270dad0dd39f101ee68a549eac15afd1e3cdc03f23c6c SHA512 85ee8c4045de562d71ab2d761695ea48b6726a6f0c4bcaa2562bb0d147542d3f1a1b5b47cf593a7f22dac1b86f87b59a56bef421dce3e1fa8e5260cd41998450 -EBUILD virtualbox-5.2.14-r1.ebuild 13839 BLAKE2B 22507a4802ef4e0f8f50e622dbd0bde33ec66e23e968caa3ab22f965f9411aedeeac6fbc4ce716d7c6d48cafc4df89f30274a0ffedb05cfc86c1d230454cca4f SHA512 e0e58c4249c6b62b95f64f190217955ce4bba0b4998084fd3cfa0f5ece4466ecdb9df8084c9baf766d88ae873352dd3adaea354d86fe1bfe71d663c20072195a -EBUILD virtualbox-5.2.18.ebuild 13908 BLAKE2B 400edf7c47f640eadae99e040afdc8fbf5bca74765998da8cae05f20cc5890b3630e4ec6d18fb7b3d12caa4286f28b96afba901bd833945f9c14b148aed632b9 SHA512 69cc9c884a3080d9b2604779c571d754224ab8ccb8f2ce3aa7bce9032a716c8669576403fc228d67e8057cb2d87c806de65c4d9392e57992d0c6db40e41560a4 -EBUILD virtualbox-5.2.20.ebuild 13905 BLAKE2B fe95390a1b2ba8ea2d546abb7516054bf5e01ab2667973273f41b0b7f394d694f36e8205ae154baa7ca91e4323b040854bc3d21eb893a0dffbe567da74e4bea8 SHA512 6ba1b52ae6a40e311170978dd1ad5eccdfa71131e4890a461dc98984f8659ba1e477a441aa583f3eb8fc45ec0573dd5c3b8d766c87344cd65da55ed7a9661006 +DIST virtualbox-6.0.0_beta2-patches-01.tar.xz 2732 BLAKE2B a138e715d99f135f16ca21c92781bf6cd8913f7f766bb598eddcd63e98280e568e646f56bbd0a3714f273457ca90db0b77ec7940ba25028506a22891f1af7b2d SHA512 954e4b40d6e272efe756ee0965adb4110d45f764433a89080fda7ebaebbc20031f86a3e0027dfdaa1c6a7d6379a1af557cea71512504e4b57b5f5adbfc86b56e +EBUILD virtualbox-5.2.14-r1.ebuild 13790 BLAKE2B 7c8a3104b1c3753da92251d3b19df32b6c9aad0fb9a5e63c5325f0ed9baabed05c474c1d8fd38755a298fceb031e33c9b5a2fea072199f96b213b56d43859a16 SHA512 23bc6ef62a11e9c268c5561d7bca81c80f5e81ff5f9386a0c6fd95316444de90cc9bbbeb709776d9ec0955943c4bed921aa9eb07dd42d009f766cd7a613099c7 +EBUILD virtualbox-5.2.20.ebuild 13859 BLAKE2B 0e1beb65698594fde62eb6d628615da0749aa3f176164d704fd01d8641d0847de4f7369011394615b5365145c64c3008fdb6f7aa178c7b978be8da240df45656 SHA512 77801420fca64c392ab80e2eca8107b597fa3d02ef33032d60ddd07933239d8ec987744566da015a10ccc256a7b7fe025dc6ca7cf405b02dd6d4434882649a2e +EBUILD virtualbox-5.2.22.ebuild 13859 BLAKE2B 0e1beb65698594fde62eb6d628615da0749aa3f176164d704fd01d8641d0847de4f7369011394615b5365145c64c3008fdb6f7aa178c7b978be8da240df45656 SHA512 77801420fca64c392ab80e2eca8107b597fa3d02ef33032d60ddd07933239d8ec987744566da015a10ccc256a7b7fe025dc6ca7cf405b02dd6d4434882649a2e +EBUILD virtualbox-6.0.0_beta2.ebuild 13962 BLAKE2B 853086b30290c705f44568658951efaa996f455fb02a7493c892ada60a9e0dc647fad76d373794a4213388715784b6fde78d8bd891014a41750831088c1ac0bd SHA512 76f9bed9433dde4b8610695e446942d1b055a9ba239bd00e217a7634e52dbb6f9aa27062b42737dda15ed2796fe19e88564896ac0e75b4f1397a86ccf39c64ce MISC metadata.xml 715 BLAKE2B 76ee0065ae39b8775af3837eea940291bfd584ddc92b03629c138013d342c8e388ed61fe2dc6f22caaec093f1aa5dabddb6b8c3ae5f7e07150dd063a1e567b47 SHA512 8997ad296ccb4100bc34551601b5361b8ac0d4f2f863bb5a85f55d5b6eeb6b3fcc3dee9c91bd731f52009a2892936e170db8674bf453b59fe4768a5a1c94b2b2 diff --git a/app-emulation/virtualbox/files/virtualbox-6.0.0_beta2-no_libopus.patch b/app-emulation/virtualbox/files/virtualbox-6.0.0_beta2-no_libopus.patch new file mode 100644 index 000000000000..ccf3f2acceb7 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-6.0.0_beta2-no_libopus.patch @@ -0,0 +1,39 @@ +--- VirtualBox-6.0.0_BETA2/src/VBox/Main/include/ConsoleImpl.h ++++ VirtualBox-6.0.0_BETA2/src/VBox/Main/include/ConsoleImpl.h +@@ -147,9 +147,13 @@ + int i_recordingGetSettings(settings::RecordingSettings &Settings); + int i_recordingStart(void); + int i_recordingStop(void); ++# ifdef VBOX_WITH_AUDIO_RECORDING + AudioVideoRec *i_recordingGetAudioDrv(void) const { return Recording.mAudioRec; } ++# endif + RecordingContext *i_recordingGetContext(void) const { return Recording.mpCtx; } ++# ifdef VBOX_WITH_AUDIO_RECORDING + HRESULT i_recordingSendAudio(const void *pvData, size_t cbData, uint64_t uDurationMs); ++# endif + #endif + + const ComPtr &i_machine() const { return mMachine; } +@@ -1038,7 +1042,10 @@ + { + Recording() + : mpCtx(NULL) +- , mAudioRec(NULL) { } ++# ifdef VBOX_WITH_AUDIO_RECORDING ++ , mAudioRec(NULL) ++# endif ++ { } + + /** The recording context. */ + RecordingContext *mpCtx; +--- VirtualBox-6.0.0_BETA2/src/VBox/Main/src-client/Recording.cpp ++++ VirtualBox-6.0.0_BETA2/src/VBox/Main/src-client/Recording.cpp +@@ -587,7 +587,7 @@ + + return rc; + #else +- RT_NOREF(pCtx, pvData, cbData, uTimeStampMs); ++ RT_NOREF(pvData, cbData, uTimeStampMs); + return VINF_SUCCESS; + #endif + } diff --git a/app-emulation/virtualbox/virtualbox-5.2.14-r1.ebuild b/app-emulation/virtualbox/virtualbox-5.2.14-r1.ebuild index d2a03ffef0d5..4d8d595387b1 100644 --- a/app-emulation/virtualbox/virtualbox-5.2.14-r1.ebuild +++ b/app-emulation/virtualbox/virtualbox-5.2.14-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -28,10 +28,11 @@ RDEPEND="!app-emulation/virtualbox-bin dev-libs/libxml2 media-libs/libpng:0= media-libs/libvpx:0= - sys-libs/zlib + sys-libs/zlib:= !headless? ( media-libs/libsdl:0[X,video] x11-libs/libX11 + x11-libs/libxcb:= x11-libs/libXcursor x11-libs/libXext x11-libs/libXmu @@ -154,9 +155,6 @@ src_prepare() { sed -e 's@^check_gcc$@cc_maj="$(gcc -dumpversion | cut -d. -f1)" ; cc_min="$(gcc -dumpversion | cut -d. -f2)"@' \ -i configure || die - # Don't use "echo -n" - sed 's@ECHO_N="echo -n"@ECHO_N="printf"@' -i configure || die - # Disable things unused or split into separate ebuilds sed -e "s@MY_LIBDIR@$(get_libdir)@" \ "${FILESDIR}"/${PN}-5-localconfig > LocalConfig.kmk || die @@ -199,6 +197,11 @@ src_prepare() { eapply_user } +doecho() { + echo "$@" + "$@" || die +} + src_configure() { local myconf=( --with-gcc="$(tc-getCC)" @@ -230,7 +233,7 @@ src_configure() { myconf+=( --disable-vmmraw ) fi # not an autoconf script - ./configure ${myconf[@]} || die "configure failed" + doecho ./configure ${myconf[@]} } src_compile() { diff --git a/app-emulation/virtualbox/virtualbox-5.2.18.ebuild b/app-emulation/virtualbox/virtualbox-5.2.18.ebuild deleted file mode 100644 index cacca024750a..000000000000 --- a/app-emulation/virtualbox/virtualbox-5.2.18.ebuild +++ /dev/null @@ -1,473 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python2_7 ) -inherit flag-o-matic gnome2-utils java-pkg-opt-2 linux-info pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg-utils - -MY_PV="${PV/beta/BETA}" -MY_PV="${MY_PV/rc/RC}" -MY_P=VirtualBox-${MY_PV} - -DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use" -HOMEPAGE="https://www.virtualbox.org/" -SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2 - https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-5.2.16-patches-02.tar.xz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="alsa debug doc headless java libressl lvm +opus pam pax_kernel pulseaudio +opengl python +qt5 +sdk +udev 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/libxml2 - media-libs/libpng:0= - media-libs/libvpx:0= - sys-libs/zlib - !headless? ( - media-libs/libsdl:0[X,video] - x11-libs/libX11 - x11-libs/libXcursor - x11-libs/libXext - x11-libs/libXmu - x11-libs/libXt - opengl? ( virtual/opengl media-libs/freeglut ) - qt5? ( - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtprintsupport:5 - dev-qt/qtwidgets:5 - dev-qt/qtx11extras:5 - opengl? ( dev-qt/qtopengl:5 ) - x11-libs/libXinerama - ) - ) - libressl? ( dev-libs/libressl:= ) - !libressl? ( dev-libs/openssl:0= ) - lvm? ( sys-fs/lvm2 ) - opus? ( media-libs/opus ) - udev? ( >=virtual/udev-171 ) - vnc? ( >=net-libs/libvncserver-0.9.9 )" -DEPEND="${RDEPEND} - >=dev-util/kbuild-0.1.9998.3127 - >=dev-lang/yasm-0.6.2 - sys-devel/bin86 - sys-libs/libcap - sys-power/iasl - virtual/pkgconfig - alsa? ( >=media-libs/alsa-lib-1.0.13 ) - doc? ( - app-text/docbook-sgml-dtd:4.4 - dev-texlive/texlive-basic - dev-texlive/texlive-latex - dev-texlive/texlive-latexrecommended - dev-texlive/texlive-latexextra - dev-texlive/texlive-fontsrecommended - dev-texlive/texlive-fontsextra - ) - !headless? ( x11-libs/libXinerama ) - java? ( >=virtual/jdk-1.6 ) - pam? ( sys-libs/pam ) - pax_kernel? ( sys-apps/elfix ) - pulseaudio? ( media-sound/pulseaudio ) - qt5? ( dev-qt/linguist-tools:5 ) - vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] ) - ${PYTHON_DEPS}" -RDEPEND="${RDEPEND} - java? ( >=virtual/jre-1.6 )" - -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_7.so - usr/lib/virtualbox/VBoxXPCOMC.so - usr/lib/virtualbox/VBoxOGLhostcrutil.so - usr/lib/virtualbox/VBoxNetDHCP.so - usr/lib/virtualbox/VBoxNetNAT.so" - -S="${WORKDIR}/${MY_P}" - -REQUIRED_USE=" - java? ( sdk ) - python? ( sdk ) - vboxwebsrv? ( java ) - ${PYTHON_REQUIRED_USE} -" - -pkg_setup() { - if ! use headless && ! use qt5 ; then - einfo "No USE=\"qt5\" selected, this build will not include any Qt frontend." - elif use headless && use qt5 ; then - einfo "You selected USE=\"headless qt5\", 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 - if ! use python ; then - einfo "You have disabled the \"python\" USE flag. This will only" - einfo "disable the python bindings being installed." - fi - java-pkg-opt-2_pkg_setup - python-single-r1_pkg_setup - - tc-ld-disable-gold #bug 488176 - tc-export CC CXX LD AR RANLIB - export HOST_CC="$(tc-getBUILD_CC)" -} - -src_prepare() { - # Remove shipped binaries (kBuild,yasm), see bug #232775 - rm -r kBuild/bin tools || die - - # Replace pointless GCC version check with something less stupid. - # This is needed for the qt5 version check. - sed -e 's@^check_gcc$@cc_maj="$(gcc -dumpversion | cut -d. -f1)" ; cc_min="$(gcc -dumpversion | cut -d. -f2)"@' \ - -i configure || die - - # Don't use "echo -n" - sed 's@ECHO_N="echo -n"@ECHO_N="printf"@' -i configure || die - - # Disable things unused or split into separate ebuilds - sed -e "s@MY_LIBDIR@$(get_libdir)@" \ - "${FILESDIR}"/${PN}-5-localconfig > LocalConfig.kmk || die - - # Respect LDFLAGS - sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \ - -i Config.kmk src/libs/xpcom18a4/Config.kmk || die - - # Do not use hard-coded ld (related to bug #488176) - sed -e '/QUIET)ld /s@ld @$(LD) @' \ - -i src/VBox/Devices/PC/ipxe/Makefile.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 - - # Only add nopie patch when we're on hardened - if gcc-specs-pie ; then - eapply "${FILESDIR}/050_virtualbox-5.2.8-nopie.patch" - fi - - # Only add paxmark patch when we're on pax_kernel - if use pax_kernel ; then - eapply "${FILESDIR}"/virtualbox-5.2.8-paxmark-bldprogs.patch - fi - - eapply "${WORKDIR}/patches" - - eapply_user -} - -src_configure() { - local myconf=( - --with-gcc="$(tc-getCC)" - --with-g++="$(tc-getCXX)" - --disable-dbus - --disable-kmods - $(usex alsa '' --disable-alsa) - $(usex debug --build-debug '') - $(usex doc '' --disable-docs) - $(usex java '' --disable-java) - $(usex lvm '' --disable-devmapper) - $(usex opus --build-libopus '') - $(usex pulseaudio '' --disable-pulse) - $(usex python '' --disable-python) - $(usex vboxwebsrv --enable-webservice '') - $(usex vnc --enable-vnc '') - ) - if ! use headless ; then - myconf+=( - $(usex opengl '' --disable-opengl) - $(usex qt5 '' --disable-qt) - ) - else - myconf+=( - --build-headless - --disable-opengl - ) - fi - if use amd64 && ! has_multilib_profile ; then - myconf+=( --disable-vmmraw ) - fi - # not an autoconf script - ./configure ${myconf[@]} || die "configure failed" -} - -src_compile() { - source ./env.sh || die - - # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529) - MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #' - MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #' - MAKEOPTS="${MAKEJOBS} ${MAKELOAD}" - 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_VERBOSE=2 \ - all -} - -src_install() { - local binpath="release" - use debug && binpath="debug" - cd "${S}"/out/linux.${ARCH}/${binpath}/bin || die - - local vbox_inst_path="/usr/$(get_libdir)/${PN}" each fwfile size ico icofile - - vbox_inst() { - local binary="${1}" - local perms="${2:-0750}" - local path="${3:-${vbox_inst_path}}" - - [[ -n "${binary}" ]] || die "vbox_inst: No binray given!" - [[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits." - - insinto ${path} - doins ${binary} - fowners root:vboxusers ${path}/${binary} - fperms ${perms} ${path}/${binary} - } - - # Create configuration files - insinto /etc/vbox - newins "${FILESDIR}/${PN}-4-config" vbox.cfg - - # Set the correct libdir - sed \ - -e "s@MY_LIBDIR@$(get_libdir)@" \ - -i "${ED%/}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed" - - # Install the wrapper script - exeinto ${vbox_inst_path} - newexe "${FILESDIR}/${PN}-ose-5-wrapper" "VBox" - fowners root:vboxusers ${vbox_inst_path}/VBox - fperms 0750 ${vbox_inst_path}/VBox - - # Install binaries and libraries - insinto ${vbox_inst_path} - doins -r components - - # *.rc files for x86_64 are only available on multilib systems - local rcfiles="*.rc" - if use amd64 && ! has_multilib_profile ; then - rcfiles="" - fi - for each in VBox{ExtPackHelperApp,Manage,SVC,Tunctl,XPCOMIPCD} *so *r0 ${rcfiles} ; do - vbox_inst ${each} - done - - # These binaries need to be suid root. - for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do - vbox_inst ${each} 4750 - done - - # Install EFI Firmware files (bug #320757) - pushd "${S}"/src/VBox/Devices/EFI/FirmwareBin &>/dev/null || die - for fwfile in VBoxEFI{32,64}.fd ; do - vbox_inst ${fwfile} 0644 - done - popd &>/dev/null || die - - # VBoxSVC and VBoxManage need to be pax-marked (bug #403453) - # VBoxXPCOMIPCD (bug #524202) - for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do - pax-mark -m "${ED%/}"${vbox_inst_path}/${each} - done - - # Symlink binaries to the shipped wrapper - for each in vbox{headless,manage} VBox{Headless,Manage,VRDP} ; do - dosym ${vbox_inst_path}/VBox /usr/bin/${each} - done - dosym ${vbox_inst_path}/VBoxTunctl /usr/bin/VBoxTunctl - - if use pam ; then - # VRDPAuth only works with this (bug #351949) - dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so - fi - - # set an env-variable for 3rd party tools - echo -n "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox" - doenvd "${T}/90virtualbox" - - if ! use headless ; then - vbox_inst VBoxSDL 4750 - pax-mark -m "${ED%/}"${vbox_inst_path}/VBoxSDL - - for each in vboxsdl VBoxSDL ; do - dosym ${vbox_inst_path}/VBox /usr/bin/${each} - done - - if use qt5 ; then - vbox_inst VirtualBox 4750 - pax-mark -m "${ED%/}"${vbox_inst_path}/VirtualBox - - if use opengl ; then - vbox_inst VBoxTestOGL - pax-mark -m "${ED%/}"${vbox_inst_path}/VBoxTestOGL - fi - - for each in virtualbox VirtualBox ; do - dosym ${vbox_inst_path}/VBox /usr/bin/${each} - done - - insinto /usr/share/${PN} - doins -r nls - doins -r UnattendedTemplates - - newmenu "${FILESDIR}"/${PN}-ose.desktop-2 ${PN}.desktop - fi - - pushd "${S}"/src/VBox/Artwork/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 - doicon -s scalable ${PN}.svg - popd &>/dev/null || die - pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die - for size in 16 24 32 48 64 72 96 128 256 512 ; do - for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do - icofile="${PN}-${ico}-${size}px.png" - if [[ -f "${icofile}" ]] ; then - newicon -s ${size} ${icofile} ${PN}-${ico}.png - fi - done - done - popd &>/dev/null || die - fi - - if use lvm ; then - vbox_inst VBoxVolInfo 4750 - dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo - fi - - if use sdk ; then - insinto ${vbox_inst_path} - doins -r sdk - - if use java ; then - java-pkg_regjar "${ED%/}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar" - java-pkg_regso "${ED%/}/${vbox_inst_path}/libvboxjxpcom.so" - fi - fi - - if use udev ; then - # New way of handling USB device nodes for VBox (bug #356215) - local udevdir="$(get_udevdir)" - insinto ${udevdir} - doins VBoxCreateUSBNode.sh - fowners root:vboxusers ${udevdir}/VBoxCreateUSBNode.sh - fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh - insinto ${udevdir}/rules.d - sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/10-virtualbox.rules \ - > "${T}"/10-virtualbox.rules || die - doins "${T}"/10-virtualbox.rules - fi - - if use vboxwebsrv ; then - vbox_inst vboxwebsrv - dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv - newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv - newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv - fi - - if use doc ; then - dodoc UserManual.pdf - fi - - newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf -} - -pkg_postinst() { - gnome2_icon_cache_update - xdg_desktop_database_update - - if use udev ; then - udevadm control --reload-rules \ - && udevadm trigger --subsystem-match=usb - fi - - tmpfiles_process /usr/lib/tmpfiles.d/virtualbox-vboxusb.conf - - if ! use headless && use qt5 ; 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 "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." - elog "Starting with version 5.0.0, ${PN} no longer has the \"additions\" and" - elog "the \"extension\" USE flag. For installation of the guest additions ISO" - elog "image, please emerge" - elog " app-emulation/virtualbox-additions" - elog "and for the USB2, USB3, VRDP and PXE boot ROM modules, please emerge" - elog " app-emulation/virtualbox-extpack-oracle" - if ! use udev ; then - elog "" - elog "WARNING!" - elog "Without USE=udev, USB devices will likely not work in ${PN}." - elif [ -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() { - gnome2_icon_cache_update - xdg_desktop_database_update -} diff --git a/app-emulation/virtualbox/virtualbox-5.2.20.ebuild b/app-emulation/virtualbox/virtualbox-5.2.20.ebuild index adcba1fd0cd8..ea84396fbfb8 100644 --- a/app-emulation/virtualbox/virtualbox-5.2.20.ebuild +++ b/app-emulation/virtualbox/virtualbox-5.2.20.ebuild @@ -28,10 +28,11 @@ RDEPEND="!app-emulation/virtualbox-bin dev-libs/libxml2 media-libs/libpng:0= media-libs/libvpx:0= - sys-libs/zlib + sys-libs/zlib:= !headless? ( media-libs/libsdl:0[X,video] x11-libs/libX11 + x11-libs/libxcb:= x11-libs/libXcursor x11-libs/libXext x11-libs/libXmu @@ -155,9 +156,6 @@ src_prepare() { sed -e 's@^check_gcc$@cc_maj="$(gcc -dumpversion | cut -d. -f1)" ; cc_min="$(gcc -dumpversion | cut -d. -f2)"@' \ -i configure || die - # Don't use "echo -n" - sed 's@ECHO_N="echo -n"@ECHO_N="printf"@' -i configure || die - # Disable things unused or split into separate ebuilds sed -e "s@MY_LIBDIR@$(get_libdir)@" \ "${FILESDIR}"/${PN}-5-localconfig > LocalConfig.kmk || die @@ -200,6 +198,11 @@ src_prepare() { eapply_user } +doecho() { + echo "$@" + "$@" || die +} + src_configure() { local myconf=( --with-gcc="$(tc-getCC)" @@ -232,7 +235,7 @@ src_configure() { myconf+=( --disable-vmmraw ) fi # not an autoconf script - ./configure ${myconf[@]} || die "configure failed" + doecho ./configure ${myconf[@]} } src_compile() { diff --git a/app-emulation/virtualbox/virtualbox-5.2.22.ebuild b/app-emulation/virtualbox/virtualbox-5.2.22.ebuild new file mode 100644 index 000000000000..ea84396fbfb8 --- /dev/null +++ b/app-emulation/virtualbox/virtualbox-5.2.22.ebuild @@ -0,0 +1,476 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) +inherit flag-o-matic gnome2-utils java-pkg-opt-2 linux-info pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg-utils + +MY_PV="${PV/beta/BETA}" +MY_PV="${MY_PV/rc/RC}" +MY_P=VirtualBox-${MY_PV} + +DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use" +HOMEPAGE="https://www.virtualbox.org/" +SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2 + https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-5.2.16-patches-02.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="alsa debug doc headless java libressl lvm +opus pam pax_kernel pulseaudio +opengl python +qt5 +sdk +udev 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/libxml2 + media-libs/libpng:0= + media-libs/libvpx:0= + sys-libs/zlib:= + !headless? ( + media-libs/libsdl:0[X,video] + x11-libs/libX11 + x11-libs/libxcb:= + x11-libs/libXcursor + x11-libs/libXext + x11-libs/libXmu + x11-libs/libXt + opengl? ( virtual/opengl media-libs/freeglut ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtprintsupport:5 + dev-qt/qtwidgets:5 + dev-qt/qtx11extras:5 + opengl? ( dev-qt/qtopengl:5 ) + x11-libs/libXinerama + ) + ) + libressl? ( dev-libs/libressl:= ) + !libressl? ( dev-libs/openssl:0= ) + lvm? ( sys-fs/lvm2 ) + opus? ( media-libs/opus ) + udev? ( >=virtual/udev-171 ) + vnc? ( >=net-libs/libvncserver-0.9.9 )" +DEPEND="${RDEPEND} + >=dev-util/kbuild-0.1.9998.3127 + >=dev-lang/yasm-0.6.2 + sys-devel/bin86 + sys-libs/libcap + sys-power/iasl + virtual/pkgconfig + alsa? ( >=media-libs/alsa-lib-1.0.13 ) + doc? ( + app-text/docbook-sgml-dtd:4.4 + dev-texlive/texlive-basic + dev-texlive/texlive-latex + dev-texlive/texlive-latexrecommended + dev-texlive/texlive-latexextra + dev-texlive/texlive-fontsrecommended + dev-texlive/texlive-fontsextra + ) + !headless? ( x11-libs/libXinerama ) + java? ( >=virtual/jdk-1.6 ) + pam? ( sys-libs/pam ) + pax_kernel? ( sys-apps/elfix ) + pulseaudio? ( media-sound/pulseaudio ) + qt5? ( dev-qt/linguist-tools:5 ) + vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] ) + ${PYTHON_DEPS}" +RDEPEND="${RDEPEND} + java? ( >=virtual/jre-1.6 )" + +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_7.so + usr/lib/virtualbox/VBoxXPCOMC.so + usr/lib/virtualbox/VBoxOGLhostcrutil.so + usr/lib/virtualbox/VBoxNetDHCP.so + usr/lib/virtualbox/VBoxNetNAT.so" + +S="${WORKDIR}/${MY_P}" + +REQUIRED_USE=" + java? ( sdk ) + python? ( sdk ) + vboxwebsrv? ( java ) + ${PYTHON_REQUIRED_USE} +" + +pkg_setup() { + if ! use headless && ! use qt5 ; then + einfo "No USE=\"qt5\" selected, this build will not include any Qt frontend." + elif use headless && use qt5 ; then + einfo "You selected USE=\"headless qt5\", 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 + if ! use python ; then + einfo "You have disabled the \"python\" USE flag. This will only" + einfo "disable the python bindings being installed." + fi + java-pkg-opt-2_pkg_setup + python-single-r1_pkg_setup + + tc-ld-disable-gold #bug 488176 + tc-export CC CXX LD AR RANLIB + export HOST_CC="$(tc-getBUILD_CC)" +} + +src_prepare() { + # Remove shipped binaries (kBuild,yasm), see bug #232775 + rm -r kBuild/bin tools || die + + # Replace pointless GCC version check with something less stupid. + # This is needed for the qt5 version check. + sed -e 's@^check_gcc$@cc_maj="$(gcc -dumpversion | cut -d. -f1)" ; cc_min="$(gcc -dumpversion | cut -d. -f2)"@' \ + -i configure || die + + # Disable things unused or split into separate ebuilds + sed -e "s@MY_LIBDIR@$(get_libdir)@" \ + "${FILESDIR}"/${PN}-5-localconfig > LocalConfig.kmk || die + + # Respect LDFLAGS + sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \ + -i Config.kmk src/libs/xpcom18a4/Config.kmk || die + + # Do not use hard-coded ld (related to bug #488176) + sed -e '/QUIET)ld /s@ld @$(LD) @' \ + -i src/VBox/Devices/PC/ipxe/Makefile.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 + + # Only add nopie patch when we're on hardened + if gcc-specs-pie ; then + eapply "${FILESDIR}/050_virtualbox-5.2.8-nopie.patch" + fi + + # Only add paxmark patch when we're on pax_kernel + if use pax_kernel ; then + eapply "${FILESDIR}"/virtualbox-5.2.8-paxmark-bldprogs.patch + fi + + eapply "${WORKDIR}/patches" + + eapply_user +} + +doecho() { + echo "$@" + "$@" || die +} + +src_configure() { + local myconf=( + --with-gcc="$(tc-getCC)" + --with-g++="$(tc-getCXX)" + --disable-dbus + --disable-kmods + $(usex alsa '' --disable-alsa) + $(usex debug --build-debug '') + $(usex doc '' --disable-docs) + $(usex java '' --disable-java) + $(usex lvm '' --disable-devmapper) + $(usex opus --build-libopus '') + $(usex pulseaudio '' --disable-pulse) + $(usex python '' --disable-python) + $(usex vboxwebsrv --enable-webservice '') + $(usex vnc --enable-vnc '') + ) + if ! use headless ; then + myconf+=( + $(usex opengl '' --disable-opengl) + $(usex qt5 '' --disable-qt) + ) + else + myconf+=( + --build-headless + --disable-opengl + ) + fi + if use amd64 && ! has_multilib_profile ; then + myconf+=( --disable-vmmraw ) + fi + # not an autoconf script + doecho ./configure ${myconf[@]} +} + +src_compile() { + source ./env.sh || die + + # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529) + MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #' + MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #' + MAKEOPTS="${MAKEJOBS} ${MAKELOAD}" + 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_VERBOSE=2 \ + all +} + +src_install() { + local binpath="release" + use debug && binpath="debug" + cd "${S}"/out/linux.${ARCH}/${binpath}/bin || die + + local vbox_inst_path="/usr/$(get_libdir)/${PN}" each fwfile size ico icofile + + vbox_inst() { + local binary="${1}" + local perms="${2:-0750}" + local path="${3:-${vbox_inst_path}}" + + [[ -n "${binary}" ]] || die "vbox_inst: No binray given!" + [[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits." + + insinto ${path} + doins ${binary} + fowners root:vboxusers ${path}/${binary} + fperms ${perms} ${path}/${binary} + } + + # Create configuration files + insinto /etc/vbox + newins "${FILESDIR}/${PN}-4-config" vbox.cfg + + # Set the correct libdir + sed \ + -e "s@MY_LIBDIR@$(get_libdir)@" \ + -i "${ED%/}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed" + + # Install the wrapper script + exeinto ${vbox_inst_path} + newexe "${FILESDIR}/${PN}-ose-5-wrapper" "VBox" + fowners root:vboxusers ${vbox_inst_path}/VBox + fperms 0750 ${vbox_inst_path}/VBox + + # Install binaries and libraries + insinto ${vbox_inst_path} + doins -r components + + # *.rc files for x86_64 are only available on multilib systems + local rcfiles="*.rc" + if use amd64 && ! has_multilib_profile ; then + rcfiles="" + fi + for each in VBox{ExtPackHelperApp,Manage,SVC,Tunctl,XPCOMIPCD} *so *r0 ${rcfiles} ; do + vbox_inst ${each} + done + + # These binaries need to be suid root. + for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do + vbox_inst ${each} 4750 + done + + # Install EFI Firmware files (bug #320757) + pushd "${S}"/src/VBox/Devices/EFI/FirmwareBin &>/dev/null || die + for fwfile in VBoxEFI{32,64}.fd ; do + vbox_inst ${fwfile} 0644 + done + popd &>/dev/null || die + + # VBoxSVC and VBoxManage need to be pax-marked (bug #403453) + # VBoxXPCOMIPCD (bug #524202) + for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do + pax-mark -m "${ED%/}"${vbox_inst_path}/${each} + done + + # Symlink binaries to the shipped wrapper + for each in vbox{headless,manage} VBox{Headless,Manage,VRDP} ; do + dosym ${vbox_inst_path}/VBox /usr/bin/${each} + done + dosym ${vbox_inst_path}/VBoxTunctl /usr/bin/VBoxTunctl + + if use pam ; then + # VRDPAuth only works with this (bug #351949) + dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so + fi + + # set an env-variable for 3rd party tools + echo -n "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox" + doenvd "${T}/90virtualbox" + + if ! use headless ; then + vbox_inst VBoxSDL 4750 + pax-mark -m "${ED%/}"${vbox_inst_path}/VBoxSDL + + for each in vboxsdl VBoxSDL ; do + dosym ${vbox_inst_path}/VBox /usr/bin/${each} + done + + if use qt5 ; then + vbox_inst VirtualBox 4750 + pax-mark -m "${ED%/}"${vbox_inst_path}/VirtualBox + + if use opengl ; then + vbox_inst VBoxTestOGL + pax-mark -m "${ED%/}"${vbox_inst_path}/VBoxTestOGL + fi + + for each in virtualbox VirtualBox ; do + dosym ${vbox_inst_path}/VBox /usr/bin/${each} + done + + insinto /usr/share/${PN} + doins -r nls + doins -r UnattendedTemplates + + newmenu "${FILESDIR}"/${PN}-ose.desktop-2 ${PN}.desktop + fi + + pushd "${S}"/src/VBox/Artwork/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 + doicon -s scalable ${PN}.svg + popd &>/dev/null || die + pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die + for size in 16 24 32 48 64 72 96 128 256 512 ; do + for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do + icofile="${PN}-${ico}-${size}px.png" + if [[ -f "${icofile}" ]] ; then + newicon -s ${size} ${icofile} ${PN}-${ico}.png + fi + done + done + popd &>/dev/null || die + fi + + if use lvm ; then + vbox_inst VBoxVolInfo 4750 + dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo + fi + + if use sdk ; then + insinto ${vbox_inst_path} + doins -r sdk + + if use java ; then + java-pkg_regjar "${ED%/}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar" + java-pkg_regso "${ED%/}/${vbox_inst_path}/libvboxjxpcom.so" + fi + fi + + if use udev ; then + # New way of handling USB device nodes for VBox (bug #356215) + local udevdir="$(get_udevdir)" + insinto ${udevdir} + doins VBoxCreateUSBNode.sh + fowners root:vboxusers ${udevdir}/VBoxCreateUSBNode.sh + fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh + insinto ${udevdir}/rules.d + sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/10-virtualbox.rules \ + > "${T}"/10-virtualbox.rules || die + doins "${T}"/10-virtualbox.rules + fi + + if use vboxwebsrv ; then + vbox_inst vboxwebsrv + dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv + newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv + newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv + fi + + if use doc ; then + dodoc UserManual.pdf + fi + + newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf +} + +pkg_postinst() { + gnome2_icon_cache_update + xdg_desktop_database_update + + if use udev ; then + udevadm control --reload-rules \ + && udevadm trigger --subsystem-match=usb + fi + + tmpfiles_process /usr/lib/tmpfiles.d/virtualbox-vboxusb.conf + + if ! use headless && use qt5 ; 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 "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." + elog "Starting with version 5.0.0, ${PN} no longer has the \"additions\" and" + elog "the \"extension\" USE flag. For installation of the guest additions ISO" + elog "image, please emerge" + elog " app-emulation/virtualbox-additions" + elog "and for the USB2, USB3, VRDP and PXE boot ROM modules, please emerge" + elog " app-emulation/virtualbox-extpack-oracle" + if ! use udev ; then + elog "" + elog "WARNING!" + elog "Without USE=udev, USB devices will likely not work in ${PN}." + elif [ -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() { + gnome2_icon_cache_update + xdg_desktop_database_update +} diff --git a/app-emulation/virtualbox/virtualbox-6.0.0_beta2.ebuild b/app-emulation/virtualbox/virtualbox-6.0.0_beta2.ebuild new file mode 100644 index 000000000000..093771d083ea --- /dev/null +++ b/app-emulation/virtualbox/virtualbox-6.0.0_beta2.ebuild @@ -0,0 +1,479 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) +inherit flag-o-matic gnome2-utils java-pkg-opt-2 linux-info pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg-utils + +MY_PV="${PV/beta/BETA}" +MY_PV="${MY_PV/rc/RC}" +MY_P=VirtualBox-${MY_PV} + +DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use" +HOMEPAGE="https://www.virtualbox.org/" +SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2 + https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-6.0.0_beta2-patches-01.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \ +KEYWORDS="~amd64 ~x86" +IUSE="alsa debug doc headless java libressl lvm +opus pam pax_kernel pulseaudio +opengl python +qt5 +sdk +udev 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/libxml2 + media-libs/libpng:0= + media-libs/libvpx:0= + sys-libs/zlib:= + !headless? ( + media-libs/libsdl:0[X,video] + x11-libs/libX11 + x11-libs/libxcb:= + x11-libs/libXcursor + x11-libs/libXext + x11-libs/libXmu + x11-libs/libXt + opengl? ( virtual/opengl media-libs/freeglut ) + qt5? ( + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtprintsupport:5 + dev-qt/qtwidgets:5 + dev-qt/qtx11extras:5 + opengl? ( dev-qt/qtopengl:5 ) + x11-libs/libXinerama + ) + ) + libressl? ( dev-libs/libressl:= ) + !libressl? ( dev-libs/openssl:0= ) + lvm? ( sys-fs/lvm2 ) + opus? ( media-libs/opus ) + udev? ( >=virtual/udev-171 ) + vnc? ( >=net-libs/libvncserver-0.9.9 )" +DEPEND="${RDEPEND} + >=dev-util/kbuild-0.1.9998.3127 + >=dev-lang/yasm-0.6.2 + sys-devel/bin86 + sys-libs/libcap + sys-power/iasl + virtual/pkgconfig + alsa? ( >=media-libs/alsa-lib-1.0.13 ) + doc? ( + app-text/docbook-sgml-dtd:4.4 + dev-texlive/texlive-basic + dev-texlive/texlive-latex + dev-texlive/texlive-latexrecommended + dev-texlive/texlive-latexextra + dev-texlive/texlive-fontsrecommended + dev-texlive/texlive-fontsextra + ) + !headless? ( x11-libs/libXinerama ) + java? ( >=virtual/jdk-1.6 ) + pam? ( sys-libs/pam ) + pax_kernel? ( sys-apps/elfix ) + pulseaudio? ( media-sound/pulseaudio ) + qt5? ( dev-qt/linguist-tools:5 ) + vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] ) + ${PYTHON_DEPS}" +RDEPEND="${RDEPEND} + java? ( >=virtual/jre-1.6 )" + +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_7.so + usr/lib/virtualbox/VBoxXPCOMC.so + usr/lib/virtualbox/VBoxOGLhostcrutil.so + usr/lib/virtualbox/VBoxNetDHCP.so + usr/lib/virtualbox/VBoxNetNAT.so" + +S="${WORKDIR}/${MY_P}" + +REQUIRED_USE=" + java? ( sdk ) + python? ( sdk ) + vboxwebsrv? ( java ) + ${PYTHON_REQUIRED_USE} +" + +pkg_setup() { + if ! use headless && ! use qt5 ; then + einfo "No USE=\"qt5\" selected, this build will not include any Qt frontend." + elif use headless && use qt5 ; then + einfo "You selected USE=\"headless qt5\", 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 + if ! use python ; then + einfo "You have disabled the \"python\" USE flag. This will only" + einfo "disable the python bindings being installed." + fi + java-pkg-opt-2_pkg_setup + python-single-r1_pkg_setup + + tc-ld-disable-gold #bug 488176 + tc-export CC CXX LD AR RANLIB + export HOST_CC="$(tc-getBUILD_CC)" +} + +src_prepare() { + # Remove shipped binaries (kBuild,yasm), see bug #232775 + rm -r kBuild/bin tools || die + + # Replace pointless GCC version check with something less stupid. + # This is needed for the qt5 version check. + sed -e 's@^check_gcc$@cc_maj="$(gcc -dumpversion | cut -d. -f1)" ; cc_min="$(gcc -dumpversion | cut -d. -f2)"@' \ + -i configure || die + + # Disable things unused or split into separate ebuilds + sed -e "s@MY_LIBDIR@$(get_libdir)@" \ + "${FILESDIR}"/${PN}-5-localconfig > LocalConfig.kmk || die + + # Respect LDFLAGS + sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \ + -i Config.kmk src/libs/xpcom18a4/Config.kmk || die + + # Do not use hard-coded ld (related to bug #488176) + sed -e '/QUIET)ld /s@ld @$(LD) @' \ + -i src/VBox/Devices/PC/ipxe/Makefile.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 + + # Only add nopie patch when we're on hardened + if gcc-specs-pie ; then + eapply "${FILESDIR}/050_virtualbox-5.2.8-nopie.patch" + fi + + # Only add paxmark patch when we're on pax_kernel + if use pax_kernel ; then + eapply "${FILESDIR}"/virtualbox-5.2.8-paxmark-bldprogs.patch + fi + + eapply "${WORKDIR}/patches" + + eapply "${FILESDIR}"/${P}-no_libopus.patch + + eapply_user +} + +doecho() { + echo "$@" + "$@" || die +} + +src_configure() { + local myconf=( + --with-gcc="$(tc-getCC)" + --with-g++="$(tc-getCXX)" + --disable-dbus + --disable-kmods + $(usex alsa '' --disable-alsa) + $(usex debug --build-debug '') + $(usex doc '' --disable-docs) + $(usex java '' --disable-java) + $(usex lvm '' --disable-devmapper) + $(usex opus '' --disable-libopus) + $(usex pulseaudio '' --disable-pulse) + $(usex python '' --disable-python) + $(usex vboxwebsrv --enable-webservice '') + $(usex vnc --enable-vnc '') + ) + if ! use headless ; then + myconf+=( + $(usex opengl '' --disable-opengl) + $(usex qt5 '' --disable-qt) + ) + else + myconf+=( + --build-headless + --disable-opengl + ) + fi + if use amd64 && ! has_multilib_profile ; then + myconf+=( --disable-vmmraw ) + fi + # not an autoconf script + doecho ./configure ${myconf[@]} +} + +src_compile() { + source ./env.sh || die + + # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529) + MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #' + MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #' + MAKEOPTS="${MAKEJOBS} ${MAKELOAD}" + 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_VERBOSE=2 \ + all +} + +src_install() { + local binpath="release" + use debug && binpath="debug" + cd "${S}"/out/linux.${ARCH}/${binpath}/bin || die + + local vbox_inst_path="/usr/$(get_libdir)/${PN}" each fwfile size ico icofile + + vbox_inst() { + local binary="${1}" + local perms="${2:-0750}" + local path="${3:-${vbox_inst_path}}" + + [[ -n "${binary}" ]] || die "vbox_inst: No binray given!" + [[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits." + + insinto ${path} + doins ${binary} + fowners root:vboxusers ${path}/${binary} + fperms ${perms} ${path}/${binary} + } + + # Create configuration files + insinto /etc/vbox + newins "${FILESDIR}/${PN}-4-config" vbox.cfg + + # Set the correct libdir + sed \ + -e "s@MY_LIBDIR@$(get_libdir)@" \ + -i "${ED%/}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed" + + # Install the wrapper script + exeinto ${vbox_inst_path} + newexe "${FILESDIR}/${PN}-ose-5-wrapper" "VBox" + fowners root:vboxusers ${vbox_inst_path}/VBox + fperms 0750 ${vbox_inst_path}/VBox + + # Install binaries and libraries + insinto ${vbox_inst_path} + doins -r components + + # *.rc files for x86_64 are only available on multilib systems + local rcfiles="*.rc" + if use amd64 && ! has_multilib_profile ; then + rcfiles="" + fi + for each in VBox{ExtPackHelperApp,Manage,SVC,Tunctl,XPCOMIPCD} *so *r0 ${rcfiles} ; do + vbox_inst ${each} + done + + # These binaries need to be suid root. + for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do + vbox_inst ${each} 4750 + done + + # Install EFI Firmware files (bug #320757) + pushd "${S}"/src/VBox/Devices/EFI/FirmwareBin &>/dev/null || die + for fwfile in VBoxEFI{32,64}.fd ; do + vbox_inst ${fwfile} 0644 + done + popd &>/dev/null || die + + # VBoxSVC and VBoxManage need to be pax-marked (bug #403453) + # VBoxXPCOMIPCD (bug #524202) + for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do + pax-mark -m "${ED%/}"${vbox_inst_path}/${each} + done + + # Symlink binaries to the shipped wrapper + for each in vbox{headless,manage} VBox{Headless,Manage,VRDP} ; do + dosym ${vbox_inst_path}/VBox /usr/bin/${each} + done + dosym ${vbox_inst_path}/VBoxTunctl /usr/bin/VBoxTunctl + + if use pam ; then + # VRDPAuth only works with this (bug #351949) + dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so + fi + + # set an env-variable for 3rd party tools + echo -n "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox" + doenvd "${T}/90virtualbox" + + if ! use headless ; then + vbox_inst VBoxSDL 4750 + pax-mark -m "${ED%/}"${vbox_inst_path}/VBoxSDL + + for each in vboxsdl VBoxSDL ; do + dosym ${vbox_inst_path}/VBox /usr/bin/${each} + done + + if use qt5 ; then + vbox_inst VirtualBox + pax-mark -m "${ED%/}"${vbox_inst_path}/VirtualBox + + if use opengl ; then + vbox_inst VBoxTestOGL + pax-mark -m "${ED%/}"${vbox_inst_path}/VBoxTestOGL + fi + + for each in virtualbox VirtualBox ; do + dosym ${vbox_inst_path}/VBox /usr/bin/${each} + done + + insinto /usr/share/${PN} + doins -r nls + doins -r UnattendedTemplates + + newmenu "${FILESDIR}"/${PN}-ose.desktop-2 ${PN}.desktop + fi + + pushd "${S}"/src/VBox/Artwork/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 + doicon -s scalable ${PN}.svg + popd &>/dev/null || die + pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die + for size in 16 24 32 48 64 72 96 128 256 512 ; do + for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do + icofile="${PN}-${ico}-${size}px.png" + if [[ -f "${icofile}" ]] ; then + newicon -s ${size} ${icofile} ${PN}-${ico}.png + fi + done + done + popd &>/dev/null || die + fi + + if use lvm ; then + vbox_inst VBoxVolInfo 4750 + dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo + fi + + if use sdk ; then + insinto ${vbox_inst_path} + doins -r sdk + + if use java ; then + java-pkg_regjar "${ED%/}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar" + java-pkg_regso "${ED%/}/${vbox_inst_path}/libvboxjxpcom.so" + fi + fi + + if use udev ; then + # New way of handling USB device nodes for VBox (bug #356215) + local udevdir="$(get_udevdir)" + insinto ${udevdir} + doins VBoxCreateUSBNode.sh + fowners root:vboxusers ${udevdir}/VBoxCreateUSBNode.sh + fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh + insinto ${udevdir}/rules.d + sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/10-virtualbox.rules \ + > "${T}"/10-virtualbox.rules || die + doins "${T}"/10-virtualbox.rules + fi + + if use vboxwebsrv ; then + vbox_inst vboxwebsrv + dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv + newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv + newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv + fi + + if use doc ; then + dodoc UserManual.pdf + fi + + newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf +} + +pkg_postinst() { + gnome2_icon_cache_update + xdg_desktop_database_update + + if use udev ; then + udevadm control --reload-rules \ + && udevadm trigger --subsystem-match=usb + fi + + tmpfiles_process /usr/lib/tmpfiles.d/virtualbox-vboxusb.conf + + if ! use headless && use qt5 ; 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 "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." + elog "Starting with version 5.0.0, ${PN} no longer has the \"additions\" and" + elog "the \"extension\" USE flag. For installation of the guest additions ISO" + elog "image, please emerge" + elog " app-emulation/virtualbox-additions" + elog "and for the USB2, USB3, VRDP and PXE boot ROM modules, please emerge" + elog " app-emulation/virtualbox-extpack-oracle" + if ! use udev ; then + elog "" + elog "WARNING!" + elog "Without USE=udev, USB devices will likely not work in ${PN}." + elif [ -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() { + gnome2_icon_cache_update + xdg_desktop_database_update +} -- cgit v1.2.3