summaryrefslogtreecommitdiff
path: root/app-emulation/virtualbox
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-01-25 16:43:49 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-01-25 16:43:49 +0000
commitfe641adc6a5e3f54d9c6b8b3521afb17d49f7185 (patch)
treec72513aa058c2e4192ab63b06bfdd1c71e3e75b4 /app-emulation/virtualbox
parent5d88bb472ef4d6659a423746d4f8717e55ffaaf5 (diff)
gentoo auto-resync : 25:01:2024 - 16:43:49
Diffstat (limited to 'app-emulation/virtualbox')
-rw-r--r--app-emulation/virtualbox/Manifest5
-rw-r--r--app-emulation/virtualbox/virtualbox-6.1.46.ebuild675
-rw-r--r--app-emulation/virtualbox/virtualbox-7.0.10-r1.ebuild755
-rw-r--r--app-emulation/virtualbox/virtualbox-7.0.10.ebuild735
4 files changed, 0 insertions, 2170 deletions
diff --git a/app-emulation/virtualbox/Manifest b/app-emulation/virtualbox/Manifest
index 985653715fad..dd67de0cd5ce 100644
--- a/app-emulation/virtualbox/Manifest
+++ b/app-emulation/virtualbox/Manifest
@@ -19,10 +19,8 @@ AUX virtualbox-7.0.8-mtune-keep-size.patch 401 BLAKE2B 8c4691d9b60030cdaa48e53be
AUX virtualbox-7.0.9-python.patch 983 BLAKE2B ef9f83cb1447789d189b1eaaafe461ea7954b1326cb15e3093abfc85020dc5699eff009c75fa10ab9fa3d7b999a5deb4a081059a79c19338b4691f5e9dcd577e SHA512 bedae8ec051697f029c3ac9af70ad9e20e120e022779c6d2ce33f3cd10041e460b83c106e381a654e352f0dbdcf7c074868a59e79e99008336442a13b96007f7
AUX virtualbox-ose-6-wrapper 3578 BLAKE2B c150e578212435268de3c5fb0eea701bc843ec2241dc3839d3d1e33604fc01f6bdff6ed0425ba6917072f652b8c29d0df9a550a92900ca13306fcd36521afbee SHA512 315d981f3e92f2e0134946f6bbb8ad4ea4228afb8f73aaed7feead59b3f55cef01cec4285a7fdaf30ce0931d8b69bda4698baebd63d11f2cd9dfe9d0591a0f40
AUX virtualbox-vboxusb_tmpfilesd 35 BLAKE2B 56937e236a0e4d1a2aa085271e8ae0af9553fdf7c3b804af4d3fda3aa8dbc32d63762fee90bc949390cb9cd67f2f0111894c8af084731dab6920ae1675c69a64 SHA512 72e4602f5f214f8833486f5c787c263a10390e8bdf65b5615d67c35ec44048f02add12fe43b19f9c57a9d2f12d768c52e54fcfb9052c0611d06cc988a698c171
-DIST VirtualBox-6.1.46.tar.bz2 166045588 BLAKE2B 041fad30d7cbe524cfd5c865b225c00df7715a6648ed0d8f7ee3ca4be0d0dabcb324c676ba2ea78288cde89ed8e5412fae75e31bb49f623de2acddb8f10d6ee1 SHA512 695ca4d41ff10d0581e4cffe4a0ec80e0fe380f4c7d5d51ee4d21aeb61646c26edd60301e541894e71c3323e2d7207e23299938c18ee45631afd1e0851946e77
DIST VirtualBox-6.1.48.tar.bz2 165960987 BLAKE2B c981e390ae518b829970827f6032fb19a93685fb58835a9d489c6e14cc60a5c14c65b0a3da5adae7818e73e1b0e558e8fa803160cb67847f18565bb78d656e97 SHA512 fff759f3871e4e8962536002f2bc13e5150a927e280493f5cb0abf06466ce66e45f4c6ef43489b5b3ed8682d8a3ac0eb6fb3dd7c4144924c81612553ec71a95f
DIST VirtualBox-6.1.50.tar.bz2 165959648 BLAKE2B e244c4fa2ffe86216664104473e27e8ddbad86aae3bc26612d18204a4e67cece91d1fa3aa9e70f1c39f915bf5e4a1e6a14bbb19162c3ae2ff554373df95bce51 SHA512 ee2ec352e020f07262bf2120278d0d9807c501cd7c4d621d4e12ce18a821b134d48eb852bc7136008cfa77ed709703d3c2835b7a7177c325d989e8f433aff73f
-DIST VirtualBox-7.0.10.tar.bz2 175450841 BLAKE2B 49eaa14f716f021f1ecec1ad48a2aa8a3a758cbd9b03cf30d65ddcf5aba11842b0ea8bc2c4d477084a4cea318dc302a4ed426ec9f675a1fe675c5f18c48796c7 SHA512 2870d39385f66557281edf1368db68cd69d6a9bebc30d52511929462d0ac210cec49dd8531a280c6facff22ba6e4808477fbf3d09abf998d863a007fc7f2c3bd
DIST VirtualBox-7.0.12.tar.bz2 175644088 BLAKE2B 507cbf7b1a8a807bd2602e74bc19a59cb177b9b2bdefa1be582e520666360a42510ca501f20c354746a0f1dadf61fe29135e3edc867e611bfe60a9405cb2bbce SHA512 9fe4511442eba788d02f932f5e98cfcc5aa4ebed41c00bd7333cf7e3f5de787e458f1f56930978283f041f403652c803143335fe9120ab63a2c113ca7b3f588f
DIST VirtualBox-7.0.14.tar.bz2 175654864 BLAKE2B 99f4942b864ce481d69983af31393d763452c5b55697ab642b43c155f5fbc2a9963fbe1b7744baef620d0b351e1ac73c1ef978698b9a7e77897bb9cbc18dc17c SHA512 6a82933bbf51ff255d17cb61ae6ddfb791a2200e3dff705f181cd06c6031b48cf15faa5e8202a65daef0fb20b7fd9e33d40dbd0f9cc3f49af49fff04a1cb0a73
DIST virtualbox-help-7.0.10.tar.xz 3941196 BLAKE2B fa6667e0cf12e2e05b896a7d9d7e1f78d43bb4618f35b3c81f5ccf5f227d1181b0c8fb1f6dc02a8619550b193a73d4094c5d3f0d43514392f9ed563085068789 SHA512 fab2dff812a438f3e78dbace24741d91b317bbbc7362f082a18f3871e3c6fd8af7744cf1b3fd3b82cf5135e03d521de05a7a5bc98ec19aacfa1b4e5392e60f30
@@ -31,11 +29,8 @@ DIST virtualbox-help-7.0.14.tar.xz 3944832 BLAKE2B 95079e4da8c960c41cee799142779
DIST virtualbox-patches-6.1.36.tar.bz2 2733 BLAKE2B dcfebfeca4873d382441515d48b4dfee9343bc7c83ea3cbb5002dbf7975143a79fae9a701b67dc35505e9ca03ff1b6293cb7c3279c4fdfda8ad21ba5fb9b7e87 SHA512 1bed5cdefbf8e7c4b0d9092ba4961ecf2262f27f35c71a91ef6f2e8fe8a1d92ed74f06bafbf58d70ba7165d933997f58073f4d4f4051e3ba5c0339b729066f57
DIST virtualbox-patches-7.0.10_pre20230615.tar.bz2 2253 BLAKE2B 27b422acc2ae85c4324d6f4471db80c9f680b1c4a00223c38b9e3fb31709b05163a1bd53408cffeabdef295e856aa8b01b86e0fecf5d80ace376ea1bd4fc9504 SHA512 c2177f46048f09b6be9ac2c35b43d74f67350b052411cc64adf6c0b3d284055eef79f960f1384a3aaeee7d25f8c19ea8f936ee2623a2251d1d28f85ed3469c22
DIST virtualbox-patches-7.0.8.tar.bz2 2733 BLAKE2B 044dfe02a5bd5e757091318b394b0e5918677b5bbce9caef4a18d4d8df54821559f0df6ffbdd6f52d4934bc4018e9c9d908571c5d3d8804fd3b0f22a7a1aed84 SHA512 93a06aa3f9508d3a8743ca8494a958159b5bc3fd7a0a08ff23414d05c4f31084cf0f1c82a3866e222c83e6996ba004546f0bd33c6eb9a90eec8e548b8b3f2fbf
-EBUILD virtualbox-6.1.46.ebuild 18889 BLAKE2B c5f1581bfd3bc644e5e16e2d3f1564e1cd99fa8b6a07850b0bbd17d07aba9669af284e3943b01e6698312f11ddf6c9a81ee40585dfe35c4bf57cfd00561ec65a SHA512 65998c5cd4ef20993571805c7f3108858cd88a99b008c39ef051fb78aa67579cb4a0dd7181c7d1b330ad871fd7d6003ab85b4974b094904a1cb51b9c05372355
EBUILD virtualbox-6.1.48.ebuild 18889 BLAKE2B c5f1581bfd3bc644e5e16e2d3f1564e1cd99fa8b6a07850b0bbd17d07aba9669af284e3943b01e6698312f11ddf6c9a81ee40585dfe35c4bf57cfd00561ec65a SHA512 65998c5cd4ef20993571805c7f3108858cd88a99b008c39ef051fb78aa67579cb4a0dd7181c7d1b330ad871fd7d6003ab85b4974b094904a1cb51b9c05372355
EBUILD virtualbox-6.1.50.ebuild 18925 BLAKE2B 38ec84815df94fd099e2c0a0f52a54a0a2f667aff6d290c4eccb88d32e89cf5c848d84d8ca8c691c42d4aba37b60b1d5af23e4a62e3234a20ef6fb4d9fc0d42d SHA512 753731dbad50658e1ec1b262f3cec636de714f79d4d5ef383c68e1483d0ec6fb8ad11f967b67f60286497fa1337f8f6d0c4688135ef3824a315e9bfe92d6026c
-EBUILD virtualbox-7.0.10-r1.ebuild 21462 BLAKE2B 1dda0dd7bff1ce148586f14f4d2069fc8729d903a24dcd1c93afbee3df75679d4ec70f1d0d0c04bd02ceba133633fb89b49874907e4f949e4d6c39cbc109ad27 SHA512 8f889deffae5eb9e4b07bd33bc1413fa2071c2a150943a7315bff698fef92909c441de40f334a7e725779a3aed0103ac1508dca18d5b2302c5fb1bbc71a01804
-EBUILD virtualbox-7.0.10.ebuild 20659 BLAKE2B cfc13aace3c935d1e4258142ae66427c9f967f81271a9f7d3b5a1743da0840459faf8a3a6c0e4bef348282bd40f996e651bce896f0f68ba4df08156f848eba7d SHA512 49c1389d64e905c3d553390cc9b6f555716b09dfcfbbe5ea0ee3d8f981b4dd06e6b7e9aeb51a68d38ee484a09575ccb2f6de7a72f13e70ecda5e8167d4c74c68
EBUILD virtualbox-7.0.12.ebuild 21490 BLAKE2B e8494f1019837f31bf8b8781f8cd13c2ba692f83a1ac292234ba53d417a633f5485d3d4e276d9c662cd5e68d6dcc0ccabedcd4abcd5310e817a1a628dfc46556 SHA512 37c26a96169ce961d9395fb0d8bd1603579b0c2e92c1428f2353fabba65df181d3199dad52f4727cd9647f7af2a395e18dd01d28eecc4dc3f3fc1a620451ee5b
EBUILD virtualbox-7.0.14.ebuild 21498 BLAKE2B a05056a4e40d0667a9c7390574de8667946ce5187e62b131f19de4ea20aef73e51180ffce12867ca0b509435cba003b1d2541bdd829916af06f590d329776256 SHA512 70137e17a2440afed38ba83aba551175225113327a67b76ed9a0f33b3df4dd8cc7412dd13f1b2073ce1abe35a83bc6800ee6fc10d00915e818025bd63117ddbc
EBUILD virtualbox-9999.ebuild 22109 BLAKE2B b10e03e8bcf3425d1497e4a01f87836924c63d3da968405d8641c19ade806bca9d2ab46c7efacb13939180fce35eda8c5f03d4b8b65653a7572d60b30ad34c16 SHA512 92b040f8b997290c85b38325314faba820af3456cd55be63f819f9cbaeb5994b125182e45cc1382fe97d392a7be163b813eb03f737ccef20be610467a90b7198
diff --git a/app-emulation/virtualbox/virtualbox-6.1.46.ebuild b/app-emulation/virtualbox/virtualbox-6.1.46.ebuild
deleted file mode 100644
index 3f35d8fb474f..000000000000
--- a/app-emulation/virtualbox/virtualbox-6.1.46.ebuild
+++ /dev/null
@@ -1,675 +0,0 @@
-# Copyright 2022-2024 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_{10..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 dtrace? ( CDDL )"
-SLOT="0/$(ver_cut 1-2)"
-KEYWORDS="amd64"
-IUSE="alsa debug doc dtrace headless java lvm +opus pam pax-kernel pch pulseaudio +opengl python +qt5 +sdk +sdl +udev vboxwebsrv vnc"
-
-unset WATCOM #856769
-
-COMMON_DEPEND="
- ${PYTHON_DEPS}
- acct-group/vboxusers
- ~app-emulation/virtualbox-modules-${PV}
- >=dev-libs/libxslt-1.1.19
- net-misc/curl
- dev-libs/libxml2
- media-libs/libpng:0=
- media-libs/libvpx:0=
- sys-libs/zlib:=
- !headless? (
- sdl? ( media-libs/libsdl:0[X,video] )
- x11-base/xorg-proto
- x11-libs/libX11
- x11-libs/libxcb:=
- x11-libs/libXcursor
- x11-libs/libXext
- x11-libs/libXmu
- x11-libs/libXt
- opengl? (
- media-libs/libglvnd[X]
- virtual/glu
- )
- 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
- )
- )
- dev-libs/openssl:0=
- virtual/libcrypt:=
- lvm? ( sys-fs/lvm2 )
- opus? ( media-libs/opus )
- udev? ( >=virtual/udev-171 )
- vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] )
- 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}
- alsa? ( >=media-libs/alsa-lib-1.0.13 )
- !headless? (
- x11-libs/libXinerama
- x11-libs/libXrandr
- opengl? ( virtual/opengl )
- )
- java? ( virtual/jdk:1.8 )
- pam? ( sys-libs/pam )
- pax-kernel? ( sys-apps/elfix )
- pulseaudio? ( media-libs/libpulse )
-"
-BDEPEND="
- ${PYTHON_DEPS}
- >=app-arch/tar-1.34-r2
- >=dev-build/kbuild-0.1.9998.3127
- <=dev-build/kbuild-0.1.9998.3500
- >=dev-lang/yasm-0.6.2
- dev-libs/libIDL
- sys-apps/which
- sys-devel/bin86
- sys-libs/libcap
- sys-power/iasl
- virtual/pkgconfig
- 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
- )
- java? ( virtual/jdk:1.8 )
- qt5? ( dev-qt/linguist-tools:5 )
-"
-RDEPEND="
- ${COMMON_DEPEND}
- java? ( virtual/jre: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
-
- # 906309
- "${FILESDIR}"/${PN}-6.1.44-fix-libxml2.patch
-
- # Downloaded patchset
- "${WORKDIR}"/virtualbox-patches-6.1.36/patches
-)
-
-pkg_pretend() {
- 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
-
- # 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), see bug #232775
- rm -r kBuild/bin tools || die
-
- # Replace pointless GCC version check with something more sensible.
- # This is needed for the qt5 version check.
- sed -e 's@^check_gcc$@cc_maj="$(${CC} -dumpversion | cut -d. -f1)" ; cc_min="$(${CC} -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
-
- 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
-
- # 890561
- echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
-}
-
-src_configure() {
- tc-ld-disable-gold # bug #488176
-
- #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
-
- # replace xhtml names with numeric equivalents
- find doc/manual -name \*.xml -exec sed -i \
- -e 's/&nbsp;/\&#160;/g' \
- -e 's/&ndash;/\&#8211;/g' \
- -e 's/&larr;/\&#8592;/g' \
- -e 's/&rarr;/\&#8594;/g' \
- -e 's/&harr;/\&#8596;/g' {} \+ || die
-
- tc-export AR CC CXX LD RANLIB
- export HOST_CC="$(tc-getBUILD_CC)"
-
- local myconf=(
- --with-gcc="$(tc-getCC)"
- --with-g++="$(tc-getCXX)"
-
- --disable-dbus
- --disable-kmods
-
- $(usev !alsa --disable-alsa)
- $(usev debug --build-debug)
- $(usev !doc --disable-docs)
- $(usev !java --disable-java)
- $(usev !lvm --disable-devmapper)
- $(usev !opus --disable-libopus)
- $(usev !pulseaudio --disable-pulse)
- $(usev !python --disable-python)
- $(usev vboxwebsrv --enable-webservice)
- $(usev vnc --enable-vnc)
- )
-
- if ! use headless ; then
- myconf+=(
- $(usev !opengl --disable-opengl)
- $(usev !qt5 --disable-qt)
- $(usev !sdl --disable-sdl)
- )
- else
- myconf+=(
- --build-headless
- --disable-opengl
- )
- fi
-
- if use amd64 && ! has_multilib_profile ; then
- myconf+=( --disable-vmmraw )
- fi
-
- # bug #843437
- cat >> LocalConfig.kmk <<-EOF || die
- CXXFLAGS=${CXXFLAGS}
- CFLAGS=${CFLAGS}
- EOF
-
- # 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,Tunctl,VMMPreload,XPCOMIPCD} \
- vboximg-mount *so *r0 iPxeBaseBin ; 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}/VBoxTunctl /usr/bin/VBoxTunctl
- dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount
-
- 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 rdesktop-vrdp
- 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 qt5 ; 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
- 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
- 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
- fi
-
- if use python ; then
- local mangled_python="${EPYTHON#python}"
- mangled_python="${mangled_python/./_}"
-
- local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython${mangled_python}.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 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 "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.10-r1.ebuild b/app-emulation/virtualbox/virtualbox-7.0.10-r1.ebuild
deleted file mode 100644
index 563fb976bf00..000000000000
--- a/app-emulation/virtualbox/virtualbox-7.0.10-r1.ebuild
+++ /dev/null
@@ -1,755 +0,0 @@
-# Copyright 2022-2024 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_{10..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-7.0.8.tar.bz2
- gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${PN}-help-${PV}.tar.xz ) )
-"
-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/libsdl2[X,video]
- x11-libs/libX11
- x11-libs/libXcursor
- x11-libs/libXt
- )
- vboxwebsrv? ( net-libs/gsoap[-gnutls(-),debug?] )
- 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-libs/libpulse )
- udev? ( >=virtual/udev-171 )
-"
-RDEPEND="
- ${COMMON_DEPEND}
- gui? ( x11-libs/libxcb:= )
- java? ( virtual/jre:1.8 )
-"
-BDEPEND="
- ${PYTHON_DEPS}
- >=app-arch/tar-1.34-r2
- >=dev-lang/yasm-0.6.2
- dev-libs/libIDL
- dev-util/glslang
- >=dev-build/kbuild-0.1.9998.3592
- 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.0-fix-compilation-clang.patch
- "${FILESDIR}"/${PN}-7.0.10-python.patch
- "${FILESDIR}"/${PN}-7.0.6-gcc-13.patch
- "${FILESDIR}"/${PN}-7.0.8-mtune-keep-size.patch
- "${FILESDIR}"/${PN}-7.0.6-fix-libxml2.patch
- # 913109
- "${FILESDIR}"/${PN}-7.0.10-fix-binutils-hardened.patch
-
- # Downloaded patchset
- "${WORKDIR}"/virtualbox-patches-7.0.8/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
- echo -e "\nIPRT_WITHOUT_PAM=1" >> LocalConfig.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
- sed -i 's/sdl-config/sdl2-config/' configure || die
- echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
- fi
-
- #443830
- echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die
-
- if tc-is-clang; then
- # clang assembler chokes on comments starting with /
- sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
-
- # clang does not support this extension
- eapply "${FILESDIR}"/${PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
- 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/&nbsp;/\&#160;/g' \
- -e 's/&ndash;/\&#8211;/g' \
- -e 's/&larr;/\&#8592;/g' \
- -e 's/&rarr;/\&#8594;/g' \
- -e 's/&harr;/\&#8596;/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/&apos;[^&]*\(vboxdrv setup\|vboxconfig\)&apos;/\&apos;emerge -1 virtualbox-modules\&apos;/' {} \+ || 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 "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
- # environment variables used during SDK binding installation
- echo "VBOX_SDK_PATH=${vbox_inst_path}/sdk" >> "${T}/90virtualbox"
- echo "VBOX_INSTALL_PATH=${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}
- elif use gui; then
- dodoc "${WORKDIR}"/${PN}-help-${PV}/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
-
- # 378871
- local installer_dir="${ED}/usr/$(get_libdir)/virtualbox/sdk/installer"
- pushd "${installer_dir}" &> /dev/null || die
- sed -e "s;%VBOX_INSTALL_PATH%;${vbox_inst_path};" \
- -e "s;%VBOX_SDK_PATH%;${vbox_inst_path}/sdk;" \
- -i vboxapi/__init__.py || die
- # insert shebang, the files come without one
- find vboxapi -name \*.py -exec sed -e "1 i\#! ${PYTHON}" -i {} \+ || die
- python_domodule vboxapi
- popd &> /dev/null || die
- python_doscript vboxshell.py
-
- # do not install the installer
- rm -r "${installer_dir}" || die
- 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.10.ebuild b/app-emulation/virtualbox/virtualbox-7.0.10.ebuild
deleted file mode 100644
index a97af1370fb6..000000000000
--- a/app-emulation/virtualbox/virtualbox-7.0.10.ebuild
+++ /dev/null
@@ -1,735 +0,0 @@
-# Copyright 2022-2024 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_{10..12} )
-
-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-7.0.8.tar.bz2
- gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${PN}-help-${PV}.tar.xz ) )
-"
-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/libsdl2[X,video]
- x11-libs/libX11
- x11-libs/libXcursor
- x11-libs/libXt
- )
- vboxwebsrv? ( net-libs/gsoap[-gnutls(-),debug?] )
- 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-libs/libpulse )
- udev? ( >=virtual/udev-171 )
-"
-RDEPEND="
- ${COMMON_DEPEND}
- gui? ( x11-libs/libxcb:= )
- java? ( virtual/jre:1.8 )
-"
-BDEPEND="
- ${PYTHON_DEPS}
- >=app-arch/tar-1.34-r2
- >=dev-lang/yasm-0.6.2
- dev-libs/libIDL
- dev-util/glslang
- >=dev-build/kbuild-0.1.9998.3592
- 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.0-fix-compilation-clang.patch
- "${FILESDIR}"/${PN}-7.0.10-python.patch
- "${FILESDIR}"/${PN}-7.0.6-gcc-13.patch
- "${FILESDIR}"/${PN}-7.0.8-mtune-keep-size.patch
- "${FILESDIR}"/${PN}-7.0.6-fix-libxml2.patch
-
- # Downloaded patchset
- "${WORKDIR}"/virtualbox-patches-7.0.8/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
- echo -e "\nIPRT_WITHOUT_PAM=1" >> LocalConfig.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
- sed -i 's/sdl-config/sdl2-config/' configure || die
- echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
- fi
-
- #443830
- echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die
-
- if tc-is-clang; then
- # clang assembler chokes on comments starting with /
- sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
-
- # clang does not support this extension
- eapply "${FILESDIR}"/${PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
- 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/&nbsp;/\&#160;/g' \
- -e 's/&ndash;/\&#8211;/g' \
- -e 's/&larr;/\&#8592;/g' \
- -e 's/&rarr;/\&#8594;/g' \
- -e 's/&harr;/\&#8596;/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/&apos;[^&]*\(vboxdrv setup\|vboxconfig\)&apos;/\&apos;emerge -1 virtualbox-modules\&apos;/' {} \+ || 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}
- elif use gui; then
- dodoc "${WORKDIR}"/${PN}-help-${PV}/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
-}