summaryrefslogtreecommitdiff
path: root/app-emulation
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/86Box/86Box-4.1.ebuild84
-rw-r--r--app-emulation/86Box/Manifest2
-rw-r--r--app-emulation/Manifest.gzbin15306 -> 15314 bytes
-rw-r--r--app-emulation/fs-uae-launcher/Manifest4
-rw-r--r--app-emulation/fs-uae-launcher/fs-uae-launcher-3.1.70.ebuild (renamed from app-emulation/fs-uae-launcher/fs-uae-launcher-3.1.68.ebuild)16
-rw-r--r--app-emulation/virtualbox-kvm/Manifest5
-rw-r--r--app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240307.ebuild768
-rw-r--r--app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild62
8 files changed, 901 insertions, 40 deletions
diff --git a/app-emulation/86Box/86Box-4.1.ebuild b/app-emulation/86Box/86Box-4.1.ebuild
new file mode 100644
index 000000000000..7937fddca15e
--- /dev/null
+++ b/app-emulation/86Box/86Box-4.1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake flag-o-matic
+
+DESCRIPTION="Emulator of x86-based machines based on PCem"
+HOMEPAGE="https://github.com/86Box/86Box"
+SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="dinput experimental +fluidsynth +munt new-dynarec +openal qt5 +qt6 +threads"
+
+DEPEND="
+ app-emulation/faudio
+ dev-libs/libevdev
+ media-libs/freetype:2=
+ media-libs/libpng:=
+ media-libs/libsdl2
+ media-libs/openal
+ media-libs/rtmidi
+ net-libs/libslirp
+ sys-libs/zlib
+ qt5? ( x11-libs/libXi )
+ qt6? ( x11-libs/libXi )
+"
+
+RDEPEND="
+ ${DEPEND}
+ fluidsynth? ( media-sound/fluidsynth )
+ munt? ( media-libs/munt-mt32emu )
+ openal? ( media-libs/openal )
+ qt5? (
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5
+ dev-qt/qtopengl:5
+ dev-qt/qttranslations:5
+ dev-qt/qtwidgets:5
+ kde-frameworks/extra-cmake-modules
+ )
+ qt6? (
+ dev-qt/qtbase:6[gui,network,opengl,widgets]
+ dev-qt/qttranslations:6
+ kde-frameworks/extra-cmake-modules
+ )
+"
+
+BDEPEND="virtual/pkgconfig"
+
+src_configure() {
+ # LTO needs to be filtered
+ # See https://bugs.gentoo.org/854507
+ filter-lto
+ append-flags -fno-strict-aliasing
+
+ local mycmakeargs=(
+ -DCPPTHREADS="$(usex threads)"
+ -DDEV_BRANCH="$(usex experimental)"
+ -DDINPUT="$(usex dinput)"
+ -DDYNAREC="ON"
+ -DMUNT_EXTERNAL="$(usex munt)"
+ -DFLUIDSYNTH="$(usex fluidsynth)"
+ -DMINITRACE="OFF"
+ -DMUNT="$(usex munt)"
+ -DNEW_DYNAREC="$(usex new-dynarec)"
+ -DOPENAL="$(usex openal)"
+ -DPREFER_STATIC="OFF"
+ -DRTMIDI="ON"
+ -DQT="$(usex qt5 'ON' $(usex qt6))"
+ -DRELEASE="ON"
+ -DUSE_QT6="$(usex qt6)"
+ )
+
+ cmake_src_configure
+}
+
+pkg_postinst() {
+ elog "In order to use 86Box, you will need some roms for various emulated systems."
+ elog "See https://github.com/86Box/roms for more information."
+}
diff --git a/app-emulation/86Box/Manifest b/app-emulation/86Box/Manifest
index e5ce8caf4d09..659bd09588e5 100644
--- a/app-emulation/86Box/Manifest
+++ b/app-emulation/86Box/Manifest
@@ -1,4 +1,6 @@
AUX 86Box-4.0.1-incompatible-pointer-types.patch 826 BLAKE2B 79080877c25dc1292e743a03225ec95994284d7999443da91e81f492dc2c7e8d7e2987304fbb21b62c3cb6406a175c90f821963822db609436cf10fee36077e3 SHA512 270960bfad2b99b0c4c8d7e3b889f0601490ed780c5ddde619efdb57bdf6d20309e079b77a986625a7824bbc5dce47199a1534be0bef0b9448221ff52cab5457
DIST 86Box-4.0.1.tar.gz 5206128 BLAKE2B 56a4d374757eb67368bbc5782bceca3f4dec79dd36fad6698065a86c3937238b352425dd856169a1a65a42a4f60f1a68b099ece4a7c019be4229d61fabfc444a SHA512 b06a8c50558276f35f98795e0513b5bd39eed3a0d3a8d61bf79b373501cd823ab3ab12fb943e879a240292bca39c507a1a42b1b6f3f9ae596499b685a03acf98
+DIST 86Box-4.1.tar.gz 5367654 BLAKE2B d7bbe2ba203a866d6be3ebbc64531da38eb820cfb313837acb0ddf6bc6e93b25501bea1eb3c4a4f61f2383590ac35b7525c3643da6b9d246ae6e73e04e928f5f SHA512 bfc1267b333dd738e5935b0c6b9eec3d84863bda22ba52d4d51e59e72f6bcaa78b6e9c656699eef3c3e436072b18c32d11f8d57a5bb578fc0334430fbdb48b35
EBUILD 86Box-4.0.1-r1.ebuild 1986 BLAKE2B eec97b40da1265d7727cc8bc0112d5d6d307b498d4bc75f071b861183df9b4afdd5adb2ede1adf32ff207f7e4918b5da4bed42218c81a2b59aa0053194da649b SHA512 a36bbfc49c6fe1e40a3ac495304669a5d5fa0e4694da09cfefa6d3cb33d134a963d299f84685a22eba9a87f468e1cee443b67f2b1f2fdefb6242de95646442c7
+EBUILD 86Box-4.1.ebuild 1914 BLAKE2B 713d139ecdc6583cf12aa2f2790134e91fdc774813a84544fd76fa612040b961f910f620926a4d7f5651dcc9590323a62e949360be660d289eac1784450e72a9 SHA512 e7d25281dafbffec9de1a10751c3c4e56b490207cad61c2cb791f10323ab5354a24a1e9f9c85750ff4f931f729482106d67d7daf6d21eec9f5fec80ea82e01b9
MISC metadata.xml 1162 BLAKE2B 3293da00bec68462e7488dca4d16aa1a6f1e49be1bfd49b8ee5546e247440b7390f78089cc74293b62d18dec7ee0db4a80ed2de2d12401a1b5ebec80275f5646 SHA512 e0d1f641a1b3e751655b1665d4df758cfc648de47770552ce78d136946c322da4a0140358575fd3ed9adbb87d83aa4b28a6c8eda0be375fde0cd77b0b5718c9b
diff --git a/app-emulation/Manifest.gz b/app-emulation/Manifest.gz
index 42fe18bf54b8..782d2d9aab88 100644
--- a/app-emulation/Manifest.gz
+++ b/app-emulation/Manifest.gz
Binary files differ
diff --git a/app-emulation/fs-uae-launcher/Manifest b/app-emulation/fs-uae-launcher/Manifest
index 13381bc8f2b2..2b5c29483100 100644
--- a/app-emulation/fs-uae-launcher/Manifest
+++ b/app-emulation/fs-uae-launcher/Manifest
@@ -1,4 +1,4 @@
AUX fs-uae-launcher-3.0.0-ROMs.patch 626 BLAKE2B 2662476f496345e6dc2f169b8c3e6e579ba68c3c7c1d9c782ce2dff39394520bde6dc1a52d9d43f562bddec9dc28daa3d0e7e1e93f1da48a0a932e1415ad40ea SHA512 8b607f64cd1c66601f7fccf5332377a85e905a6d9ba9fadb9a7234d5f36c350590011141602e093ee7a30dce4c9c6c0e9928b8b7a0be716eeaa15aeff1eacce0
-DIST fs-uae-launcher-3.1.68.tar.xz 7736036 BLAKE2B b2b14d568efa8c00b45497dea1bf73ac0b2522171269903f50ee68eff7e990f54c1b836af84a0b338caffd159fe3f638e6326db95f86482e190238e75894decd SHA512 a637117602c7276b60350ac3bb9c69eec4c18454efd4024e7b822da897eee0f9299f406e4126771f753b75f29d53591e9bbe3e4cbc016dda1ec063e73fe51f07
-EBUILD fs-uae-launcher-3.1.68.ebuild 1945 BLAKE2B 794928d39c7ab2cdfe7af6c55f52c458699f3492b4db349b8a21c1e2ad70879a58ea7ae8722e3ac837550bf87ba1a0c09e542f0a16f3131c7f3c060e38484666 SHA512 5b8b2168211d518d972df5d0911f336bdb8493c989b3616bddb7509f3a1b3409bb7fbe493fe9a25445cd88a43425b2c2197cd74d2a814faf3d0c6c5017379535
+DIST fs-uae-launcher-3.1.70.tar.xz 7707368 BLAKE2B fce6e47b1e09fbfae4959cffe55fec5803aa4dca511af76d621fba2156eee5d76164c0ff5dfad75864b3c2fd5c0a8b5968181538d37b9a039ffd8ab037eeafa2 SHA512 6a4eca273ebd21f64ee0a863497fb39c8b17b6dba0b99a0122f33ea688fb2b341998280b3d0ab4cac2d913bc15834dfec3a1662331dea48933135a82e29f5a83
+EBUILD fs-uae-launcher-3.1.70.ebuild 1772 BLAKE2B d153c2a7b5c31980faef5f1f3a392a6983205e895c2cc1622ae5b11755a3164d2f934364fbce37791b646c9b31507384b48c89999ffd24660e3b59ddf6d180ab SHA512 9aad5b8ee50d94d51d0e54014cff6a47d30f9f8feb113c78d54904ee1e4650d225bc112e3a15ab08ff0ef595ce0a1ea9305f8c0212e52be5562e2f5548b22bdd
MISC metadata.xml 409 BLAKE2B 0e27dad4e68facd0066f0f7d02e859eef7147a16cffa734b74efce77eea44ed333052e3a2a9956c052d9c7e8459b50893b0af78eb2061d1c0a1eaf32597ee1d0 SHA512 a4cf13ffb131f6049cdbd83c16ee1114651450d874dca73f68dfa19686ab09021277e860068a4ed6e8318d9bb1b750f861cb2a693945bcd8d0d4eece7f576e94
diff --git a/app-emulation/fs-uae-launcher/fs-uae-launcher-3.1.68.ebuild b/app-emulation/fs-uae-launcher/fs-uae-launcher-3.1.70.ebuild
index 3a44d050a9cf..d76e5f987497 100644
--- a/app-emulation/fs-uae-launcher/fs-uae-launcher-3.1.68.ebuild
+++ b/app-emulation/fs-uae-launcher/fs-uae-launcher-3.1.70.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{9..11} )
-DISTUTILS_SINGLE_IMPL=1
-DISTUTILS_USE_SETUPTOOLS=no
+PYTHON_COMPAT=( python3_{9..12} )
+DISTUTILS_USE_PEP517=setuptools
+DISTUTILS_SINGLE_IMPL=yes
inherit distutils-r1 xdg
@@ -37,16 +37,10 @@ PATCHES=(
)
python_compile_all() {
- emake
-}
-
-python_install() {
- local dir=${EPREFIX}/usr/share/${PN}
- distutils-r1_python_install --install-lib="${dir}" --install-scripts="${dir}"
+ emake mo
}
python_install_all() {
- dosym ../share/${PN}/${PN} /usr/bin/${PN}
emake install-data DESTDIR="${D}" prefix="${EPREFIX}"/usr
mv "${ED}"/usr/share/doc/{${PN},${PF}} || die
}
diff --git a/app-emulation/virtualbox-kvm/Manifest b/app-emulation/virtualbox-kvm/Manifest
index aaf7220a4544..9a944fd9adf1 100644
--- a/app-emulation/virtualbox-kvm/Manifest
+++ b/app-emulation/virtualbox-kvm/Manifest
@@ -7,11 +7,14 @@ AUX virtualbox-5-localconfig 1554 BLAKE2B 94526262468f955be321afe21649c1adc38f48
AUX virtualbox-7.0.8-disable-rebuild-iPxeBiosBin.patch 843 BLAKE2B bd7fef7afc725a247e9c84999786c27398ee9bdc4dd6f62f153202ab2f281ca8fb8445aa369aa1270a00acc6ba7f709f4d7923eea1acf02779827ba9ae2c2fa9 SHA512 d79b5be03417fbbf90634da5c63ac8975a950f559e42ed97a556edce28ada4d592b1807e89145e58caea1648486916bf0b7bf96e0843bad1cc3cace9048a3a4b
AUX virtualbox-ose-6-wrapper 3578 BLAKE2B c150e578212435268de3c5fb0eea701bc843ec2241dc3839d3d1e33604fc01f6bdff6ed0425ba6917072f652b8c29d0df9a550a92900ca13306fcd36521afbee SHA512 315d981f3e92f2e0134946f6bbb8ad4ea4228afb8f73aaed7feead59b3f55cef01cec4285a7fdaf30ce0931d8b69bda4698baebd63d11f2cd9dfe9d0591a0f40
AUX virtualbox-vboxusb_tmpfilesd 35 BLAKE2B 56937e236a0e4d1a2aa085271e8ae0af9553fdf7c3b804af4d3fda3aa8dbc32d63762fee90bc949390cb9cd67f2f0111894c8af084731dab6920ae1675c69a64 SHA512 72e4602f5f214f8833486f5c787c263a10390e8bdf65b5615d67c35ec44048f02add12fe43b19f9c57a9d2f12d768c52e54fcfb9052c0611d06cc988a698c171
+DIST VirtualBox-7.0.14.tar.bz2 175654864 BLAKE2B 99f4942b864ce481d69983af31393d763452c5b55697ab642b43c155f5fbc2a9963fbe1b7744baef620d0b351e1ac73c1ef978698b9a7e77897bb9cbc18dc17c SHA512 6a82933bbf51ff255d17cb61ae6ddfb791a2200e3dff705f181cd06c6031b48cf15faa5e8202a65daef0fb20b7fd9e33d40dbd0f9cc3f49af49fff04a1cb0a73
DIST virtualbox-help-7.0.14.tar.xz 3944832 BLAKE2B 95079e4da8c960c41cee799142779a6c2587e0e8af7956ca551cb5a4c0f36f313189dfe08afba83a0c32886866a7f9903b5e370008d6b3ce6283fb2288866b06 SHA512 e2f1acdd7577a93047e220300b1996d2855ddef20053c01294f8295fde0840645c41b75632d71dd2fc276219084fe4105fd057623f39375542358796425a2d03
DIST virtualbox-kvm-7.0.14_pre20240208.tar.gz 213410613 BLAKE2B 19962b80d9509e018c23c860e3bdb0a6cb2864aca2e02bfd3b0b9fae5ced5202752d1f5e3f20181158dc5407c8f28badf6c4e617dce9219067931195085e7c4d SHA512 2de9720228b8751095cb29271495d5b90e0d63b6270cd4d33384bc23dce634f38379ebfde348933cd0672d7232e36523f876841f01862b9640a9d974adaf0574
DIST virtualbox-kvm-7.0.14_pre20240226.tar.gz 213417750 BLAKE2B e67928ea411ed2b99dd2e8837bce4c1c5b22538b929f9751cd5ffd14b668c35cee93c4ff9a96e6664dccbc343969bdbed8401575b66bb82d0aa9f95f813e2580 SHA512 3cff52db6cd76756d392c43a8c5ebe8fd496b7d50205da45cb06d829d2748419727e1543939ddccb679dc7d780f55f3052e616cfa0873fe8f9885ebeba538db4
+DIST virtualbox-kvm-7.0.14_pre20240307.tar.gz 119996 BLAKE2B 7d58ca21d155973d95558d09d37d01515548e781081fce0106d1a76c576a572aef5b043405256b1d58f6b24172f05a81b96102fa1bba66bc51e3b0edc2892f0a SHA512 898a4375e5c23866e45b060cd4083bd3d8822e748b9aa94dd018197a6f8176c98c6a0e812d18f4d956fc291383d25ef107013ec61331004e81e0968997fe2119
DIST virtualbox-patches-7.0.14.tar.bz2 6937 BLAKE2B da5f18efbba2a8f4701b3d29dc00784e4e80e18a18b029e5dce8c142eb4dc97637069bfc5081422064a7dc59dfacf503ebbdc3421caa96430dc53fa72988aa20 SHA512 57cc34b92e4626de5c445e34ae025da7ec0d752a60618c619a55c28bf7d6b1cc9dc81ea059b949b0f3e625568207e8084f9462faf487ca0daf2794e7f1feac36
EBUILD virtualbox-kvm-7.0.14_pre20240208.ebuild 21423 BLAKE2B 3d04d942dc8bcda6dae5f095825daf59d2a8aedcf0a22e220ee58aa54bd32877e1430990b9623810116070c1ccb8935bcc25c20c99e72b0d5ec0829189011467 SHA512 5c42e21dfaba7f6a19ae913552ca009164a6270b5e1fc6be250583f22d2a643d362f31e3deacd4f328fb047927ca7d8cc025d1de588c8263c39d65e1b1eb36c9
EBUILD virtualbox-kvm-7.0.14_pre20240226.ebuild 21423 BLAKE2B 3d04d942dc8bcda6dae5f095825daf59d2a8aedcf0a22e220ee58aa54bd32877e1430990b9623810116070c1ccb8935bcc25c20c99e72b0d5ec0829189011467 SHA512 5c42e21dfaba7f6a19ae913552ca009164a6270b5e1fc6be250583f22d2a643d362f31e3deacd4f328fb047927ca7d8cc025d1de588c8263c39d65e1b1eb36c9
-EBUILD virtualbox-kvm-9999.ebuild 21423 BLAKE2B 3d04d942dc8bcda6dae5f095825daf59d2a8aedcf0a22e220ee58aa54bd32877e1430990b9623810116070c1ccb8935bcc25c20c99e72b0d5ec0829189011467 SHA512 5c42e21dfaba7f6a19ae913552ca009164a6270b5e1fc6be250583f22d2a643d362f31e3deacd4f328fb047927ca7d8cc025d1de588c8263c39d65e1b1eb36c9
+EBUILD virtualbox-kvm-7.0.14_pre20240307.ebuild 21669 BLAKE2B 5fbd0798bbba5c97a9cd2d602e2bb798686a7ef13676cfc9b6e848b957c624e513e63c786dba265ffbc793b18a372f3cf31cd652c829540d691b97566fe28ddd SHA512 b0fc3f95544b132c58ad14bd3ea57243381b1c836c2d62ef546c2d67e118bb5a90b59c549c0e111b8dce0fb6b774b2c6bf69b9a8f6a705875968012fe1593d10
+EBUILD virtualbox-kvm-9999.ebuild 21669 BLAKE2B 5fbd0798bbba5c97a9cd2d602e2bb798686a7ef13676cfc9b6e848b957c624e513e63c786dba265ffbc793b18a372f3cf31cd652c829540d691b97566fe28ddd SHA512 b0fc3f95544b132c58ad14bd3ea57243381b1c836c2d62ef546c2d67e118bb5a90b59c549c0e111b8dce0fb6b774b2c6bf69b9a8f6a705875968012fe1593d10
MISC metadata.xml 825 BLAKE2B 380d7acae6669eb133e4e430cc4df85e9ee43798e836c60b26a7b06a0e550f01f007bbab93d7ce0d5eb53e4b32c3d0c30fb9d0593513c30111dd23686d58fa84 SHA512 01b64b0a2dd969d19014db69d0b58c019c6aeca6b8fac60d7591ddd817fe0a75d64e6f84b8c08c5de2f8de75b8750a5803246c48d407f91c4c69433264b5bda1
diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240307.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240307.ebuild
new file mode 100644
index 000000000000..653847dcfdf0
--- /dev/null
+++ b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240307.ebuild
@@ -0,0 +1,768 @@
+# 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
+
+PATCHES_PV="7.0.14"
+ORIGIN_PN="VirtualBox"
+ORIGIN_PV=${PATCHES_PV}
+
+MY_PN=virtualbox
+MY_PV=${PV#*_pre}
+
+PATCHES_DIR="${WORKDIR}"/${PN}-${MY_PV}
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/ https://github.com/cyberus-technology/virtualbox-kvm"
+SRC_URI="https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2"
+if [[ ${PV} == *9999* ]]; then
+ inherit git-r3
+
+ ORIGIN_PV=${PATCHES_PV}
+ EGIT_REPO_URI="https://github.com/cyberus-technology/virtualbox-kvm"
+else
+ ORIGIN_PV=${PV%_pre*}
+ PATCHES_DIR="${WORKDIR}"/${PN}-dev-${MY_PV}
+ SRC_URI+=" https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz"
+fi
+MY_P=${ORIGIN_PN}-${ORIGIN_PV}
+SRC_URI+="
+ https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/${MY_P}.tar.bz2
+ gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${MY_PN}/${MY_PN}-help-${ORIGIN_PV}.tar.xz ) )
+"
+S="${WORKDIR}/${ORIGIN_PN}-${ORIGIN_PV}"
+
+LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
+SLOT="0"
+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
+ 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="
+ !app-emulation/virtualbox
+ ${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=(
+ # Downloaded patchset
+ "${WORKDIR}"/virtualbox-patches-${PATCHES_PV}/patches
+ "${PATCHES_DIR}"/
+)
+
+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_unpack() {
+ [[ ${PV} == *9999* ]] && git-r3_src_unpack
+ default
+}
+
+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}"/${MY_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
+
+ # bug #916002, #488176
+ tc-ld-force-bfd
+
+ # 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 #908814
+ filter-lto
+
+ # 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}"/${MY_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-export AR CC CXX LD RANLIB
+ export HOST_CC="$(tc-getBUILD_CC)"
+
+ local myconf=(
+ --with-gcc="$(tc-getCC)"
+ --with-g++="$(tc-getCXX)"
+
+ --disable-kmods
+ --with-kvm
+
+ # this is required for kvm to work.
+ # also this prohibits installation with suid.
+ --disable-hardening
+
+ $(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)/${MY_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}/${MY_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}/${MY_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} 0750
+ 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 0750
+ 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 0750
+ 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
+
+ newmenu ${MY_PN}.desktop ${PN}.desktop
+
+ pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
+ for size in 16 32 48 64 128 ; do
+ newicon -s ${size} ${MY_PN}-${size}px.png ${PN}.png
+ done
+ newicon ${MY_PN}-48px.png ${PN}.png
+ newicon -s scalable ${MY_PN}.svg ${PN}.png
+ 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="${MY_PN}-${ico}-${size}px.png"
+ if [[ -f "${icofile}" ]]; then
+ newicon -s ${size} ${icofile} ${MY_PN}-${ico}.png
+ fi
+ done
+ done
+ popd &>/dev/null || die
+ fi
+
+ if use lvm; then
+ vbox_inst VBoxVolInfo 0750
+ 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)/${MY_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}/UserManual.*
+ elif use gui; then
+ dodoc "${WORKDIR}"/${MY_PN}-help-${ORIGIN_PV}/UserManual.q{ch,hc}
+ docompress -x /usr/share/doc/${PF}/UserManual.*
+ fi
+ dodoc ${PATCHES_DIR}/README.*
+
+ 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}"/${MY_PN}-vboxusb_tmpfilesd virtualbox-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/${ORIGIN_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 ${MY_PN}."
+ fi
+}
+
+pkg_postrm() {
+ xdg_pkg_postrm
+
+ use udev && udev_reload
+}
diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild
index b7a2eef2da25..653847dcfdf0 100644
--- a/app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild
+++ b/app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild
@@ -20,26 +20,34 @@ 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}
+PATCHES_PV="7.0.14"
+ORIGIN_PN="VirtualBox"
+ORIGIN_PV=${PATCHES_PV}
-ORIGIN_PN="virtualbox"
+MY_PN=virtualbox
+MY_PV=${PV#*_pre}
+
+PATCHES_DIR="${WORKDIR}"/${PN}-${MY_PV}
DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
HOMEPAGE="https://www.virtualbox.org/ https://github.com/cyberus-technology/virtualbox-kvm"
-SRC_URI="https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-7.0.14.tar.bz2"
+SRC_URI="https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2"
if [[ ${PV} == *9999* ]]; then
inherit git-r3
- ORIGIN_PV="7.0.14"
+ ORIGIN_PV=${PATCHES_PV}
EGIT_REPO_URI="https://github.com/cyberus-technology/virtualbox-kvm"
else
- MY_PV=${PV#*_pre}
ORIGIN_PV=${PV%_pre*}
+ PATCHES_DIR="${WORKDIR}"/${PN}-dev-${MY_PV}
SRC_URI+=" https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz"
- S="${WORKDIR}/${PN}-dev-${MY_PV}"
fi
-SRC_URI+=" gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${ORIGIN_PN}/${ORIGIN_PN}-help-${ORIGIN_PV}.tar.xz ) )"
+MY_P=${ORIGIN_PN}-${ORIGIN_PV}
+SRC_URI+="
+ https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/${MY_P}.tar.bz2
+ gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${MY_PN}/${MY_PN}-help-${ORIGIN_PV}.tar.xz ) )
+"
+S="${WORKDIR}/${ORIGIN_PN}-${ORIGIN_PV}"
LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
SLOT="0"
@@ -199,7 +207,8 @@ REQUIRED_USE="
PATCHES=(
# Downloaded patchset
- "${WORKDIR}"/virtualbox-patches-7.0.14/patches
+ "${WORKDIR}"/virtualbox-patches-${PATCHES_PV}/patches
+ "${PATCHES_DIR}"/
)
pkg_pretend() {
@@ -255,7 +264,7 @@ src_prepare() {
# Disable things unused or split into separate ebuilds
sed -e "s@MY_LIBDIR@$(get_libdir)@" \
- "${FILESDIR}"/${ORIGIN_PN}-5-localconfig > LocalConfig.kmk || die
+ "${FILESDIR}"/${MY_PN}-5-localconfig > LocalConfig.kmk || die
if ! use pch; then
# bug #753323
@@ -319,7 +328,7 @@ src_prepare() {
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}"/${ORIGIN_PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
+ eapply "${FILESDIR}"/${MY_PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
fi
# fix doc generation
@@ -503,7 +512,7 @@ src_compile() {
src_install() {
cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
- local vbox_inst_path="/usr/$(get_libdir)/${ORIGIN_PN}" each size ico icofile
+ local vbox_inst_path="/usr/$(get_libdir)/${MY_PN}" each size ico icofile
vbox_inst() {
local binary="${1}"
@@ -521,7 +530,7 @@ src_install() {
# Create configuration files
insinto /etc/vbox
- newins "${FILESDIR}/${ORIGIN_PN}-4-config" vbox.cfg
+ newins "${FILESDIR}/${MY_PN}-4-config" vbox.cfg
# Set the correct libdir
sed \
@@ -530,7 +539,7 @@ src_install() {
# Install the wrapper script
exeinto ${vbox_inst_path}
- newexe "${FILESDIR}/${ORIGIN_PN}-ose-6-wrapper" "VBox"
+ newexe "${FILESDIR}/${MY_PN}-ose-6-wrapper" "VBox"
fowners root:vboxusers ${vbox_inst_path}/VBox
fperms 0750 ${vbox_inst_path}/VBox
@@ -608,21 +617,21 @@ src_install() {
doins -r nls
doins -r UnattendedTemplates
- newmenu ${ORIGIN_PN}.desktop ${PN}.desktop
+ newmenu ${MY_PN}.desktop ${PN}.desktop
pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
for size in 16 32 48 64 128 ; do
- newicon -s ${size} ${ORIGIN_PN}-${size}px.png ${PN}.png
+ newicon -s ${size} ${MY_PN}-${size}px.png ${PN}.png
done
- newicon ${ORIGIN_PN}-48px.png ${PN}.png
- newicon -s scalable ${ORIGIN_PN}.svg ${PN}.png
+ newicon ${MY_PN}-48px.png ${PN}.png
+ newicon -s scalable ${MY_PN}.svg ${PN}.png
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="${ORIGIN_PN}-${ico}-${size}px.png"
+ icofile="${MY_PN}-${ico}-${size}px.png"
if [[ -f "${icofile}" ]]; then
- newicon -s ${size} ${icofile} ${ORIGIN_PN}-${ico}.png
+ newicon -s ${size} ${icofile} ${MY_PN}-${ico}.png
fi
done
done
@@ -668,7 +677,7 @@ src_install() {
fi
# Remove dead symlinks (bug #715338)
- find "${ED}"/usr/$(get_libdir)/${ORIGIN_PN} -xtype l -delete || die
+ find "${ED}"/usr/$(get_libdir)/${MY_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)
@@ -688,11 +697,12 @@ src_install() {
if use doc; then
dodoc UserManual.pdf UserManual.q{ch,hc}
- docompress -x /usr/share/doc/${PF}
+ docompress -x /usr/share/doc/${PF}/UserManual.*
elif use gui; then
- dodoc "${WORKDIR}"/${ORIGIN_PN}-help-${ORIGIN_PV}/UserManual.q{ch,hc}
- docompress -x /usr/share/doc/${PF}
+ dodoc "${WORKDIR}"/${MY_PN}-help-${ORIGIN_PV}/UserManual.q{ch,hc}
+ docompress -x /usr/share/doc/${PF}/UserManual.*
fi
+ dodoc ${PATCHES_DIR}/README.*
if use python; then
local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.so"
@@ -719,7 +729,7 @@ src_install() {
rm -r "${installer_dir}" || die
fi
- newtmpfiles "${FILESDIR}"/${ORIGIN_PN}-vboxusb_tmpfilesd virtualbox-vboxusb.conf
+ newtmpfiles "${FILESDIR}"/${MY_PN}-vboxusb_tmpfilesd virtualbox-vboxusb.conf
}
pkg_postinst() {
@@ -747,7 +757,7 @@ pkg_postinst() {
optfeature "Guest additions ISO" app-emulation/virtualbox-additions
if ! use udev; then
- ewarn "Without USE=udev, USB devices will likely not work in ${ORIGIN_PN}."
+ ewarn "Without USE=udev, USB devices will likely not work in ${MY_PN}."
fi
}