From 1f23f671d001ca7a0073e504f5ae0184eb5d024d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 24 Jan 2023 12:57:16 +0000 Subject: gentoo auto-resync : 24:01:2023 - 12:57:16 --- app-emulation/Manifest.gz | Bin 14816 -> 14813 bytes app-emulation/punes/Manifest | 9 +- .../punes/files/punes-0.107_ffmpeg-configure.patch | 27 - .../punes/files/punes-0.109_ldflags.patch | 33 - app-emulation/punes/punes-0.107.ebuild | 64 -- app-emulation/punes/punes-0.109-r1.ebuild | 69 -- app-emulation/punes/punes-0.110.ebuild | 51 ++ app-emulation/virtualbox/Manifest | 2 +- .../virtualbox/virtualbox-7.0.6-r1.ebuild | 727 +++++++++++++++++++++ app-emulation/virtualbox/virtualbox-7.0.6.ebuild | 721 -------------------- 10 files changed, 781 insertions(+), 922 deletions(-) delete mode 100644 app-emulation/punes/files/punes-0.107_ffmpeg-configure.patch delete mode 100644 app-emulation/punes/files/punes-0.109_ldflags.patch delete mode 100644 app-emulation/punes/punes-0.107.ebuild delete mode 100644 app-emulation/punes/punes-0.109-r1.ebuild create mode 100644 app-emulation/punes/punes-0.110.ebuild create mode 100644 app-emulation/virtualbox/virtualbox-7.0.6-r1.ebuild delete mode 100644 app-emulation/virtualbox/virtualbox-7.0.6.ebuild (limited to 'app-emulation') diff --git a/app-emulation/Manifest.gz b/app-emulation/Manifest.gz index 860674443aeb..80e6bfca61c5 100644 Binary files a/app-emulation/Manifest.gz and b/app-emulation/Manifest.gz differ diff --git a/app-emulation/punes/Manifest b/app-emulation/punes/Manifest index 3623dd157467..bb78c4a72858 100644 --- a/app-emulation/punes/Manifest +++ b/app-emulation/punes/Manifest @@ -1,8 +1,3 @@ -AUX punes-0.107_ffmpeg-configure.patch 798 BLAKE2B da041283394db3a436478025fe3c8f5919f368bf00a5947fc688110d86691e987a52653e21215e05aab9d9861e7346fb526031c560da363570e6aeba11e4255c SHA512 443ad57c8659597f1beab1e5bb0a560f053986a6021785e24107463aa2351c1d6e26ee760cb1ec4a9913d8e01002a31f41d21a0b878e8925a66f02a858cebaa6 -AUX punes-0.109_ldflags.patch 1476 BLAKE2B 7bc1bc06ec5f55d6a0146396cfed22d46381d2e471f8cc8a3c1261528e67dc8b36e3bde786e8cf8426d0357a0fea51ae4c90a124fb8e5cf31e1cc3b0638cca8e SHA512 30ee7ad570e43f0b303a8c6ed6131fe2b1e6359c024f213b1f064712a23a4d743ed055c321726a4b585dbf4dda6934690fa45c84ef86e18eebf2561353730cea -DIST punes-0.107.tar.gz 44024138 BLAKE2B 048df5bc9b019bafcd4eec75dc027de7cde9f8aa0d484ef96e5c41b091ba55c13b84ef7c7c36987b53206b1b7027758534479d0cc9fde63d89a48092c3f9d26d SHA512 eb3b7aa1c18765402e1e57e23dd4b019255320b795c0f578a4d5ae9f4e0c163613da07280e2a5abed80b9ba90e74c80b53b5fdd80e405103f0063ca55d0ee7bd -DIST punes-0.109.tar.gz 48695769 BLAKE2B cc5a86b2f99dc3c97bc04386568fcb926d2a9c83f8c6dcaf28c022a136791ff481610ad578c996c643e0c0b107acb2be9a0fbfda0950435aad984f3506ec1983 SHA512 13cf3587c9936ff9f933d3394516d25fbd664fc2fd510af724c3bbbc6fefb12a019e8fe27cd52cd326ef8fba3721f4e1816ce5d3f3935f701081a142f04a3bc2 -DIST punes-0.109_musl.patch.xz 5520 BLAKE2B ea1c36d510303dd67b7e2005a3f099e328583c9762f74ccf9457a5f04268c44243b4fe18fc6498c176a999318f40c9a34ca2a3ed7de2d4dea953ab055901ad42 SHA512 507163d40849bbf782725f71409432a0cb4a79f5c3fccfaf78786322539a1bce0608b731a75c817b72f8a4e814d0cb21019cb23f621176042fb946754a4a9292 -EBUILD punes-0.107.ebuild 1241 BLAKE2B 5df5b93a315a152425c1bbeeb612b3a173d8682350d5b2f13740699752efeb9d96b99e57b578103e78b13edc3929344962dee8585a337fe5bc95bcdc036a39cc SHA512 149e4797185ae7d906ec4ef5ec29314eee21084829272379fdbf79d29519715d7e329174ef0485ab1a6448943e72781a2b6314b096a200ead2237e5a5138c2df -EBUILD punes-0.109-r1.ebuild 1568 BLAKE2B e974710b926adcabeea13e0de0c73403dc06750da606b03990d7e15f2ccb3e3518206dfd07114cf0637c53067c6f151b3959f895476c55701e39fc93cd671629 SHA512 dff1d6a40e964f0d9c7a3fde8d5981d4289458219035c0f33ed5f5653298e2af020fdc55a6a8d525330e21951eeaa072f112b8cf3414782533c67ebb4e616b20 +DIST punes-0.110.tar.gz 49500935 BLAKE2B c4704ad6edc828f6332798e44939dc82e86fb0fed1d7a71e3377c7bb384a7fc40d2b9303dff13b1e92cf4bb189a5c4816c5c6ec2f2db1ab1c5d58d459b6c1ed9 SHA512 e0f503ac8c0cd0257eebb1401a6cf5045d03e348a5f915574b47c15930c029c93e36f5776c1364b7c7b6a27faa48a36173c4fd0342f24e9a3241ebd5e0a9d137 +EBUILD punes-0.110.ebuild 1060 BLAKE2B 0159bd33946e7633901018716ca92ada0b29d3d0f8349499464a8b940f271196284d2fb1c0efe8958481e488ca12c5ea5f5528eb293740cd925668ba2e5f9ffa SHA512 22a2bb531b4999be4bfa93140cbd595a36d46007ac7e1ea6c59ea92f8ccb8cc1b4ffb88a162141c42eec4a5bacfab41b0e6113496f501a2015e9a15281d8513a MISC metadata.xml 560 BLAKE2B ea221c8fefa3fc3e9f8942ae7cfd642384cde9ec10949bc148e17727e0633f718140fa15675a3268674c80e6b55177ff5573460abd687bc76420673f76aecc8a SHA512 7676ca51eb1d02c6564dfd9ef47975f349856ae9536e3f1d9771bf4c56a2aebe86622461ae50b5989c56fffa1cfa92fc6185f1d62d933c4db5016acc4c280a8f diff --git a/app-emulation/punes/files/punes-0.107_ffmpeg-configure.patch b/app-emulation/punes/files/punes-0.107_ffmpeg-configure.patch deleted file mode 100644 index fd70e0d49ef0..000000000000 --- a/app-emulation/punes/files/punes-0.107_ffmpeg-configure.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 241b71fdacad10ad1e790e5a4e380ea1ffbe8a93 Mon Sep 17 00:00:00 2001 -From: "Azamat H. Hackimov" -Date: Thu, 21 Jan 2021 12:32:31 +0300 -Subject: [PATCH] Fix ffmpeg configure switch option - -autoconf's --with-PACKAGE/--without-PACKAGE requires $withval, not -$enableval. ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index fd9e0365..f63d50ea 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -38,7 +38,7 @@ AC_ARG_WITH([ffmpeg], - AS_HELP_STRING([--with-ffmpeg], - [Build with support for FFmpeg [autodetect] @<:@default: yes@:>@] - ), -- [with_ffmpeg=$enableval], [with_ffmpeg=yes]) -+ [with_ffmpeg=$withval], [with_ffmpeg=yes]) - - AC_ARG_ENABLE([release], - AS_HELP_STRING([--disable-release], --- -2.26.2 - diff --git a/app-emulation/punes/files/punes-0.109_ldflags.patch b/app-emulation/punes/files/punes-0.109_ldflags.patch deleted file mode 100644 index ada9b28f137b..000000000000 --- a/app-emulation/punes/files/punes-0.109_ldflags.patch +++ /dev/null @@ -1,33 +0,0 @@ -https://github.com/punesemu/puNES/commit/b79efed1b6e350076ea7a459dafd6c2f995bcb51 - -From b79efed1b6e350076ea7a459dafd6c2f995bcb51 Mon Sep 17 00:00:00 2001 -From: fhorse -Date: Tue, 7 Jun 2022 09:16:59 +0200 -Subject: [PATCH] https://github.com/punesemu/puNES/issues/213 - -This commit allows compilation with Flatpak's build tools. ---- - src/extra/lib7zip-53abfeb/configure | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/src/extra/lib7zip-53abfeb/configure b/src/extra/lib7zip-53abfeb/configure -index ca28ab144..504c02f6e 100755 ---- a/src/extra/lib7zip-53abfeb/configure -+++ b/src/extra/lib7zip-53abfeb/configure -@@ -344,11 +344,11 @@ fi - - # Unlike CFLAGS/CXXFLAGS/CC/CXX, LDFLAGS isn't handled by CMake, so we - # need to parse it here. --if [ "x${LDFLAGS}" != "x" ]; then -- for varname in EXE MODULE SHARED STATIC; do -- CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_${varname}_LINKER_FLAGS=$(quote "$LDFLAGS")" -- done --fi -+#if [ "x${LDFLAGS}" != "x" ]; then -+# for varname in EXE MODULE SHARED STATIC; do -+# CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_${varname}_LINKER_FLAGS=$(quote "$LDFLAGS")" -+# done -+#fi - - #eval "${CMAKE_CMD}" "${TOP_SRCDIR}" -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" -DCMAKE_INSTALL_PREFIX="${PREFIX}" -DCMAKE_INSTALL_LIBDIR="${LIBDIR}" ${CMAKE_ARGS} - #eval "${CMAKE_CMD}" "${TOP_SRCDIR}" -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DBUILD_SHARED_LIB="OFF" -DP7ZIP_SOURCE_DIR="${P7ZIP_SOURCE_DIR}" ${CMAKE_ARGS} diff --git a/app-emulation/punes/punes-0.107.ebuild b/app-emulation/punes/punes-0.107.ebuild deleted file mode 100644 index db719a74f5f9..000000000000 --- a/app-emulation/punes/punes-0.107.ebuild +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools xdg-utils - -DESCRIPTION="Nintendo Entertainment System (NES) emulator" -HOMEPAGE="https://github.com/punesemu/puNES" -SRC_URI="https://github.com/punesemu/puNES/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2+" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="cg ffmpeg" - -RDEPEND=" - ffmpeg? ( media-video/ffmpeg:= ) - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtsvg:5 - dev-qt/qtwidgets:5 - media-libs/alsa-lib - virtual/glu - virtual/opengl" -DEPEND="${RDEPEND}" -BDEPEND=" - cg? ( media-gfx/nvidia-cg-toolkit ) - dev-qt/linguist-tools:5 - virtual/pkgconfig" - -S="${WORKDIR}/puNES-${PV}" - -PATCHES=( - "${FILESDIR}/${P}_ffmpeg-configure.patch" -) - -src_prepare() { - default - - sed -i "/update-desktop-database/d" misc/Makefile.am || die - eautoreconf - # FIXME why eautoreconf can't handle this? - cd "src/extra/lib7zip-1.6.5" || die - eautoreconf -} - -src_configure() { - econf \ - $(use_with cg opengl-nvidia-cg) \ - $(use_with ffmpeg) -} - -pkg_postinst() { - xdg_icon_cache_update - xdg_desktop_database_update - xdg_mimeinfo_database_update -} - -pkg_postrm() { - xdg_icon_cache_update - xdg_desktop_database_update - xdg_mimeinfo_database_update -} diff --git a/app-emulation/punes/punes-0.109-r1.ebuild b/app-emulation/punes/punes-0.109-r1.ebuild deleted file mode 100644 index f4591cbe10f9..000000000000 --- a/app-emulation/punes/punes-0.109-r1.ebuild +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit autotools toolchain-funcs xdg - -DESCRIPTION="Nintendo Entertainment System (NES) emulator" -HOMEPAGE="https://github.com/punesemu/puNES" -SRC_URI="https://github.com/punesemu/puNES/archive/v${PV}.tar.gz -> ${P}.tar.gz" -SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${P}_musl.patch.xz" -S="${WORKDIR}/puNES-${PV}" - -LICENSE="GPL-2+" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="cg ffmpeg" - -RDEPEND=" - dev-qt/qtcore:5 - dev-qt/qtgui:5 - dev-qt/qtnetwork:5 - dev-qt/qtsvg:5 - dev-qt/qtwidgets:5 - media-libs/alsa-lib - media-libs/libglvnd[X] - virtual/glu - virtual/udev - x11-libs/libX11 - x11-libs/libXrandr - cg? ( media-gfx/nvidia-cg-toolkit ) - ffmpeg? ( media-video/ffmpeg:= )" -DEPEND=" - ${RDEPEND} - x11-base/xorg-proto" -BDEPEND=" - dev-qt/linguist-tools:5 - dev-util/cmake - virtual/pkgconfig" - -PATCHES=( - "${FILESDIR}"/${P}_ldflags.patch - "${WORKDIR}"/${P}_musl.patch # 830471 -) - -src_prepare() { - default - - # empty CMAKE_ARGS to avoid double CHOST (bug #877089), and also unused - # options (QA notices), use sed to avoid rebases because of the directory - sed -e '/x${DEBUG_VERSION}/i\CMAKE_ARGS=' \ - -i src/extra/lib7zip-*/configure || die - tc-export CC CXX - - # src/extra/lib7zip is not autotools, but - # is contained within AC_CONFIG_SUBDIRS - AT_NO_RECURSIVE=1 eautoreconf - cd src/extra/xdelta-3.1.0 || die - eautoreconf -} - -src_configure() { - local econfargs=( - $(use_with cg opengl-nvidia-cg) - $(use_with ffmpeg) - ) - - econf "${econfargs[@]}" -} diff --git a/app-emulation/punes/punes-0.110.ebuild b/app-emulation/punes/punes-0.110.ebuild new file mode 100644 index 000000000000..9a5f143123d4 --- /dev/null +++ b/app-emulation/punes/punes-0.110.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake xdg + +DESCRIPTION="Nintendo Entertainment System (NES) emulator" +HOMEPAGE="https://github.com/punesemu/puNES" +SRC_URI="https://github.com/punesemu/puNES/archive/v${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/puNES-${PV}" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="X cg ffmpeg" + +RDEPEND=" + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtnetwork:5 + dev-qt/qtsvg:5 + dev-qt/qtwidgets:5 + media-libs/alsa-lib + media-libs/libglvnd[X?] + virtual/glu + virtual/udev + X? ( + x11-libs/libX11 + x11-libs/libXrandr + ) + cg? ( media-gfx/nvidia-cg-toolkit ) + ffmpeg? ( media-video/ffmpeg:= )" +DEPEND=" + ${RDEPEND} + X? ( x11-base/xorg-proto )" +BDEPEND=" + dev-qt/linguist-tools:5 + virtual/pkgconfig" + +src_configure() { + local mycmakeargs=( + -DENABLE_GIT_INFO=OFF + -DENABLE_QT6_LIBS=OFF + -DDISABLE_PORTABLE_MODE=OFF + -DENABLE_FFMPEG=$(usex ffmpeg) + -DENABLE_FULLSCREEN_RESFREQ=$(usex X) + -DENABLE_OPENGL_CG=$(usex cg) + ) + cmake_src_configure +} diff --git a/app-emulation/virtualbox/Manifest b/app-emulation/virtualbox/Manifest index 82bc661649db..4c1494845431 100644 --- a/app-emulation/virtualbox/Manifest +++ b/app-emulation/virtualbox/Manifest @@ -23,5 +23,5 @@ DIST virtualbox-patches-6.1.36.tar.bz2 2733 BLAKE2B dcfebfeca4873d382441515d48b4 EBUILD virtualbox-6.1.40.ebuild 18343 BLAKE2B 02cda507a7265373635fab733457683571de408cb419f676300c50c4474ef0e048b4a57b01e894518eed858d84f39467e7a63c588bbbefd83d79a93cfe1115e5 SHA512 135bd0aa1fad4c666c283b4e60c97374aabeb0d4315f91798cb8ab2185eb708ffb83d1e2b84b2e48390d61109a13528ba896780eea38e654f66efeab69268a20 EBUILD virtualbox-6.1.42.ebuild 18585 BLAKE2B 7a1733ac669a766b937062af4e8dee621641d88f212e17d47cae10a2361ad9d20dd7a5cdaa00bc6f1f7819ba70a500f86f1fe2ce2b31571b0691325d33d3c9b7 SHA512 6673ae8818f6abbcb53807e6d18e5a6344855616fc7d35f4064caa87980c1d73895d5daa0f237c0a8aab61b2b6f1fda87589cf8e3e453ed80bf3cecce1217197 EBUILD virtualbox-7.0.4-r1.ebuild 19650 BLAKE2B 454f2cf8299e6a8613fc70153e5bdcc542776d852e3da4a2cbaa50e29159ddc97a0c145015efec5cbf0db988a21b0e911d2cd755fafb6d7ccaaa39f09b18e07b SHA512 2057e377f27bf928926e7cb0a2df9b03591aab1a20e8c7903853528c61d4b1d0fc2ec29de6efa39381fc2d626fc6001244680a07632df65b2032dea1a96a5d01 -EBUILD virtualbox-7.0.6.ebuild 20043 BLAKE2B 77b2d3335e4f42d3db4d4c25ecbe9499f816bb1c3bd387f284867553b66c76aec865f6f5c1fe8f47ae8c75a05d4721178a69f419b7b96458ebc048379a87eef2 SHA512 6a2f674bad334fc7c8f2813a58acff96ceb10fc65048cb9125cefb8a96c06093d59b5fb20c287ac31165195b9091196bc3075495f5f233de9df75565f5da8325 +EBUILD virtualbox-7.0.6-r1.ebuild 20262 BLAKE2B c806d069b661256f31389c262891126888a30801eb53874b687f91ec3771f87e2b588471358c6f133f9473a362401dd7ffef608d5aebb916aa392ef35f89c7a4 SHA512 3c8775c1494bd037b397b70208d6f873316c56abec02f717242db373677892d4bccd171f92c4356fbba1315e4b23abd193dcb25b953e8f6e05b6becd9fdcdec2 MISC metadata.xml 852 BLAKE2B 28c7b361100939ca374829ca6a28b9ff8d4fd5ad22d2750f005514ed25e43b9a3c9c00984ae4f94a89109d49b47826676576d25c001fbcdb4ea6d6d8a5e8b9ee SHA512 a67b3217cabe9dfa15d26617ab30218cd3b63a9eca9902213efc420b9efe0174de71b59091b663f8783a88ece857912aaaee8868a3aed3b309e6cd5993c5a7d4 diff --git a/app-emulation/virtualbox/virtualbox-7.0.6-r1.ebuild b/app-emulation/virtualbox/virtualbox-7.0.6-r1.ebuild new file mode 100644 index 000000000000..2d0c9076e342 --- /dev/null +++ b/app-emulation/virtualbox/virtualbox-7.0.6-r1.ebuild @@ -0,0 +1,727 @@ +# Copyright 2022-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# To add a new Python here: +# 1. Patch src/libs/xpcom18a4/python/Makefile.kmk (copy the previous impl's logic) +# Do NOT skip this part. It'll end up silently not-building the Python extension +# or otherwise misbehaving if you do. +# +# 2. Then update PYTHON_COMPAT & set PYTHON_SINGLE_TARGET for testing w/ USE=python. +# +# May need to look at other distros (e.g. Arch Linux) to find patches for newer +# Python versions as upstream tends to lag. Upstream may have patches on their +# trunk branch but not release branch. +# +# See bug #785835, bug #856121. +PYTHON_COMPAT=( python3_{9..11} ) + +inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \ + python-single-r1 tmpfiles toolchain-funcs udev xdg + +MY_PN="VirtualBox" +MY_P=${MY_PN}-${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/${PV}/${MY_P}.tar.bz2 + https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-6.1.36.tar.bz2" +S="${WORKDIR}/${MY_PN}-${PV}" + +LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64" +IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde vnc" + +unset WATCOM #856769 + +COMMON_DEPEND=" + ${PYTHON_DEPS} + acct-group/vboxusers + ~app-emulation/virtualbox-modules-${PV} + dev-libs/libtpms + dev-libs/libxml2 + dev-libs/openssl:0= + media-libs/libpng:0= + media-libs/libvpx:0= + net-misc/curl + sys-libs/zlib + dbus? ( sys-apps/dbus ) + gui? ( + dev-qt/qtcore:5 + dev-qt/qtdbus:5 + dev-qt/qtgui:5 + dev-qt/qthelp:5 + dev-qt/qtprintsupport:5 + dev-qt/qtwidgets:5 + dev-qt/qtx11extras:5 + dev-qt/qtxml:5 + x11-libs/libX11 + x11-libs/libXt + opengl? ( dev-qt/qtopengl:5 ) + ) + lvm? ( sys-fs/lvm2 ) + opengl? ( + media-libs/libglvnd[X] + media-libs/vulkan-loader + x11-libs/libX11 + x11-libs/libXt + ) + pam? ( sys-libs/pam ) + sdl? ( + media-libs/libsdl:0[X,video] + x11-libs/libX11 + x11-libs/libXcursor + x11-libs/libXt + ) + vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] ) + vde? ( net-misc/vde ) + vnc? ( >=net-libs/libvncserver-0.9.9 ) +" +# We're stuck on JDK (and JRE, I guess?) 1.8 because of need for wsimport +# with USE="vboxwebsrv java". Note that we have to put things in DEPEND, +# not (only, anyway) BDEPEND, as the eclass magic to set the environment variables +# based on *DEPEND doesn't work for BDEPEND at least right now. +# +# There's a comment in Config.kmk about it +# ("With Java 11 wsimport was removed, usually part of a separate install now.") +# but it needs more investigation. +# +# See bug #878299 to track this issue. +DEPEND=" + ${COMMON_DEPEND} + >=dev-libs/libxslt-1.1.19 + virtual/libcrypt:= + alsa? ( >=media-libs/alsa-lib-1.0.13 ) + gui? ( + x11-base/xorg-proto + x11-libs/libxcb:= + x11-libs/libXcursor + x11-libs/libXext + x11-libs/libXinerama + x11-libs/libXmu + x11-libs/libXrandr + ) + java? ( virtual/jdk:1.8 ) + opengl? ( + x11-base/xorg-proto + x11-libs/libXcursor + x11-libs/libXinerama + x11-libs/libXmu + x11-libs/libXrandr + virtual/glu + ) + sdl? ( x11-libs/libXinerama ) + pulseaudio? ( media-sound/pulseaudio ) + udev? ( >=virtual/udev-171 ) +" +RDEPEND=" + ${COMMON_DEPEND} + gui? ( x11-libs/libxcb:= ) + java? ( virtual/jre:1.8 ) +" +BDEPEND=" + ${PYTHON_DEPS} + app-arch/tar + >=dev-lang/yasm-0.6.2 + dev-libs/libIDL + dev-util/glslang + >=dev-util/kbuild-0.1.9998.3127 + sys-apps/which + sys-devel/bin86 + sys-libs/libcap + sys-power/iasl + virtual/pkgconfig + doc? ( + app-text/docbook-sgml-dtd:4.4 + app-text/docbook-xsl-ns-stylesheets + dev-texlive/texlive-basic + dev-texlive/texlive-latex + dev-texlive/texlive-latexrecommended + dev-texlive/texlive-latexextra + dev-texlive/texlive-fontsrecommended + dev-texlive/texlive-fontsextra + dev-qt/qthelp:5 + ) + gui? ( dev-qt/linguist-tools:5 ) + nls? ( dev-qt/linguist-tools:5 ) + java? ( virtual/jdk:1.8 ) +" + +QA_FLAGS_IGNORED=" + usr/lib64/virtualbox/VBoxDDR0.r0 + usr/lib64/virtualbox/VMMR0.r0 + usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0 + usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug +" + +QA_TEXTRELS=" + usr/lib64/virtualbox/VMMR0.r0 + usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0 +" + +QA_EXECSTACK=" + usr/lib64/virtualbox/iPxeBaseBin + usr/lib64/virtualbox/VMMR0.r0 + usr/lib64/virtualbox/VBoxDDR0.r0 + usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0 + usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug +" + +QA_WX_LOAD=" + usr/lib64/virtualbox/iPxeBaseBin +" + +QA_PRESTRIPPED=" + usr/lib64/virtualbox/VMMR0.r0 + usr/lib64/virtualbox/VBoxDDR0.r0 + usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0 +" + +REQUIRED_USE=" + java? ( sdk ) + python? ( sdk ) + vboxwebsrv? ( java ) + ${PYTHON_REQUIRED_USE} +" + +PATCHES=( + "${FILESDIR}"/${PN}-6.1.26-configure-include-qt5-path.patch # bug #805365 + + # This patch is needed to avoid automagic detection based on a hardcoded + # list of Pythons in configure. It's necessary but not sufficient + # (see the rest of the ebuild's logic for the remainder) to handle + # proper Python selection. + "${FILESDIR}"/${PN}-6.1.34-r3-python.patch + + # 865361 + "${FILESDIR}"/${PN}-6.1.36-fcf-protection.patch + + "${FILESDIR}"/${PN}-7.0.4-fix-compilation.patch + "${FILESDIR}"/${PN}-7.0.0-fix-compilation-clang.patch + "${FILESDIR}"/${PN}-7.0.0-python3_11.patch + + # Downloaded patchset + "${WORKDIR}"/virtualbox-patches-6.1.36/patches +) + +pkg_pretend() { + if ! use gui; then + einfo "No USE=\"gui\" selected, this build will not include any 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 + if ! use nls && use gui; then + einfo "USE=\"gui\" also selects USE=\"nls\". This build" + einfo "will have NLS support." + fi + + if use gui && ! use doc; then + einfo "You have disabled the \"doc\" USE flag. Built-in help" + einfo "will not be available." + fi + + # 749273 + local d=${ROOT} + for i in usr "$(get_libdir)"; do + d="${d}/$i" + if [[ "$(stat -L -c "%g %u" "${d}")" != "0 0" ]]; then + die "${d} should be owned by root, VirtualBox will not start otherwise" + fi + done +} + +pkg_setup() { + java-pkg-opt-2_pkg_setup + python-single-r1_pkg_setup +} + +src_prepare() { + default + + # Only add nopie patch when we're on hardened + if gcc-specs-pie; then + eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch + fi + + # Remove shipped binaries (kBuild, yasm) and tools, see bug #232775 + rm -r kBuild/bin || die + # Remove everything in tools except kBuildUnits + find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || die + + # Disable things unused or split into separate ebuilds + sed -e "s@MY_LIBDIR@$(get_libdir)@" \ + "${FILESDIR}"/${PN}-5-localconfig > LocalConfig.kmk || die + + if ! use pch; then + # bug #753323 + printf '\n%s\n' "VBOX_WITHOUT_PRECOMPILED_HEADERS=1" \ + >> LocalConfig.kmk || die + fi + + # 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 + einfo "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 + + #856811 #864274 + # cannot filter out only one flag, some combinations of these flags produce buggy executables + for i in abm avx avx2 bmi bmi2 fma fma4 popcnt; do + append-cflags $(test-flags-CC -mno-$i) + append-cxxflags $(test-flags-CXX -mno-$i) + done + + # bug #843437 + cat >> LocalConfig.kmk <<-EOF || die + CXXFLAGS=${CXXFLAGS} + CFLAGS=${CFLAGS} + EOF + + if use sdl; then + echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die + fi + + #443830 + echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die + + # clang assembler chokes on comments starting with / + if tc-is-clang; then + sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die + fi + + # fix doc generation + echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die + # replace xhtml names with numeric equivalents + find doc/manual -name \*.xml -exec sed -i \ + -e 's/ /\ /g' \ + -e 's/–/\–/g' \ + -e 's/←/\←/g' \ + -e 's/→/\→/g' \ + -e 's/↔/\↔/g' {} \+ || die + + # fix help path #891879 + echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die + + # 489208 + # Cannot patch the whole text, many translations. Use sed instead to replace the command + find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \ + 's/'[^&]*\(vboxdrv setup\|vboxconfig\)'/\'emerge -1 virtualbox-modules\'/' {} \+ || die + sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \ + src/VBox/Frontends/VirtualBox/src/main.cpp \ + src/VBox/VMM/VMMR3/VM.cpp || die + + # 890561 + echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die + + if ! use nls && ! use gui; then + cat >> LocalConfig.kmk <<-EOF || die + VBOX_WITH_NLS := + VBOX_WITH_MAIN_NLS := + VBOX_WITH_PUEL_NLS := + VBOX_WITH_VBOXMANAGE_NLS := + EOF + fi +} + +src_configure() { + tc-ld-disable-gold # bug #488176 + + tc-export AR CC CXX LD RANLIB + export HOST_CC="$(tc-getBUILD_CC)" + + local myconf=( + --with-gcc="$(tc-getCC)" + --with-g++="$(tc-getCXX)" + + --disable-kmods + + $(usev !alsa --disable-alsa) + $(usev !dbus --disable-dbus) + $(usev debug --build-debug) + $(usev !doc --disable-docs) + $(usev !java --disable-java) + $(usev !lvm --disable-devmapper) + $(usev !pulseaudio --disable-pulse) + $(usev !python --disable-python) + $(usev vboxwebsrv --enable-webservice) + $(usev vde --enable-vde) + $(usev vnc --enable-vnc) + ) + + if use gui || use sdl || use opengl; then + myconf+=( + $(usev !opengl --disable-opengl) + $(usev !gui --disable-qt) + $(usev !sdl --disable-sdl) + ) + else + myconf+=( + --build-headless + ) + fi + + if use amd64 && ! has_multilib_profile; then + myconf+=( --disable-vmmraw ) + fi + + # not an autoconf script + edo ./configure "${myconf[@]}" + + # Force usage of chosen Python implementation + # bug #856121, bug #785835 + sed -i \ + -e '/VBOX_WITH_PYTHON.*=/d' \ + -e '/VBOX_PATH_PYTHON_INC.*=/d' \ + -e '/VBOX_LIB_PYTHON.*=/d' \ + AutoConfig.kmk || die + + cat >> AutoConfig.kmk <<-EOF || die + VBOX_WITH_PYTHON=$(usev python 1) + VBOX_PATH_PYTHON_INC=$(python_get_includedir) + VBOX_LIB_PYTHON=$(python_get_library_path) + EOF + + if use python; then + local mangled_python="${EPYTHON#python}" + mangled_python="${mangled_python/.}" + + # Stub out the script which defines what the Makefile ends up + # building for. gen_python_deps.py gets called by the Makefile + # with some args and it spits out a bunch of paths for a hardcoded + # list of Pythons. We just override it with what we're actually using. + # This minimises the amount of patching we have to do for new Pythons. + cat > src/libs/xpcom18a4/python/gen_python_deps.py <<-EOF || die + print("VBOX_PYTHON${mangled_python}_INC=$(python_get_includedir)") + print("VBOX_PYTHON${mangled_python}_LIB=$(python_get_library_path)") + print("VBOX_PYTHONDEF_INC=$(python_get_includedir)") + print("VBOX_PYTHONDEF_LIB=$(python_get_library_path)") + EOF + + chmod +x src/libs/xpcom18a4/python/gen_python_deps.py || die + fi +} + +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}" + + local myemakeargs=( + VBOX_BUILD_PUBLISHER=_Gentoo + VBOX_WITH_VBOXIMGMOUNT=1 + + KBUILD_VERBOSE=2 + + AS="$(tc-getCC)" + CC="$(tc-getCC)" + CXX="$(tc-getCXX)" + + TOOL_GCC3_CC="$(tc-getCC)" + TOOL_GCC3_LD="$(tc-getCC)" + TOOL_GCC3_AS="$(tc-getCC)" + TOOL_GCC3_AR="$(tc-getAR)" + TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)" + + TOOL_GXX3_CC="$(tc-getCC)" + TOOL_GXX3_CXX="$(tc-getCXX)" + TOOL_GXX3_LD="$(tc-getCXX)" + TOOL_GXX3_AS="$(tc-getCXX)" + TOOL_GXX3_AR="$(tc-getAR)" + TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)" + + TOOL_GCC3_CFLAGS="${CFLAGS}" + TOOL_GCC3_CXXFLAGS="${CXXFLAGS}" + VBOX_GCC_OPT="${CXXFLAGS}" + VBOX_NM="$(tc-getNM)" + + TOOL_YASM_AS=yasm + ) + + if use amd64 && has_multilib_profile; then + myemakeargs+=( + CC32="$(tc-getCC) -m32" + CXX32="$(tc-getCXX) -m32" + + TOOL_GCC32_CC="$(tc-getCC) -m32" + TOOL_GCC32_CXX="$(tc-getCXX) -m32" + TOOL_GCC32_LD="$(tc-getCC) -m32" + TOOL_GCC32_AS="$(tc-getCC) -m32" + TOOL_GCC32_AR="$(tc-getAR)" + TOOL_GCC32_OBJCOPY="$(tc-getOBJCOPY)" + + TOOL_GXX32_CC="$(tc-getCC) -m32" + TOOL_GXX32_CXX="$(tc-getCXX) -m32" + TOOL_GXX32_LD="$(tc-getCXX) -m32" + TOOL_GXX32_AS="$(tc-getCXX) -m32" + TOOL_GXX32_AR="$(tc-getAR)" + TOOL_GXX32_OBJCOPY="$(tc-getOBJCOPY)" + ) + fi + + MAKE="kmk" emake "${myemakeargs[@]}" all +} + +src_install() { + cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die + + local vbox_inst_path="/usr/$(get_libdir)/${PN}" each size ico icofile + + vbox_inst() { + local binary="${1}" + local perms="${2:-0750}" + local path="${3:-${vbox_inst_path}}" + + [[ -n "${binary}" ]] || die "vbox_inst: No binary 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-6-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 + + for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,VMMPreload,XPCOMIPCD} \ + vboximg-mount vbox-img *so *r0; 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) + for each in VBoxEFI{32,64}.fd ; do + vbox_inst ${each} 0644 + done + + # 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{autostart,balloonctrl,bugreport,headless,manage} \ + VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do + dosym ${vbox_inst_path}/VBox /usr/bin/${each} + done + dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount + dosym ${vbox_inst_path}/vbox-img /usr/bin/vbox-img + + 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 sdl; 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 + fi + + if use gui; then + vbox_inst VirtualBox + vbox_inst VirtualBoxVM 4750 + for each in VirtualBox{,VM} ; do + pax-mark -m "${ED}"${vbox_inst_path}/${each} + done + + if use opengl; then + vbox_inst VBoxTestOGL + pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL + fi + + for each in virtualbox{,vm} VirtualBox{,VM} ; do + dosym ${vbox_inst_path}/VBox /usr/bin/${each} + done + + insinto /usr/share/${PN} + doins -r nls + doins -r UnattendedTemplates + + domenu ${PN}.desktop + + 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 + local udevdir="$(get_udevdir)" + local udev_file="VBoxCreateUSBNode.sh" + local rules_file="10-virtualbox.rules" + + insinto ${udevdir} + doins ${udev_file} + fowners root:vboxusers ${udevdir}/${udev_file} + fperms 0750 ${udevdir}/${udev_file} + + insinto ${udevdir}/rules.d + sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \ + > "${T}"/${rules_file} || die + doins "${T}"/${rules_file} + 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 + + # Remove dead symlinks (bug #715338) + find "${ED}"/usr/$(get_libdir)/${PN} -xtype l -delete || die + + # Fix version string in extensions or else they don't get accepted + # by the virtualbox host process (see bug #438930) + find ExtensionPacks -type f -name "ExtPack.xml" -exec sed -i '/Version/s@_Gentoo@@' {} \+ || die + + local extensions_dir="${vbox_inst_path}/ExtensionPacks" + + if use vnc; then + insinto ${extensions_dir} + doins -r ExtensionPacks/VNC + fi + + if use dtrace; then + insinto ${extensions_dir} + doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack + fi + + if use doc; then + dodoc UserManual.pdf UserManual.q{ch,hc} + docompress -x /usr/share/doc/${PF} + fi + + if use python; then + local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.so" + if [[ ! -x "${python_path_ext}" ]]; then + eerror "Couldn't find ${python_path_ext}! Bindings were requested with USE=python" + eerror "but none were installed. This may happen if support for a Python target" + eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles." + die "Incomplete installation of Python bindings! File a bug with Gentoo!" + fi + fi + + newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf +} + +pkg_postinst() { + xdg_pkg_postinst + + if use udev; then + udev_reload + udevadm trigger --subsystem-match=usb + fi + + tmpfiles_process virtualbox-vboxusb.conf + + if use gui; 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 "https://download.virtualbox.org/virtualbox/${PV}/UserManual.pdf" + elog "" + + optfeature "Advanced networking setups" net-misc/bridge-utils sys-apps/usermode-utilities + optfeature "USB2, USB3, PXE boot, and VRDP support" app-emulation/virtualbox-extpack-oracle + optfeature "Guest additions ISO" app-emulation/virtualbox-additions + + if ! use udev; then + ewarn "Without USE=udev, USB devices will likely not work in ${PN}." + fi +} + +pkg_postrm() { + xdg_pkg_postrm + + use udev && udev_reload +} diff --git a/app-emulation/virtualbox/virtualbox-7.0.6.ebuild b/app-emulation/virtualbox/virtualbox-7.0.6.ebuild deleted file mode 100644 index e3ca516962d2..000000000000 --- a/app-emulation/virtualbox/virtualbox-7.0.6.ebuild +++ /dev/null @@ -1,721 +0,0 @@ -# Copyright 2022-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# To add a new Python here: -# 1. Patch src/libs/xpcom18a4/python/Makefile.kmk (copy the previous impl's logic) -# Do NOT skip this part. It'll end up silently not-building the Python extension -# or otherwise misbehaving if you do. -# -# 2. Then update PYTHON_COMPAT & set PYTHON_SINGLE_TARGET for testing w/ USE=python. -# -# May need to look at other distros (e.g. Arch Linux) to find patches for newer -# Python versions as upstream tends to lag. Upstream may have patches on their -# trunk branch but not release branch. -# -# See bug #785835, bug #856121. -PYTHON_COMPAT=( python3_{9..11} ) - -inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \ - python-single-r1 tmpfiles toolchain-funcs udev xdg - -MY_PN="VirtualBox" -MY_P=${MY_PN}-${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/${PV}/${MY_P}.tar.bz2 - https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-6.1.36.tar.bz2" -S="${WORKDIR}/${MY_PN}-${PV}" - -LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )" -SLOT="0/$(ver_cut 1-2)" -KEYWORDS="~amd64" -IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde vnc" - -unset WATCOM #856769 - -COMMON_DEPEND=" - ${PYTHON_DEPS} - acct-group/vboxusers - ~app-emulation/virtualbox-modules-${PV} - dev-libs/libtpms - dev-libs/libxml2 - dev-libs/openssl:0= - media-libs/libpng:0= - media-libs/libvpx:0= - net-misc/curl - sys-libs/zlib - dbus? ( sys-apps/dbus ) - gui? ( - dev-qt/qtcore:5 - dev-qt/qtdbus:5 - dev-qt/qtgui:5 - dev-qt/qthelp:5 - dev-qt/qtprintsupport:5 - dev-qt/qtwidgets:5 - dev-qt/qtx11extras:5 - dev-qt/qtxml:5 - x11-libs/libX11 - x11-libs/libXt - opengl? ( dev-qt/qtopengl:5 ) - ) - lvm? ( sys-fs/lvm2 ) - opengl? ( - media-libs/libglvnd[X] - media-libs/vulkan-loader - x11-libs/libX11 - x11-libs/libXt - ) - pam? ( sys-libs/pam ) - sdl? ( - media-libs/libsdl:0[X,video] - x11-libs/libX11 - x11-libs/libXcursor - x11-libs/libXt - ) - vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] ) - vde? ( net-misc/vde ) - vnc? ( >=net-libs/libvncserver-0.9.9 ) -" -# We're stuck on JDK (and JRE, I guess?) 1.8 because of need for wsimport -# with USE="vboxwebsrv java". Note that we have to put things in DEPEND, -# not (only, anyway) BDEPEND, as the eclass magic to set the environment variables -# based on *DEPEND doesn't work for BDEPEND at least right now. -# -# There's a comment in Config.kmk about it -# ("With Java 11 wsimport was removed, usually part of a separate install now.") -# but it needs more investigation. -# -# See bug #878299 to track this issue. -DEPEND=" - ${COMMON_DEPEND} - >=dev-libs/libxslt-1.1.19 - virtual/libcrypt:= - alsa? ( >=media-libs/alsa-lib-1.0.13 ) - gui? ( - x11-base/xorg-proto - x11-libs/libxcb:= - x11-libs/libXcursor - x11-libs/libXext - x11-libs/libXinerama - x11-libs/libXmu - x11-libs/libXrandr - ) - java? ( virtual/jdk:1.8 ) - opengl? ( - x11-base/xorg-proto - x11-libs/libXcursor - x11-libs/libXinerama - x11-libs/libXmu - x11-libs/libXrandr - virtual/glu - ) - sdl? ( x11-libs/libXinerama ) - pulseaudio? ( media-sound/pulseaudio ) - udev? ( >=virtual/udev-171 ) -" -RDEPEND=" - ${COMMON_DEPEND} - gui? ( x11-libs/libxcb:= ) - java? ( virtual/jre:1.8 ) -" -BDEPEND=" - ${PYTHON_DEPS} - app-arch/tar - >=dev-lang/yasm-0.6.2 - dev-libs/libIDL - dev-util/glslang - >=dev-util/kbuild-0.1.9998.3127 - sys-apps/which - sys-devel/bin86 - sys-libs/libcap - sys-power/iasl - virtual/pkgconfig - doc? ( - app-text/docbook-sgml-dtd:4.4 - app-text/docbook-xsl-ns-stylesheets - dev-texlive/texlive-basic - dev-texlive/texlive-latex - dev-texlive/texlive-latexrecommended - dev-texlive/texlive-latexextra - dev-texlive/texlive-fontsrecommended - dev-texlive/texlive-fontsextra - dev-qt/qthelp:5 - ) - gui? ( dev-qt/linguist-tools:5 ) - nls? ( dev-qt/linguist-tools:5 ) - java? ( virtual/jdk:1.8 ) -" - -QA_FLAGS_IGNORED=" - usr/lib64/virtualbox/VBoxDDR0.r0 - usr/lib64/virtualbox/VMMR0.r0 - usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0 - usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug -" - -QA_TEXTRELS=" - usr/lib64/virtualbox/VMMR0.r0 - usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0 -" - -QA_EXECSTACK=" - usr/lib64/virtualbox/iPxeBaseBin - usr/lib64/virtualbox/VMMR0.r0 - usr/lib64/virtualbox/VBoxDDR0.r0 - usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0 - usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug -" - -QA_WX_LOAD=" - usr/lib64/virtualbox/iPxeBaseBin -" - -QA_PRESTRIPPED=" - usr/lib64/virtualbox/VMMR0.r0 - usr/lib64/virtualbox/VBoxDDR0.r0 - usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0 -" - -REQUIRED_USE=" - java? ( sdk ) - python? ( sdk ) - vboxwebsrv? ( java ) - ${PYTHON_REQUIRED_USE} -" - -PATCHES=( - "${FILESDIR}"/${PN}-6.1.26-configure-include-qt5-path.patch # bug #805365 - - # This patch is needed to avoid automagic detection based on a hardcoded - # list of Pythons in configure. It's necessary but not sufficient - # (see the rest of the ebuild's logic for the remainder) to handle - # proper Python selection. - "${FILESDIR}"/${PN}-6.1.34-r3-python.patch - - # 865361 - "${FILESDIR}"/${PN}-6.1.36-fcf-protection.patch - - "${FILESDIR}"/${PN}-7.0.4-fix-compilation.patch - "${FILESDIR}"/${PN}-7.0.0-fix-compilation-clang.patch - "${FILESDIR}"/${PN}-7.0.0-python3_11.patch - - # Downloaded patchset - "${WORKDIR}"/virtualbox-patches-6.1.36/patches -) - -pkg_pretend() { - if ! use gui; then - einfo "No USE=\"gui\" selected, this build will not include any 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 - if ! use nls && use gui; then - einfo "USE=\"gui\" also selects USE=\"nls\". This build" - einfo "will have NLS support." - fi - - # 749273 - local d=${ROOT} - for i in usr "$(get_libdir)"; do - d="${d}/$i" - if [[ "$(stat -L -c "%g %u" "${d}")" != "0 0" ]]; then - die "${d} should be owned by root, VirtualBox will not start otherwise" - fi - done -} - -pkg_setup() { - java-pkg-opt-2_pkg_setup - python-single-r1_pkg_setup -} - -src_prepare() { - default - - # Only add nopie patch when we're on hardened - if gcc-specs-pie; then - eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch - fi - - # Remove shipped binaries (kBuild, yasm) and tools, see bug #232775 - rm -r kBuild/bin || die - # Remove everything in tools except kBuildUnits - find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || die - - # Disable things unused or split into separate ebuilds - sed -e "s@MY_LIBDIR@$(get_libdir)@" \ - "${FILESDIR}"/${PN}-5-localconfig > LocalConfig.kmk || die - - if ! use pch; then - # bug #753323 - printf '\n%s\n' "VBOX_WITHOUT_PRECOMPILED_HEADERS=1" \ - >> LocalConfig.kmk || die - fi - - # 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 - einfo "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 - - #856811 #864274 - # cannot filter out only one flag, some combinations of these flags produce buggy executables - for i in abm avx avx2 bmi bmi2 fma fma4 popcnt; do - append-cflags $(test-flags-CC -mno-$i) - append-cxxflags $(test-flags-CXX -mno-$i) - done - - # bug #843437 - cat >> LocalConfig.kmk <<-EOF || die - CXXFLAGS=${CXXFLAGS} - CFLAGS=${CFLAGS} - EOF - - if use sdl; then - echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die - fi - - #443830 - echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die - - # clang assembler chokes on comments starting with / - if tc-is-clang; then - sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die - fi - - # fix doc generation - echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die - # replace xhtml names with numeric equivalents - find doc/manual -name \*.xml -exec sed -i \ - -e 's/ /\ /g' \ - -e 's/–/\–/g' \ - -e 's/←/\←/g' \ - -e 's/→/\→/g' \ - -e 's/↔/\↔/g' {} \+ || die - - # 489208 - # Cannot patch the whole text, many translations. Use sed instead to replace the command - find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \ - 's/'[^&]*\(vboxdrv setup\|vboxconfig\)'/\'emerge -1 virtualbox-modules\'/' {} \+ || die - sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \ - src/VBox/Frontends/VirtualBox/src/main.cpp \ - src/VBox/VMM/VMMR3/VM.cpp || die - - # 890561 - echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die - - if ! use nls && ! use gui; then - cat >> LocalConfig.kmk <<-EOF || die - VBOX_WITH_NLS := - VBOX_WITH_MAIN_NLS := - VBOX_WITH_PUEL_NLS := - VBOX_WITH_VBOXMANAGE_NLS := - EOF - fi -} - -src_configure() { - tc-ld-disable-gold # bug #488176 - - tc-export AR CC CXX LD RANLIB - export HOST_CC="$(tc-getBUILD_CC)" - - local myconf=( - --with-gcc="$(tc-getCC)" - --with-g++="$(tc-getCXX)" - - --disable-kmods - - $(usev !alsa --disable-alsa) - $(usev !dbus --disable-dbus) - $(usev debug --build-debug) - $(usev !doc --disable-docs) - $(usev !java --disable-java) - $(usev !lvm --disable-devmapper) - $(usev !pulseaudio --disable-pulse) - $(usev !python --disable-python) - $(usev vboxwebsrv --enable-webservice) - $(usev vde --enable-vde) - $(usev vnc --enable-vnc) - ) - - if use gui || use sdl || use opengl; then - myconf+=( - $(usev !opengl --disable-opengl) - $(usev !gui --disable-qt) - $(usev !sdl --disable-sdl) - ) - else - myconf+=( - --build-headless - ) - fi - - if use amd64 && ! has_multilib_profile; then - myconf+=( --disable-vmmraw ) - fi - - # not an autoconf script - edo ./configure "${myconf[@]}" - - # Force usage of chosen Python implementation - # bug #856121, bug #785835 - sed -i \ - -e '/VBOX_WITH_PYTHON.*=/d' \ - -e '/VBOX_PATH_PYTHON_INC.*=/d' \ - -e '/VBOX_LIB_PYTHON.*=/d' \ - AutoConfig.kmk || die - - cat >> AutoConfig.kmk <<-EOF || die - VBOX_WITH_PYTHON=$(usev python 1) - VBOX_PATH_PYTHON_INC=$(python_get_includedir) - VBOX_LIB_PYTHON=$(python_get_library_path) - EOF - - if use python; then - local mangled_python="${EPYTHON#python}" - mangled_python="${mangled_python/.}" - - # Stub out the script which defines what the Makefile ends up - # building for. gen_python_deps.py gets called by the Makefile - # with some args and it spits out a bunch of paths for a hardcoded - # list of Pythons. We just override it with what we're actually using. - # This minimises the amount of patching we have to do for new Pythons. - cat > src/libs/xpcom18a4/python/gen_python_deps.py <<-EOF || die - print("VBOX_PYTHON${mangled_python}_INC=$(python_get_includedir)") - print("VBOX_PYTHON${mangled_python}_LIB=$(python_get_library_path)") - print("VBOX_PYTHONDEF_INC=$(python_get_includedir)") - print("VBOX_PYTHONDEF_LIB=$(python_get_library_path)") - EOF - - chmod +x src/libs/xpcom18a4/python/gen_python_deps.py || die - fi -} - -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}" - - local myemakeargs=( - VBOX_BUILD_PUBLISHER=_Gentoo - VBOX_WITH_VBOXIMGMOUNT=1 - - KBUILD_VERBOSE=2 - - AS="$(tc-getCC)" - CC="$(tc-getCC)" - CXX="$(tc-getCXX)" - - TOOL_GCC3_CC="$(tc-getCC)" - TOOL_GCC3_LD="$(tc-getCC)" - TOOL_GCC3_AS="$(tc-getCC)" - TOOL_GCC3_AR="$(tc-getAR)" - TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)" - - TOOL_GXX3_CC="$(tc-getCC)" - TOOL_GXX3_CXX="$(tc-getCXX)" - TOOL_GXX3_LD="$(tc-getCXX)" - TOOL_GXX3_AS="$(tc-getCXX)" - TOOL_GXX3_AR="$(tc-getAR)" - TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)" - - TOOL_GCC3_CFLAGS="${CFLAGS}" - TOOL_GCC3_CXXFLAGS="${CXXFLAGS}" - VBOX_GCC_OPT="${CXXFLAGS}" - VBOX_NM="$(tc-getNM)" - - TOOL_YASM_AS=yasm - ) - - if use amd64 && has_multilib_profile; then - myemakeargs+=( - CC32="$(tc-getCC) -m32" - CXX32="$(tc-getCXX) -m32" - - TOOL_GCC32_CC="$(tc-getCC) -m32" - TOOL_GCC32_CXX="$(tc-getCXX) -m32" - TOOL_GCC32_LD="$(tc-getCC) -m32" - TOOL_GCC32_AS="$(tc-getCC) -m32" - TOOL_GCC32_AR="$(tc-getAR)" - TOOL_GCC32_OBJCOPY="$(tc-getOBJCOPY)" - - TOOL_GXX32_CC="$(tc-getCC) -m32" - TOOL_GXX32_CXX="$(tc-getCXX) -m32" - TOOL_GXX32_LD="$(tc-getCXX) -m32" - TOOL_GXX32_AS="$(tc-getCXX) -m32" - TOOL_GXX32_AR="$(tc-getAR)" - TOOL_GXX32_OBJCOPY="$(tc-getOBJCOPY)" - ) - fi - - MAKE="kmk" emake "${myemakeargs[@]}" all -} - -src_install() { - cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die - - local vbox_inst_path="/usr/$(get_libdir)/${PN}" each size ico icofile - - vbox_inst() { - local binary="${1}" - local perms="${2:-0750}" - local path="${3:-${vbox_inst_path}}" - - [[ -n "${binary}" ]] || die "vbox_inst: No binary 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-6-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 - - for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,VMMPreload,XPCOMIPCD} \ - vboximg-mount vbox-img *so *r0; 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) - for each in VBoxEFI{32,64}.fd ; do - vbox_inst ${each} 0644 - done - - # 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{autostart,balloonctrl,bugreport,headless,manage} \ - VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do - dosym ${vbox_inst_path}/VBox /usr/bin/${each} - done - dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount - dosym ${vbox_inst_path}/vbox-img /usr/bin/vbox-img - - 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 sdl; 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 - fi - - if use gui; then - vbox_inst VirtualBox - vbox_inst VirtualBoxVM 4750 - for each in VirtualBox{,VM} ; do - pax-mark -m "${ED}"${vbox_inst_path}/${each} - done - - if use opengl; then - vbox_inst VBoxTestOGL - pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL - fi - - for each in virtualbox{,vm} VirtualBox{,VM} ; do - dosym ${vbox_inst_path}/VBox /usr/bin/${each} - done - - insinto /usr/share/${PN} - doins -r nls - doins -r UnattendedTemplates - - domenu ${PN}.desktop - - 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 - local udevdir="$(get_udevdir)" - local udev_file="VBoxCreateUSBNode.sh" - local rules_file="10-virtualbox.rules" - - insinto ${udevdir} - doins ${udev_file} - fowners root:vboxusers ${udevdir}/${udev_file} - fperms 0750 ${udevdir}/${udev_file} - - insinto ${udevdir}/rules.d - sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \ - > "${T}"/${rules_file} || die - doins "${T}"/${rules_file} - 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 - - # Remove dead symlinks (bug #715338) - find "${ED}"/usr/$(get_libdir)/${PN} -xtype l -delete || die - - # Fix version string in extensions or else they don't get accepted - # by the virtualbox host process (see bug #438930) - find ExtensionPacks -type f -name "ExtPack.xml" -exec sed -i '/Version/s@_Gentoo@@' {} \+ || die - - local extensions_dir="${vbox_inst_path}/ExtensionPacks" - - if use vnc; then - insinto ${extensions_dir} - doins -r ExtensionPacks/VNC - fi - - if use dtrace; then - insinto ${extensions_dir} - doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack - fi - - if use doc; then - dodoc UserManual.pdf - docompress -x /usr/share/doc/${PF}/qt - docinto qt - dodoc UserManual.q{ch,hc} - fi - - if use python; then - local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.so" - if [[ ! -x "${python_path_ext}" ]]; then - eerror "Couldn't find ${python_path_ext}! Bindings were requested with USE=python" - eerror "but none were installed. This may happen if support for a Python target" - eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles." - die "Incomplete installation of Python bindings! File a bug with Gentoo!" - fi - fi - - newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf -} - -pkg_postinst() { - xdg_pkg_postinst - - if use udev; then - udev_reload - udevadm trigger --subsystem-match=usb - fi - - tmpfiles_process virtualbox-vboxusb.conf - - if use gui; 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 "https://download.virtualbox.org/virtualbox/${PV}/UserManual.pdf" - elog "" - - optfeature "Advanced networking setups" net-misc/bridge-utils sys-apps/usermode-utilities - optfeature "USB2, USB3, PXE boot, and VRDP support" app-emulation/virtualbox-extpack-oracle - optfeature "Guest additions ISO" app-emulation/virtualbox-additions - - if ! use udev; then - ewarn "Without USE=udev, USB devices will likely not work in ${PN}." - fi -} - -pkg_postrm() { - xdg_pkg_postrm - - use udev && udev_reload -} -- cgit v1.2.3