diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-13 22:21:26 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-13 22:21:26 -0500 |
| commit | f997c3ee588099e4f43e9ec845935868e3e60b8e (patch) | |
| tree | 07f0967cda575ee2edf2d62ed8c0f67855ae6bd3 /app-emulation | |
| parent | b589bc93e15b300c3e5318fe97241d57e464bea1 (diff) | |
| download | baldeagleos-repo-f997c3ee588099e4f43e9ec845935868e3e60b8e.tar.gz baldeagleos-repo-f997c3ee588099e4f43e9ec845935868e3e60b8e.tar.xz baldeagleos-repo-f997c3ee588099e4f43e9ec845935868e3e60b8e.zip | |
Adding metadata
Diffstat (limited to 'app-emulation')
42 files changed, 1303 insertions, 2648 deletions
diff --git a/app-emulation/spice/files/red_stream.patch b/app-emulation/spice/files/red_stream.patch new file mode 100644 index 000000000000..9a16c0c7736c --- /dev/null +++ b/app-emulation/spice/files/red_stream.patch @@ -0,0 +1,13 @@ +diff -urN spice-0.15.0.orig/server/red-stream.cpp spice-0.15.0/server/red-stream.cpp +--- spice-0.15.0.orig/server/red-stream.cpp 2022-04-25 18:25:56.686093349 +0200 ++++ spice-0.15.0/server/red-stream.cpp 2022-04-25 18:27:04.186098211 +0200 +@@ -521,7 +521,8 @@ + return RED_STREAM_SSL_STATUS_OK; + } + +-#ifndef SSL_OP_NO_RENEGOTIATION ++#if defined(SSL_OP_NO_RENEGOTIATION) && \ ++ !(defined (LIBRESSL_VERSION_NUMBER)) + // With OpenSSL 1.0.2 and earlier: disable client-side renogotiation + stream->priv->ssl->s3->flags |= SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS; + #endif diff --git a/app-emulation/spice/files/spice-0.16.0-c++20-adjust-designated-init.patch b/app-emulation/spice/files/spice-0.16.0-c++20-adjust-designated-init.patch deleted file mode 100644 index dfc6a697f048..000000000000 --- a/app-emulation/spice/files/spice-0.16.0-c++20-adjust-designated-init.patch +++ /dev/null @@ -1,24 +0,0 @@ -Adjust designated initializer to be C++20 compliant. Starting with -g++-16, GCC will default to the C++20 standard. - -Signed-off-by: Nicholas Vinson <nvinson234@gmail.com> ---- - server/tests/test-display-base.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/server/tests/test-display-base.cpp b/server/tests/test-display-base.cpp -index b220b7fe..5d0404c9 100644 ---- a/server/tests/test-display-base.cpp -+++ b/server/tests/test-display-base.cpp -@@ -806,7 +806,7 @@ static QXLInterface display_sif = { - .major_version = SPICE_INTERFACE_QXL_MAJOR, - .minor_version = SPICE_INTERFACE_QXL_MINOR - }, -- { .attached_worker = attached_worker }, -+ .attached_worker = attached_worker, - .set_compression_level = set_compression_level, - .set_mm_time = nullptr, - .get_init_info = get_init_info, --- -2.52.0 - diff --git a/app-emulation/spice/metadata.xml b/app-emulation/spice/metadata.xml index b19574d108b4..87f7dbb6b04e 100644 --- a/app-emulation/spice/metadata.xml +++ b/app-emulation/spice/metadata.xml @@ -2,9 +2,16 @@ <!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="project"> + <email>dev@liguros.net</email> + <name>Development</name> + </maintainer> + <maintainer type="project"> <email>virtualization@gentoo.org</email> <name>Gentoo Virtualization Project</name> </maintainer> + <upstream> + <remote-id type="cpe">cpe:/a:spice_project:spice</remote-id> + </upstream> <use> <flag name="smartcard">Enable smartcard remoting using <pkg>app-emulation/libcacard</pkg> </flag> diff --git a/app-emulation/spice/spice-0.15.2.ebuild b/app-emulation/spice/spice-0.15.2.ebuild index f7cd79dffc4d..4160a114e5f4 100644 --- a/app-emulation/spice/spice-0.15.2.ebuild +++ b/app-emulation/spice/spice-0.15.2.ebuild @@ -1,94 +1,92 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 2021-2023 Liguros Authors # Distributed under the terms of the GNU General Public License v2 - EAPI=8 PYTHON_COMPAT=( python3_{13..14} ) -inherit meson python-any-r1 readme.gentoo-r1 xdg-utils +inherit autotools python-any-r1 readme.gentoo-r1 xdg-utils DESCRIPTION="SPICE server" HOMEPAGE="https://www.spice-space.org/" -if [[ ${PV} == 9999 ]] ; then - EGIT_REPO_URI="https://gitlab.freedesktop.org/spice/spice.git" - inherit git-r3 - - DEPEND="~app-emulation/spice-protocol-9999" -else - SRC_URI="https://www.spice-space.org/download/releases/spice-server/${P}.tar.bz2" - KEYWORDS="amd64 arm64 ~loong ppc64 ~riscv x86" -fi +SRC_URI="https://www.spice-space.org/download/releases/spice-server/${P}.tar.bz2" LICENSE="LGPL-2.1" SLOT="0" -IUSE="gstreamer lz4 sasl smartcard static-libs test" -RESTRICT="!test? ( test )" +KEYWORDS="amd64 arm64 ppc64 x86" +IUSE=" lz4 sasl smartcard static-libs gstreamer" -# The libspice-server only uses the headers of libcacard +# the libspice-server only uses the headers of libcacard RDEPEND=" dev-lang/orc[static-libs(+)?] - >=dev-libs/glib-2.38:2[static-libs(+)?] - dev-libs/openssl:0=[static-libs(+)?] + >=dev-libs/glib-2.22:2[static-libs(+)?] media-libs/opus[static-libs(+)?] - media-libs/libjpeg-turbo:0=[static-libs(+)?] - virtual/zlib:=[static-libs(+)?] + sys-libs/zlib[static-libs(+)?] + virtual/jpeg:0=[static-libs(+)?] >=x11-libs/pixman-0.17.7[static-libs(+)?] + dev-libs/openssl:0=[static-libs(+)?] + lz4? ( app-arch/lz4:0=[static-libs(+)?] ) - smartcard? ( >=app-emulation/libcacard-2.5.1 ) + smartcard? ( >=app-emulation/libcacard-0.1.2 ) sasl? ( dev-libs/cyrus-sasl[static-libs(+)?] ) gstreamer? ( media-libs/gstreamer:1.0 media-libs/gst-plugins-base:1.0 - ) -" -DEPEND+=" - ${RDEPEND} - >=app-emulation/spice-protocol-0.14.3 - smartcard? ( app-emulation/qemu[smartcard] ) - test? ( net-libs/glib-networking ) -" -BDEPEND=" - ${PYTHON_DEPS} - dev-util/glib-utils + )" +DEPEND="${RDEPEND} + >=app-emulation/spice-protocol-0.14.0 + smartcard? ( app-emulation/qemu[smartcard] )" +BDEPEND="${PYTHON_DEPS} virtual/pkgconfig $(python_gen_any_dep ' >=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}] dev-python/six[${PYTHON_USEDEP}] - ') -" + ')" python_check_deps() { - python_has_version -b ">=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]" - python_has_version -b "dev-python/six[${PYTHON_USEDEP}]" + has_version -b ">=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]" + has_version -b "dev-python/six[${PYTHON_USEDEP}]" } pkg_setup() { [[ ${MERGE_TYPE} != binary ]] && python-any-r1_pkg_setup } +src_prepare() { + default + + eautoreconf +} + src_configure() { # Prevent sandbox violations, bug #586560 # https://bugzilla.gnome.org/show_bug.cgi?id=744134 # https://bugzilla.gnome.org/show_bug.cgi?id=744135 - use gstreamer && addpredict /dev + addpredict /dev xdg_environment_reset - local emesonargs=( - -Ddefault_library=$(usex static-libs both shared) - -Dgstreamer=$(usex gstreamer 1.0 no) - -Dopus=enabled - -Dmanual=false - $(meson_use lz4) - $(meson_use sasl) - $(meson_feature smartcard) - $(meson_use test tests) - ) + local myconf=" + $(use_enable static-libs static) + $(use_enable lz4) + $(use_with sasl) + $(use_enable smartcard) + --enable-gstreamer=$(usex gstreamer "1.0" "no") + --disable-celt051 + " + econf ${myconf} +} + +src_compile() { + # Prevent sandbox violations, bug #586560 + # https://bugzilla.gnome.org/show_bug.cgi?id=744134 + # https://bugzilla.gnome.org/show_bug.cgi?id=744135 + addpredict /dev - meson_src_configure + default } src_install() { - meson_src_install + default + use static-libs || find "${D}" -name '*.la' -type f -delete || die readme.gentoo_create_doc } diff --git a/app-emulation/spice/spice-0.16.0-r1.ebuild b/app-emulation/spice/spice-0.16.0-r1.ebuild new file mode 100644 index 000000000000..f953191a92a2 --- /dev/null +++ b/app-emulation/spice/spice-0.16.0-r1.ebuild @@ -0,0 +1,94 @@ +# Copyright 2021-2025 Liguros Authors +# Distributed under the terms of the GNU General Public License v2 +EAPI=8 + +PYTHON_COMPAT=( python3_{13..14} ) +inherit autotools python-any-r1 readme.gentoo-r1 xdg-utils + +DESCRIPTION="SPICE server" +HOMEPAGE="https://www.spice-space.org/" +SRC_URI="https://www.spice-space.org/download/releases/spice-server/${P}.tar.bz2" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="amd64 arm64 ppc64 x86" +IUSE=" lz4 sasl smartcard static-libs gstreamer" + +# the libspice-server only uses the headers of libcacard +RDEPEND=" + dev-lang/orc[static-libs(+)?] + >=dev-libs/glib-2.22:2[static-libs(+)?] + media-libs/opus[static-libs(+)?] + sys-libs/zlib[static-libs(+)?] + virtual/jpeg:0=[static-libs(+)?] + >=x11-libs/pixman-0.17.7[static-libs(+)?] + dev-libs/openssl:0=[static-libs(+)?] + + lz4? ( app-arch/lz4:0=[static-libs(+)?] ) + smartcard? ( >=app-emulation/libcacard-0.1.2 ) + sasl? ( dev-libs/cyrus-sasl[static-libs(+)?] ) + gstreamer? ( + media-libs/gstreamer:1.0 + media-libs/gst-plugins-base:1.0 + )" +DEPEND="${RDEPEND} + >=app-emulation/spice-protocol-0.14.5 + smartcard? ( app-emulation/qemu[smartcard] )" +BDEPEND="${PYTHON_DEPS} + virtual/pkgconfig + $(python_gen_any_dep ' + >=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] + ')" + +python_check_deps() { + has_version -b ">=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]" + has_version -b "dev-python/six[${PYTHON_USEDEP}]" +} + +pkg_setup() { + [[ ${MERGE_TYPE} != binary ]] && python-any-r1_pkg_setup +} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + # Prevent sandbox violations, bug #586560 + # https://bugzilla.gnome.org/show_bug.cgi?id=744134 + # https://bugzilla.gnome.org/show_bug.cgi?id=744135 + addpredict /dev + + xdg_environment_reset + + local myconf=" + $(use_enable static-libs static) + $(use_enable lz4) + $(use_with sasl) + $(use_enable smartcard) + --enable-gstreamer=$(usex gstreamer "1.0" "no") + --disable-celt051 + " + econf ${myconf} +} + +src_compile() { + # Prevent sandbox violations, bug #586560 + # https://bugzilla.gnome.org/show_bug.cgi?id=744134 + # https://bugzilla.gnome.org/show_bug.cgi?id=744135 + addpredict /dev + + default +} + +src_install() { + default + use static-libs || find "${D}" -name '*.la' -type f -delete || die + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/app-emulation/spice/spice-0.16.0.ebuild b/app-emulation/spice/spice-0.16.0.ebuild deleted file mode 100644 index 365421ca37b2..000000000000 --- a/app-emulation/spice/spice-0.16.0.ebuild +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright 1999-2026 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{13..14} ) -inherit meson python-any-r1 readme.gentoo-r1 xdg-utils - -DESCRIPTION="SPICE server" -HOMEPAGE="https://www.spice-space.org/" -if [[ ${PV} == 9999 ]] ; then - EGIT_REPO_URI="https://gitlab.freedesktop.org/spice/spice.git" - inherit git-r3 - - DEPEND="~app-emulation/spice-protocol-9999" -else - SRC_URI="https://www.spice-space.org/download/releases/spice-server/${P}.tar.bz2" - KEYWORDS="amd64 arm64 ~loong ppc64 ~riscv x86" -fi - -LICENSE="LGPL-2.1" -SLOT="0" -IUSE="gstreamer lz4 opus sasl smartcard static-libs test" -RESTRICT="!test? ( test )" - -# The libspice-server only uses the headers of libcacard -RDEPEND=" - dev-lang/orc[static-libs(+)?] - >=dev-libs/glib-2.38:2[static-libs(+)?] - dev-libs/openssl:0=[static-libs(+)?] - media-libs/opus[static-libs(+)?] - media-libs/libjpeg-turbo:0=[static-libs(+)?] - virtual/zlib:=[static-libs(+)?] - >=x11-libs/pixman-0.17.7[static-libs(+)?] - virtual/libudev - lz4? ( app-arch/lz4:0=[static-libs(+)?] ) - opus? ( media-libs/opus[static-libs(+)?] ) - smartcard? ( >=app-emulation/libcacard-2.5.1 ) - sasl? ( dev-libs/cyrus-sasl[static-libs(+)?] ) - gstreamer? ( - media-libs/gstreamer:1.0 - media-libs/gst-plugins-base:1.0 - ) -" -DEPEND+=" - ${RDEPEND} - >=app-emulation/spice-protocol-0.14.5 - smartcard? ( app-emulation/qemu[smartcard] ) - test? ( net-libs/glib-networking ) -" -BDEPEND=" - ${PYTHON_DEPS} - dev-util/glib-utils - virtual/pkgconfig - $(python_gen_any_dep ' - >=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}] - ') -" - -python_check_deps() { - python_has_version -b ">=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]" -} - -pkg_setup() { - [[ ${MERGE_TYPE} != binary ]] && python-any-r1_pkg_setup -} - -PATCHES=( - "${FILESDIR}/${P}-c++20-adjust-designated-init.patch" -) - -src_configure() { - # Prevent sandbox violations, bug #586560 - # https://bugzilla.gnome.org/show_bug.cgi?id=744134 - # https://bugzilla.gnome.org/show_bug.cgi?id=744135 - use gstreamer && addpredict /dev - - xdg_environment_reset - - local emesonargs=( - -Ddefault_library=$(usex static-libs both shared) - -Dgstreamer=$(usex gstreamer 1.0 no) - -Dopus=enabled - -Dmanual=false - $(meson_use lz4) - $(meson_use sasl) - $(meson_feature opus) - $(meson_feature smartcard) - $(meson_use test tests) - ) - - meson_src_configure -} - -src_install() { - meson_src_install - readme.gentoo_create_doc -} - -pkg_postinst() { - readme.gentoo_print_elog -} diff --git a/app-emulation/spice/spice-9999-r1.ebuild b/app-emulation/spice/spice-9999-r1.ebuild deleted file mode 100644 index 0b36a99a1219..000000000000 --- a/app-emulation/spice/spice-9999-r1.ebuild +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright 1999-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{13..14} ) -inherit meson python-any-r1 readme.gentoo-r1 xdg-utils - -DESCRIPTION="SPICE server" -HOMEPAGE="https://www.spice-space.org/" -if [[ ${PV} == 9999 ]] ; then - EGIT_REPO_URI="https://gitlab.freedesktop.org/spice/spice.git" - inherit git-r3 - - DEPEND="~app-emulation/spice-protocol-9999" -else - SRC_URI="https://www.spice-space.org/download/releases/spice-server/${P}.tar.bz2" - KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86" -fi - -LICENSE="LGPL-2.1" -SLOT="0" -IUSE="gstreamer lz4 opus sasl smartcard static-libs test" -RESTRICT="!test? ( test )" - -# The libspice-server only uses the headers of libcacard -RDEPEND=" - dev-lang/orc[static-libs(+)?] - >=dev-libs/glib-2.38:2[static-libs(+)?] - dev-libs/openssl:0=[static-libs(+)?] - media-libs/opus[static-libs(+)?] - media-libs/libjpeg-turbo:0=[static-libs(+)?] - virtual/zlib:=[static-libs(+)?] - >=x11-libs/pixman-0.17.7[static-libs(+)?] - virtual/libudev - lz4? ( app-arch/lz4:0=[static-libs(+)?] ) - opus? ( media-libs/opus[static-libs(+)?] ) - smartcard? ( >=app-emulation/libcacard-2.5.1 ) - sasl? ( dev-libs/cyrus-sasl[static-libs(+)?] ) - gstreamer? ( - media-libs/gstreamer:1.0 - media-libs/gst-plugins-base:1.0 - ) -" -DEPEND+=" - ${RDEPEND} - >=app-emulation/spice-protocol-0.14.5 - smartcard? ( app-emulation/qemu[smartcard] ) - test? ( net-libs/glib-networking ) -" -BDEPEND=" - ${PYTHON_DEPS} - dev-util/glib-utils - virtual/pkgconfig - $(python_gen_any_dep ' - >=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}] - ') -" - -python_check_deps() { - python_has_version -b ">=dev-python/pyparsing-1.5.6-r2[${PYTHON_USEDEP}]" -} - -pkg_setup() { - [[ ${MERGE_TYPE} != binary ]] && python-any-r1_pkg_setup -} - -src_configure() { - # Prevent sandbox violations, bug #586560 - # https://bugzilla.gnome.org/show_bug.cgi?id=744134 - # https://bugzilla.gnome.org/show_bug.cgi?id=744135 - use gstreamer && addpredict /dev - - xdg_environment_reset - - local emesonargs=( - -Ddefault_library=$(usex static-libs both shared) - -Dgstreamer=$(usex gstreamer 1.0 no) - -Dopus=enabled - -Dmanual=false - $(meson_use lz4) - $(meson_use sasl) - $(meson_feature opus) - $(meson_feature smartcard) - $(meson_use test tests) - ) - - meson_src_configure -} - -src_install() { - meson_src_install - readme.gentoo_create_doc -} - -pkg_postinst() { - readme.gentoo_print_elog -} diff --git a/app-emulation/virtualbox/Manifest b/app-emulation/virtualbox/Manifest index 1a2d61591880..bef9164c573d 100644 --- a/app-emulation/virtualbox/Manifest +++ b/app-emulation/virtualbox/Manifest @@ -1,12 +1,5 @@ -DIST VirtualBox-7.0.26.tar.bz2 174650718 BLAKE2B ba13a940b9566a5ac5b228bf29d49d4b9bf16a72da3212c305538711d363f1e6fddaa8717d4c46394ce488d2c1670874fece356740f421f44f6f40bd655f5551 SHA512 337f62438679f98b342213dbafdd3e07f7d7092a4205bfe388d64d1cc8224499621addea56b70d806c93290bb82e6150c07516e69250460a276e3b7a4484a9b6 -DIST VirtualBox-7.1.18.tar.bz2 222872511 BLAKE2B 1c692a6bd86185035e379feefddd3e98c18a49f231a2fd57702ca95c887ffe9ec435a90ebad457d07054bcd88bd31d84db61ed21ae8a99ae6d6ca39e18b1879c SHA512 bb0eae83af0ca94e502fc713a5fdf90e2760eb90e548ad102259b57edcda98f04adf6e9cb83b52bee3c1b341f1c2823fec05a0c60a2403e70be6159dd4a21c34 DIST VirtualBox-7.2.6.tar.bz2 211192590 BLAKE2B 4871e52d8ebc6eb05c6c7dc08a7a38010bb536e7db4617023235ce8104a984e267341a502e3c385abe1a2fd4e0bb1e054f55794b994a5dba79e368f5ef4c3f9a SHA512 77b83b9fd086f89313eb73ecf98f3b2484985ddf6bb89d514b350e55f44c37a001f842d966173d0eed5071db08e1b0e66e0cbab4365ec99b7904143a7d162a55 DIST VirtualBox-7.2.8.tar.bz2 207408458 BLAKE2B f57d2cbf02cb6b4b78a203737d1e12916b396e188a58d075b2b6414e83e526f0adecab7e317b33a639de51d30b8351d74dc4beb48e57e5a0feb1bf68d2523339 SHA512 a67256506c870b7fcecb0ec8b1d5e75490ee02379b5e967aead44ed09e2b15c0a2c3fd2d1e021281609d8d1f98b161cd3aa0265938490a999a700a1e01a9013b -DIST virtualbox-help-7.1.0.tar.xz 1631644 BLAKE2B 408748619d1e981b9d5b5e615baca75ff297e9b7e745751767361b7b9c74345a3db1980734439f3868c412fe28a6b687b417adc3cc148d2e2b8a9fa60e48463b SHA512 513b8474d4fbf7cdb83624dc8d344122c524d92f9f84b32784161c8e1cac8ddc2c265447621d7cd3cf105d555a044e6abf42155f413ba89d507eba7ce3b2da89 -DIST virtualbox-help-7.1.18.tar.xz 8350244 BLAKE2B 4c63fc530418d4852a6a88b4dacd2c9e9fa753ff3836ebadb2f6cc99296c35604bddf0a95addbcdf2f4d36ddc5299395f3bde0fa0e2201d1dc48d262197a8bd3 SHA512 247bf80af406e4f76d71e8b966f113f138b5f08bf3755fe9e70cabc9a9f1d098215dbadb00ab184e9325e5cee7e927fad0a360faa28f90598bd995e70996d640 DIST virtualbox-help-7.2.6.tar.xz 8343068 BLAKE2B f383da784fe46cb0c21b0e6a67cec706883f91a73c6e1f6a6b942df73910219966c48bea8783f455bfb370931f53037742fcfb7c09be11be3a9930babc71bc6e SHA512 91b6b51c1879b031530540b3ed78fed3fc7bda1b28a89d94d46c77d6a78e4019d21c65445d6dbedf485195f53401758d4661e5b99bdbf5d0beb7cf625698e3ad DIST virtualbox-help-7.2.8.tar.xz 8378772 BLAKE2B 6941831bcdabe0017f3b03c4741ac5df5feef8aa376f0686878eb70e8ae7e9bdf878a34db86b4756ac65476ea08e3e0f1417db7870d35619bb4065bd271264dd SHA512 476d9e3ca3c338ec0c54a91204c24b5033af75c60d55e66693093bef30262157437f36a66c5c8184e9eb95b0a243cd6ec5c59f2c5b9c6dc31f94ab5cea393e5f -DIST virtualbox-patches-7.0.22-r1.tar.bz2 6972 BLAKE2B e9116cb2ed874f9a0133e756b725a48ee665a412114d04195849f5930782c65678a2aaf581b9b02bc29001be4191116e322643232ee37de5cba0f2b5049b615f SHA512 be72b596f63229bd28b22c026108cf5a5c951f58343a709f158446593e6f872a81734dd83a838dd91c02c80854312e2cad81f3a525035db5ffabeb96729a8276 -DIST virtualbox-patches-7.1.16.tar.bz2 6001 BLAKE2B 0e8bd42b9556321841e94827df500cbed40ecffc47e2e82fbcc7a98e00a069322e7e549f6ceb250359735d3602467fa55c81aa2534c05502b1854e8a11b839c5 SHA512 aea93103e5122568b7c0bb70566872935326675c7f9dda00563a83e0cb59c92020501e780e30b2b58c1c0b0f2cb97a6d72379702c913c14fd4c7546f7e033361 -DIST virtualbox-patches-7.2.4.tar.bz2 6938 BLAKE2B be3ef14c2090f39eeb1fe6fe82231dbf725ff6d20603e72e4c3bbf8b15ae7698d2be86bb321bd1776a15c6385770a393cc8c6b945ea87c54f9c767c3c77b61af SHA512 2e9c403dff97f5146e7632d7f6b5d0230f65f8be172efc6dd2959e72054778f617aa437f8c86d1489f9ce9212899ff08e83433a9eca3e5691353b036d426784a DIST virtualbox-patches-7.2.6.tar.bz2 6041 BLAKE2B 6bd791a24acccc7ab923f09b5a1a88f557c59f2526b1055c7a877e3ca25ca002c58cc5fb67737e2f53c322bae5c716dba4472da8c977006d6297793fae55fafc SHA512 94a49da99d6affa0c89e0fb349bb09fd1dc7f05ced9c828d52d30455fb8c76a245db1f572491801fa381e7521bc8f4e094ddb3d8fd2d341835f3bd238a24cc25 diff --git a/app-emulation/virtualbox/files/02-gsoap-build-fix.patch b/app-emulation/virtualbox/files/02-gsoap-build-fix.patch new file mode 100644 index 000000000000..f67b48185df5 --- /dev/null +++ b/app-emulation/virtualbox/files/02-gsoap-build-fix.patch @@ -0,0 +1,14 @@ +Interim build fix for gsoap > 2.8.13 +Index: virtualbox/src/VBox/Main/webservice/Makefile.kmk +=================================================================== +--- virtualbox.orig/src/VBox/Main/webservice/Makefile.kmk ++++ virtualbox/src/VBox/Main/webservice/Makefile.kmk +@@ -848,7 +848,7 @@ + $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@) + $(call MSG_GENERATE,,lots of files,$(GSOAPH_RELEVANT)) + $(RM) -f $@ +- $(REDIRECT) -C $(VBOXWEB_OUT_DIR) -- $(VBOX_SOAPCPP2) $(VBOXWEB_SOAPCPP2_SKIP_FILES) -L -2 -w -I$(VBOX_PATH_GSOAP_IMPORT) $(GSOAPH_RELEVANT) ++ $(REDIRECT) -C $(VBOXWEB_OUT_DIR) -- $(VBOX_SOAPCPP2) $(VBOXWEB_SOAPCPP2_SKIP_FILES) -z1 -L -2 -w -I$(VBOX_PATH_GSOAP_IMPORT) $(GSOAPH_RELEVANT) + ifeq ($(KBUILD_TARGET),win) # MSC -Wall workaround. + $(CP) -f "$(VBOXWEB_SOAP_CLIENT_H)" "$(VBOXWEB_SOAP_CLIENT_H).tmp" + $(SED) -f $(VBOX_PATH_WEBSERVICE)/stdsoap2.sed --output "$(VBOXWEB_SOAP_CLIENT_H)" "$(VBOXWEB_SOAP_CLIENT_H).tmp" diff --git a/app-emulation/virtualbox/files/virtualbox-7.2.2-curl-8.16.patch b/app-emulation/virtualbox/files/curl-8.16.patch index 6a1d401cca98..9a03c4ec7f0f 100644 --- a/app-emulation/virtualbox/files/virtualbox-7.2.2-curl-8.16.patch +++ b/app-emulation/virtualbox/files/curl-8.16.patch @@ -1,18 +1,12 @@ -Breaking change in curl 8.16: -https://github.com/curl/curl/commit/1a12663d06d9c42fd40a8655d5247f7afeeb8e1e - -Change curl_proxytype to long. - -See also: https://bugs.gentoo.org/962744 - ---- a/src/VBox/Runtime/generic/http-curl.cpp -+++ b/src/VBox/Runtime/generic/http-curl.cpp +diff '--color=auto' -urN VirtualBox-7.2.2.orig/src/VBox/Runtime/generic/http-curl.cpp VirtualBox-7.2.2/src/VBox/Runtime/generic/http-curl.cpp +--- VirtualBox-7.2.2.orig/src/VBox/Runtime/generic/http-curl.cpp 2025-09-18 15:53:30.924632742 +0200 ++++ VirtualBox-7.2.2/src/VBox/Runtime/generic/http-curl.cpp 2025-09-18 15:55:52.129067924 +0200 @@ -188,7 +188,7 @@ /** Proxy port number (UINT32_MAX if not specified). */ uint32_t uProxyPort; /** The proxy type (CURLPROXY_HTTP, CURLPROXY_SOCKS5, ++). */ - curl_proxytype enmProxyType; -+ long enmProxyType; ++ long enmProxyType; /** Proxy username (RTStrFree). */ char *pszProxyUsername; /** Proxy password (RTStrFree). */ @@ -25,21 +19,12 @@ See also: https://bugs.gentoo.org/962744 uint32_t uPort, const char *pszUsername, const char *pszPassword) { CURLcode rcCurl; -@@ -610,7 +610,7 @@ - if ( pThis->fReapplyProxyInfo - || enmProxyType != pThis->enmProxyType) - { -- rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_PROXYTYPE, (long)enmProxyType); -+ rcCurl = curl_easy_setopt(pThis->pCurl, CURLOPT_PROXYTYPE, enmProxyType); - AssertMsgReturn(CURL_SUCCESS(rcCurl), ("CURLOPT_PROXYTYPE=%d: %d (%#x)\n", enmProxyType, rcCurl, rcCurl), - VERR_HTTP_CURL_PROXY_CONFIG); - pThis->enmProxyType = enmProxyType; @@ -871,7 +871,7 @@ char *pszPassword = RTUriParsedAuthorityPassword(pszProxyUrl, &Parsed); uint32_t uProxyPort = RTUriParsedAuthorityPort(pszProxyUrl, &Parsed); bool fUnknownProxyType = false; - curl_proxytype enmProxyType; -+ long enmProxyType; ++ long enmProxyType; if (RTUriIsSchemeMatch(pszProxyUrl, "http")) { enmProxyType = CURLPROXY_HTTP; @@ -48,7 +33,7 @@ See also: https://bugs.gentoo.org/962744 * not scheme/protocol)... */ - curl_proxytype enmProxyType = CURLPROXY_HTTP; -+ long enmProxyType = CURLPROXY_HTTP; ++ long enmProxyType = CURLPROXY_HTTP; uint32_t uDefaultProxyPort = 8080; if ( CFEqual(hStrProxyType, kCFProxyTypeHTTP) || CFEqual(hStrProxyType, kCFProxyTypeHTTPS)) diff --git a/app-emulation/virtualbox/files/libxml-2.12.patch b/app-emulation/virtualbox/files/libxml-2.12.patch new file mode 100644 index 000000000000..4631f304735c --- /dev/null +++ b/app-emulation/virtualbox/files/libxml-2.12.patch @@ -0,0 +1,47 @@ +diff --git a/include/iprt/cpp/xml.h b/include/iprt/cpp/xml.h +index 40975e86..7639c281 100644 +--- a/include/iprt/cpp/xml.h ++++ b/include/iprt/cpp/xml.h +@@ -113,9 +113,9 @@ public: + class RT_DECL_CLASS XmlError : public RuntimeError + { + public: +- XmlError(xmlErrorPtr aErr); ++ XmlError(const xmlError *aErr); + +- static char* Format(xmlErrorPtr aErr); ++ static char* Format(const xmlError *aErr); + }; + + // Logical errors +diff --git a/src/VBox/Runtime/r3/xml.cpp b/src/VBox/Runtime/r3/xml.cpp +index a6661760..b301a6c6 100644 +--- a/src/VBox/Runtime/r3/xml.cpp ++++ b/src/VBox/Runtime/r3/xml.cpp +@@ -131,7 +131,7 @@ LogicError::LogicError(RT_SRC_POS_DECL) + RTStrFree(msg); + } + +-XmlError::XmlError(xmlErrorPtr aErr) ++XmlError::XmlError(const xmlError *aErr) + { + if (!aErr) + throw EInvalidArg(RT_SRC_POS); +@@ -145,7 +145,7 @@ XmlError::XmlError(xmlErrorPtr aErr) + * Composes a single message for the given error. The caller must free the + * returned string using RTStrFree() when no more necessary. + */ +-/* static */ char *XmlError::Format(xmlErrorPtr aErr) ++/* static */ char *XmlError::Format(const xmlError *aErr) + { + const char *msg = aErr->message ? aErr->message : "<none>"; + size_t msgLen = strlen(msg); +@@ -1856,7 +1856,7 @@ static void xmlParserBaseGenericError(void *pCtx, const char *pszMsg, ...) RT_NO + va_end(args); + } + +-static void xmlParserBaseStructuredError(void *pCtx, xmlErrorPtr error) RT_NOTHROW_DEF ++static void xmlParserBaseStructuredError(void *pCtx, const xmlError *error) RT_NOTHROW_DEF + { + NOREF(pCtx); + /* we expect that there is always a trailing NL */ diff --git a/app-emulation/virtualbox/files/virtualbox-5.2.8-paxmark-bldprogs.patch b/app-emulation/virtualbox/files/virtualbox-5.2.8-paxmark-bldprogs.patch new file mode 100644 index 000000000000..7eb1e1793a7f --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-5.2.8-paxmark-bldprogs.patch @@ -0,0 +1,59 @@ +2017-02-20 Quentin Minster <quentin@minster.io> + + #https://bugs.gentoo.org/show_bug.cgi?id=591582 + * Config.kmk: add paxmark befor VBOX_VBOXTPG get run. + * src/VBox/VMM/Makefile.kmk: add paxmark befor VBOX_VBOXCPP get run. + * src/VBox/Main/Makefile.kmk: add paxmark befor USBIdDatabaseGenerator_1_TARGET get run. + +--- a/Config.kmk ++++ b/Config.kmk 2016-09-21 02:22:28 +@@ -3719,11 +3719,13 @@ + $(if-expr $(intersects $(KBUILD_TARGET_ARCH),$(KBUILD_ARCHES_64)),-64,-32) \ + -h --host-$(VBOX_HC_ARCH_BITS)-bit #-vvv + define TOOL_VBoxTpG_DTRACE_HDR_CMDS ++ $(QUIET)paxmark.sh -m "$(VBOX_VBOXTPG)" + $(QUIET)$(VBOX_VBOXTPG) $(flags) -o "$(out)" -s "$(source)" + endef + TOOL_VBoxTpG_DTRACE_OBJ_NOT_NEEDED := + TOOL_VBoxTpG_DTRACE_OBJ_FLAGS := -G --host-$(VBOX_HC_ARCH_BITS)-bit #-vvv + define TOOL_VBoxTpG_DTRACE_OBJ_CMDS ++ $(QUIET)paxmark.sh -m "$(VBOX_VBOXTPG)" + $(QUIET)$(VBOX_VBOXTPG) \ + $(if-expr $(intersects $(bld_trg_arch),$(KBUILD_ARCHES_64)),-64,-32) \ + $(flags) \ +@@ -3738,6 +3740,7 @@ + TOOL_VBoxTpG-Disabled_DTRACE_DEPORD = $(VBOX_VBOXTPG) + TOOL_VBoxTpG-Disabled_DTRACE_HDR_FLAGS := -h + define TOOL_VBoxTpG-Disabled_DTRACE_HDR_CMDS ++ $(QUIET)paxmark.sh -m "$(VBOX_VBOXTPG)" + $(QUIET)$(VBOX_VBOXTPG) $(flags) -o "$(out)" -s "$(source)" + endef + TOOL_VBoxTpG-Disabled_DTRACE_OBJ_NOT_NEEDED := $(KBUILD_OSES) +@@ -3752,6 +3755,7 @@ + TOOL_DTraceAndVBoxTpG_DTRACE_HDR_CMDS = + define TOOL_DTraceAndVBoxTpG_DTRACE_HDR_CMDS + $(TOOL_StandardDTrace_DTRACE_HDR_CMDS) ++ $(QUIET)paxmark.sh -m "$(VBOX_VBOXTPG)" + $(QUIET)$(VBOX_VBOXTPG) --generate-wrapper-header --host-$(VBOX_HC_ARCH_BITS)-bit --ring-3-context \ + $(filter-out -C, $(filter-out -h,$(flags))) \ + -o "$(out).tmp" -s "$(source)" +--- a/src/VBox/VMM/Makefile.kmk 2018-04-10 15:26:24.622867735 +0300 ++++ b/src/VBox/VMM/Makefile.kmk 2018-04-10 15:24:35.901998796 +0300 +@@ -896,6 +896,7 @@ + $$(VMMLibDTrace_0_OUTDIR)/$1: $2 $$(VBOX_VBOXCPP) | $$$$(dir $$$$@) + $$(call KB_FN_AUTO_CMD_DEPS_COMMANDS) + $$(QUIET)$$(call MSG_GENERATE,VMMLibDTrace,$$@,$2) ++ $$(QUIET)paxmark.sh -m "$(VBOX_VBOXCPP)" + $$(QUIET)$(VBOX_VBOXCPP) -d \ + -D VBOX_FOR_DTRACE_LIB \ + -D VBOX_FOR_DTRACE_LIB_$(toupper $(KBUILD_TARGET_ARCH)) \ +--- a/src/VBox/Main/Makefile.kmk 2018-04-10 15:26:15.292793067 +0300 ++++ b/src/VBox/Main/Makefile.kmk 2018-04-10 15:25:14.042303341 +0300 +@@ -607,6 +607,7 @@ + $(PATH_SUB_CURRENT)/src-server/usb.ids $(PATH_SUB_CURRENT)/src-server/custom.ids | $$(dir $$@) + $(call KB_FN_AUTO_CMD_DEPS_COMMANDS) + $(call MSG_GENERATE,USBIdDatabase,$@,$(USBIdDatabaseGenerator_1_TARGET)) ++ $(QUIET)paxmark.sh -m "$(USBIdDatabaseGenerator_1_TARGET)" + $(QUIET)$(USBIdDatabaseGenerator_1_TARGET) -o "$@" $(filter %.ids,$^) + + BLDPROGS += USBIdDatabaseGenerator diff --git a/app-emulation/virtualbox/files/virtualbox-6.1.26-configure-include-qt5-path.patch b/app-emulation/virtualbox/files/virtualbox-6.1.26-configure-include-qt5-path.patch new file mode 100644 index 000000000000..57752c4bbd85 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-6.1.26-configure-include-qt5-path.patch @@ -0,0 +1,15 @@ +https://www.virtualbox.org/changeset/90377/vbox +https://bugs.gentoo.org/805350 +https://bugs.gentoo.org/805365 + +--- VirtualBox-6.1.26/configure ++++ VirtualBox-6.1.26/configure +@@ -1624,6 +1624,8 @@ EOF + else + # Strip .../QtCore as we add components ourself: + INCQT5=`echo "$INCQT5"|$KBUILD_SED 's|\([^ ]*\)/QtCore|\1|g; s| $||g'` ++ # Strip .../QtGui as we add components ourself: ++ INCQT5=`echo "$INCQT5"|$KBUILD_SED 's|\([^ ]*\)/QtGui|\1|g; s| $||g'` + # store only the first path, remove all other paths + # most likely pkg-config gave us -I/usr/include/qt5 -I/usr/include/qt5/QtCore + INCQT5=`echo "$INCQT5"|$KBUILD_SED 's|\([^ ]*\) .*|\1|'` diff --git a/app-emulation/virtualbox/files/virtualbox-6.1.32-cipher_openssl.patch b/app-emulation/virtualbox/files/virtualbox-6.1.32-cipher_openssl.patch new file mode 100644 index 000000000000..24431dcea28b --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-6.1.32-cipher_openssl.patch @@ -0,0 +1,39 @@ +diff -urN VirtualBox-6.1.32.orig/src/VBox/Runtime/common/crypto/cipher-openssl.cpp VirtualBox-6.1.32/src/VBox/Runtime/common/crypto/cipher-openssl.cpp +--- VirtualBox-6.1.32.orig/src/VBox/Runtime/common/crypto/cipher-openssl.cpp 2022-04-03 18:44:50.536193454 +0200 ++++ VirtualBox-6.1.32/src/VBox/Runtime/common/crypto/cipher-openssl.cpp 2022-04-03 18:45:46.308189732 +0200 +@@ -211,7 +211,7 @@ + * Allocate and initialize the cipher context. + */ + int rc = VERR_NO_MEMORY; +-# if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER) ++# if OPENSSL_VERSION_NUMBER >= 0x10100000 + EVP_CIPHER_CTX *pCipherCtx = EVP_CIPHER_CTX_new(); + if (pCipherCtx) + # else +@@ -251,7 +251,7 @@ + else + rc = VERR_CR_CIPHER_OSSL_ENCRYPT_INIT_FAILED; + +-# if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER) ++# if OPENSSL_VERSION_NUMBER >= 0x10100000 + EVP_CIPHER_CTX_free(pCipherCtx); + # else + EVP_CIPHER_CTX_cleanup(&CipherCtx); +@@ -295,7 +295,7 @@ + * Allocate and initialize the cipher context. + */ + int rc = VERR_NO_MEMORY; +-# if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER) ++# if OPENSSL_VERSION_NUMBER >= 0x10100000 + EVP_CIPHER_CTX *pCipherCtx = EVP_CIPHER_CTX_new(); + if (pCipherCtx) + # else +@@ -335,7 +335,7 @@ + else + rc = VERR_CR_CIPHER_OSSL_DECRYPT_INIT_FAILED; + +-# if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER) ++# if OPENSSL_VERSION_NUMBER >= 0x10100000 + EVP_CIPHER_CTX_free(pCipherCtx); + # else + EVP_CIPHER_CTX_cleanup(&CipherCtx); diff --git a/app-emulation/virtualbox/files/virtualbox-6.1.32-digest_builtin.patch b/app-emulation/virtualbox/files/virtualbox-6.1.32-digest_builtin.patch new file mode 100644 index 000000000000..5a7c8b340a75 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-6.1.32-digest_builtin.patch @@ -0,0 +1,12 @@ +diff -urN VirtualBox-6.1.32.orig/src/VBox/Runtime/common/crypto/digest-builtin.cpp VirtualBox-6.1.32/src/VBox/Runtime/common/crypto/digest-builtin.cpp +--- VirtualBox-6.1.32.orig/src/VBox/Runtime/common/crypto/digest-builtin.cpp 2022-04-03 18:19:16.858295805 +0200 ++++ VirtualBox-6.1.32/src/VBox/Runtime/common/crypto/digest-builtin.cpp 2022-04-03 18:19:46.639293817 +0200 +@@ -736,7 +736,7 @@ + NULL, + RTDIGESTTYPE_UNKNOWN, + EVP_MAX_MD_SIZE, +-# if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER) ++# if OPENSSL_VERSION_NUMBER >= 0x10100000 + 0, + # else + sizeof(EVP_MD_CTX), diff --git a/app-emulation/virtualbox/files/virtualbox-6.1.32-key_openssl.patch b/app-emulation/virtualbox/files/virtualbox-6.1.32-key_openssl.patch new file mode 100644 index 000000000000..189e2d360f15 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-6.1.32-key_openssl.patch @@ -0,0 +1,30 @@ +diff -urN VirtualBox-6.1.32.orig/src/VBox/Runtime/common/crypto/key-openssl.cpp VirtualBox-6.1.32/src/VBox/Runtime/common/crypto/key-openssl.cpp +--- VirtualBox-6.1.32.orig/src/VBox/Runtime/common/crypto/key-openssl.cpp 2022-04-03 19:17:13.868063764 +0200 ++++ VirtualBox-6.1.32/src/VBox/Runtime/common/crypto/key-openssl.cpp 2022-04-03 19:18:07.175060207 +0200 +@@ -79,7 +79,7 @@ + "Unknown public key algorithm [OpenSSL]: %s", pszAlgoObjId); + const char *pszAlgoSn = OBJ_nid2sn(iAlgoNid); + +-# if OPENSSL_VERSION_NUMBER >= 0x10001000 && !defined(LIBRESSL_VERSION_NUMBER) ++# if OPENSSL_VERSION_NUMBER >= 0x10001000 + int idAlgoPkey = 0; + int idAlgoMd = 0; + if (!OBJ_find_sigid_algs(iAlgoNid, &idAlgoMd, &idAlgoPkey)) +@@ -110,7 +110,7 @@ + return RTErrInfoSetF(pErrInfo, VERR_NO_MEMORY, "EVP_PKEY_new(%d) failed", iAlgoNid); + + int rc; +-# if OPENSSL_VERSION_NUMBER >= 0x10001000 && !defined(LIBRESSL_VERSION_NUMBER) ++# if OPENSSL_VERSION_NUMBER >= 0x10001000 + if (EVP_PKEY_set_type(pEvpNewKey, idAlgoPkey)) + { + int idKeyType = EVP_PKEY_base_id(pEvpNewKey); +@@ -137,7 +137,7 @@ + fNeedPublic ? "d2i_PublicKey failed" : "d2i_PrivateKey failed"); + } + else +-# if OPENSSL_VERSION_NUMBER < 0x10001000 || defined(LIBRESSL_VERSION_NUMBER) ++# if OPENSSL_VERSION_NUMBER < 0x10001000 + rc = RTErrInfoSetF(pErrInfo, VERR_CR_PKIX_OSSL_EVP_PKEY_TYPE_ERROR, "EVP_PKEY_type() failed"); + # else + rc = RTErrInfoSetF(pErrInfo, VERR_CR_PKIX_OSSL_EVP_PKEY_TYPE_ERROR, "EVP_PKEY_base_id() failed"); diff --git a/app-emulation/virtualbox/files/virtualbox-6.1.32-ssl.patch b/app-emulation/virtualbox/files/virtualbox-6.1.32-ssl.patch new file mode 100644 index 000000000000..311e9d123aa4 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-6.1.32-ssl.patch @@ -0,0 +1,81 @@ +diff -urN VirtualBox-6.1.32.orig/src/VBox/RDP/client-1.8.4/ssl.c VirtualBox-6.1.32/src/VBox/RDP/client-1.8.4/ssl.c +--- VirtualBox-6.1.32.orig/src/VBox/RDP/client-1.8.4/ssl.c 2022-04-03 17:45:07.448432573 +0200 ++++ VirtualBox-6.1.32/src/VBox/RDP/client-1.8.4/ssl.c 2022-04-03 17:47:56.163421314 +0200 +@@ -97,7 +97,7 @@ + rdssl_rsa_encrypt(uint8 * out, uint8 * in, int len, uint32 modulus_size, uint8 * modulus, + uint8 * exponent) + { +-#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER) ++#if OPENSSL_VERSION_NUMBER >= 0x10100000 + BN_CTX *ctx; + BIGNUM *mod, *exp, *x, *y; + uint8 inr[SEC_MAX_MODULUS_SIZE]; +@@ -128,7 +128,7 @@ + BN_free(exp); + BN_free(mod); + BN_CTX_free(ctx); +-#else /* OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER) */ ++#else /* OPENSSL_VERSION_NUMBER < 0x10100000 */ + BN_CTX *ctx; + BIGNUM mod, exp, x, y; + uint8 inr[SEC_MAX_MODULUS_SIZE]; +@@ -159,7 +159,7 @@ + BN_free(&exp); + BN_free(&mod); + BN_CTX_free(ctx); +-#endif /* OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER) */ ++#endif /* OPENSSL_VERSION_NUMBER < 0x10100000 */ + } + + /* returns newly allocated RDSSL_CERT or NULL */ +@@ -183,7 +183,7 @@ + EVP_PKEY *epk = NULL; + RDSSL_RKEY *lkey; + int nid; +-#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER) ++#if OPENSSL_VERSION_NUMBER >= 0x10100000 + int ret; + + /* By some reason, Microsoft sets the OID of the Public RSA key to +@@ -217,7 +217,7 @@ + X509_PUBKEY_set0_param(key, OBJ_nid2obj(NID_rsaEncryption), + 0, NULL, NULL, 0); + } +-#else /* OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER) */ ++#else /* OPENSSL_VERSION_NUMBER < 0x10100000 */ + nid = OBJ_obj2nid(cert->cert_info->key->algor->algorithm); + if ((nid == NID_md5WithRSAEncryption) || (nid == NID_shaWithRSAEncryption)) + { +@@ -225,7 +225,7 @@ + ASN1_OBJECT_free(cert->cert_info->key->algor->algorithm); + cert->cert_info->key->algor->algorithm = OBJ_nid2obj(NID_rsaEncryption); + } +-#endif /* OPENSSL_VERSION_NUMBER < 0x10100000 || && defined(LIBRESSL_VERSION_NUMBER) */ ++#endif /* OPENSSL_VERSION_NUMBER < 0x10100000 */ + epk = X509_get_pubkey(cert); + if (NULL == epk) + { +@@ -274,7 +274,7 @@ + { + int len; + +-#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER) ++#if OPENSSL_VERSION_NUMBER >= 0x10100000 + const BIGNUM *e, *n; + RSA_get0_key(rkey, &n, &e, NULL); + if ((BN_num_bytes(e) > (int) max_exp_len) || +@@ -316,12 +316,12 @@ + rdssl_hmac_md5(const void *key, int key_len, const unsigned char *msg, int msg_len, + unsigned char *md) + { +-#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER) ++#if OPENSSL_VERSION_NUMBER < 0x10100000 + HMAC_CTX ctx; + HMAC_CTX_init(&ctx); + #endif + HMAC(EVP_md5(), key, key_len, msg, msg_len, md, NULL); +-#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER) ++#if OPENSSL_VERSION_NUMBER < 0x10100000 + HMAC_CTX_cleanup(&ctx); + #endif + } diff --git a/app-emulation/virtualbox/files/virtualbox-6.1.34-r3-python.patch b/app-emulation/virtualbox/files/virtualbox-6.1.34-r3-python.patch new file mode 100644 index 000000000000..3a6da1f681c1 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-6.1.34-r3-python.patch @@ -0,0 +1,14 @@ +diff --git a/configure b/configure +index fd2e296..695f6a7 100755 +--- a/configure ++++ b/configure +@@ -1987,6 +1987,9 @@ check_python() + { + test_header "Python support" + ++ # We force the right implementation in the ebuild instead ++ return ++ + # On darwin this is a on/off decision only + if [ "$OS" = "darwin" ]; then + echo "enabled" diff --git a/app-emulation/virtualbox/files/virtualbox-6.1.36-fcf-protection.patch b/app-emulation/virtualbox/files/virtualbox-6.1.36-fcf-protection.patch new file mode 100644 index 000000000000..14b11f734c71 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-6.1.36-fcf-protection.patch @@ -0,0 +1,16 @@ +Bug https://bugs.gentoo.org/865361 + +gcc does not support -fcf-protection for i386 (needs i686+), +so disable it when building iPxeBaseBin. + +--- a/src/VBox/Devices/PC/ipxe/Makefile.kmk ++++ b/src/VBox/Devices/PC/ipxe/Makefile.kmk +@@ -176,6 +177,8 @@ + + iPxeBaseBin_TEMPLATE = iPxe + ++ iPxeBaseBin_CFLAGS = -fcf-protection=none ++ + iPxeBaseBin_INCS = \ + src \ + src/include \ diff --git a/app-emulation/virtualbox/files/virtualbox-6.1.36-python3.10.patch b/app-emulation/virtualbox/files/virtualbox-6.1.36-python3.10.patch new file mode 100644 index 000000000000..90157ada7d96 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-6.1.36-python3.10.patch @@ -0,0 +1,16 @@ +https://github.com/archlinux/svntogit-community/blob/b103146beee8b7c70d04685033a8536aed2e5aea/trunk/002-python310.patch +https://github.com/archlinux/svntogit-community/blob/b103146beee8b7c70d04685033a8536aed2e5aea/trunk/003-pyunicode.patch + +https://www.virtualbox.org/changeset/90537/vbox +https://www.virtualbox.org/changeset/86623/vbox +--- a/src/libs/xpcom18a4/python/src/PyXPCOM.h ++++ b/src/libs/xpcom18a4/python/src/PyXPCOM.h +@@ -137,7 +137,7 @@ + # define PyInt_Check(o) PyLong_Check(o) + # define PyInt_AsLong(o) PyLong_AsLong(o) + # define PyNumber_Int(o) PyNumber_Long(o) +-# if PY_VERSION_HEX <= 0x03030000 /* 3.3 added PyUnicode_AsUTF8AndSize */ ++# if !defined(Py_LIMITED_API) && PY_VERSION_HEX <= 0x03030000 /* 3.3 added PyUnicode_AsUTF8AndSize */ + # ifndef PyUnicode_AsUTF8 + # define PyUnicode_AsUTF8(o) _PyUnicode_AsString(o) + # endif diff --git a/app-emulation/virtualbox/files/virtualbox-7.0.0-fix-compilation-clang.patch b/app-emulation/virtualbox/files/virtualbox-7.0.0-fix-compilation-clang.patch new file mode 100644 index 000000000000..c3e34f875acd --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-7.0.0-fix-compilation-clang.patch @@ -0,0 +1,44 @@ +clang does not have syslimits.h, it is gcc specific +and it is useless anyway since <limits.h> is already included +so just remove it + +Cannot use PFNRT here on clang because of the exception specification + +--- a/src/VBox/ExtPacks/VBoxDTrace/include/VBoxDTraceLibCWrappers.h ++++ b/src/VBox/ExtPacks/VBoxDTrace/include/VBoxDTraceLibCWrappers.h +@@ -34,8 +34,6 @@ + # include <limits.h> /* Workaround for syslimit.h bug in gcc 4.8.3 on gentoo. */ + # ifdef RT_OS_DARWIN + # include <sys/syslimits.h> /* PATH_MAX */ +-# elif !defined(RT_OS_SOLARIS) && !defined(RT_OS_FREEBSD) +-# include <syslimits.h> /* PATH_MAX */ + # endif + # include <libgen.h> /* basename */ + # include <unistd.h> +--- a/src/VBox/Devices/Graphics/DevVGA-SVGA3d-glLdr.h ++++ b/src/VBox/Devices/Graphics/DevVGA-SVGA3d-glLdr.h +@@ -97,7 +97,11 @@ + /** Load OpenGL library and initialize function pointers. */ + int glLdrInit(PPDMDEVINS pDevIns); + /** Resolve an OpenGL function name. */ ++#ifdef __clang__ ++void* glLdrGetProcAddress(const char *pszSymbol); ++#else // !__clang__ + PFNRT glLdrGetProcAddress(const char *pszSymbol); ++#endif // !__clang__ + /** Get pointers to extension function. They are available on Windows only when OpenGL context is set. */ + int glLdrGetExtFunctions(PPDMDEVINS pDevIns); + +--- a/src/VBox/Devices/Graphics/DevVGA-SVGA3d-glLdr.cpp ++++ b/src/VBox/Devices/Graphics/DevVGA-SVGA3d-glLdr.cpp +@@ -35,6 +35,10 @@ + #include <iprt/ldr.h> + #include <iprt/log.h> + ++#ifdef __clang__ ++# define PFNRT void* ++#endif ++ + #ifdef RT_OS_WINDOWS + # define OGLGETPROCADDRESS MyWinGetProcAddress + DECLINLINE(PFNRT) MyWinGetProcAddress(const char *pszSymbol) diff --git a/app-emulation/virtualbox/files/virtualbox-7.0.0-fix-compilation.patch b/app-emulation/virtualbox/files/virtualbox-7.0.0-fix-compilation.patch new file mode 100644 index 000000000000..362e792c9cb9 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-7.0.0-fix-compilation.patch @@ -0,0 +1,56 @@ +Fix compilation if VBOX_WITH_AUDIO_OSS is defined while VBOX_WITH_AUDIO_PULSE and VBOX_WITH_AUDIO_ALSA are not + +Fix compilation if VBOX_WITH_AUDIO_RECORDING is not defined + +--- a/src/VBox/Main/xml/Settings.cpp ++++ b/src/VBox/Main/xml/Settings.cpp +@@ -8931,6 +8931,9 @@ + RTCLock lock(s_mtx); + if (s_enmLinuxDriver == AudioDriverType_Null) + { ++# ifdef VBOX_WITH_AUDIO_OSS ++ s_enmLinuxDriver = AudioDriverType_OSS; ++# endif /* VBOX_WITH_AUDIO_OSS */ + # ifdef VBOX_WITH_AUDIO_PULSE + /* Check for the pulse library & that the pulse audio daemon is running. */ + if (RTProcIsRunningByName("pulseaudio") && +@@ -8943,10 +8946,7 @@ + if (RTLdrIsLoadable("libasound.so.2")) + s_enmLinuxDriver = AudioDriverType_ALSA; + # endif /* VBOX_WITH_AUDIO_ALSA */ +-# ifdef VBOX_WITH_AUDIO_OSS +- else +- s_enmLinuxDriver = AudioDriverType_OSS; +-# endif /* VBOX_WITH_AUDIO_OSS */ ++ ; + } + return s_enmLinuxDriver; + +--- a/src/VBox/Main/src-client/RecordingInternals.cpp ++++ b/src/VBox/Main/src-client/RecordingInternals.cpp +@@ -139,7 +139,9 @@ + switch (pFrame->enmType) + { + case RECORDINGFRAME_TYPE_AUDIO: ++#ifdef VBOX_WITH_AUDIO_RECORDING + recordingAudioFrameDestroy(&pFrame->Audio); ++#endif // VBOX_WITH_AUDIO_RECORDING + break; + + case RECORDINGFRAME_TYPE_VIDEO: +--- a/src/VBox/Main/src-client/Recording.cpp ++++ b/src/VBox/Main/src-client/Recording.cpp +@@ -836,11 +836,13 @@ + + if (m_enmState == RECORDINGSTS_STARTED) + { ++#ifdef VBOX_WITH_AUDIO_RECORDING + if ( recordingCodecIsInitialized(&m_CodecAudio) + && recordingCodecGetWritable(&m_CodecAudio, msTimestamp) > 0) + { + fNeedsUpdate = true; + } ++#endif // VBOX_WITH_AUDIO_RECORDING + + if (!fNeedsUpdate) + { diff --git a/app-emulation/virtualbox/files/virtualbox-7.0.0-python3_11.patch b/app-emulation/virtualbox/files/virtualbox-7.0.0-python3_11.patch new file mode 100644 index 000000000000..cbdc1e1e2ad1 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-7.0.0-python3_11.patch @@ -0,0 +1,90 @@ +Add support for python 3.11 + +Virtualbox 7.0.0 will only build a lib named VBoxPython3.so, regardless of the +actual python version used when compiling. Remove VBoxPython3m.so, we don't +use it. + +--- a/src/libs/xpcom18a4/python/Makefile.kmk ++++ b/src/libs/xpcom18a4/python/Makefile.kmk +@@ -30,7 +30,7 @@ + + # + # List of supported Python versions, defining a number of +-# VBOX_PYTHON[26|27|31|32|32M|33|33M|34|34M|35|35M|36|36M|37|37M|38|38M|39|39M|310|310M|DEF]_[INC|LIB] variables ++# VBOX_PYTHON[26|27|31|32|32M|33|33M|34|34M|35|35M|36|36M|37|37M|38|38M|39|39M|310|310M|311|311M|DEF]_[INC|LIB] variables + # which get picked up below. + # + ifeq ($(KBUILD_TARGET),darwin) # Relatively predictable, don't script. +@@ -702,6 +702,52 @@ + endif + endif + ++ifdef VBOX_PYTHON311_INC ++# ++# Python 3.11 version ++# ++DLLS += VBoxPython3_11 ++VBoxPython3_11_EXTENDS = VBoxPythonBase ++VBoxPython3_11_EXTENDS_BY = appending ++VBoxPython3_11_TEMPLATE = XPCOM ++VBoxPython3_11_INCS = $(VBOX_PYTHON311_INC) ++VBoxPython3_11_LIBS = $(VBOX_PYTHON311_LIB) ++ ++ ifdef VBOX_WITH_32_ON_64_MAIN_API ++ ifdef VBOX_PYTHON311_LIB_X86 ++DLLS += VBoxPython3_11_x86 ++VBoxPython3_11_x86_EXTENDS = VBoxPythonBase_x86 ++VBoxPython3_11_x86_EXTENDS_BY = appending ++VBoxPython3_11_x86_TEMPLATE = XPCOM ++VBoxPython3_11_x86_INCS = $(VBOX_PYTHON311_INC) ++VBoxPython3_11_x86_LIBS = $(VBOX_PYTHON311_LIB_X86) ++ endif ++ endif ++endif ++ ++ifdef VBOX_PYTHON311M_INC ++# ++# Python 3.11 version with pymalloc ++# ++DLLS += VBoxPython3_11m ++VBoxPython3_11m_EXTENDS = VBoxPythonBase_m ++VBoxPython3_11m_EXTENDS_BY = appending ++VBoxPython3_11m_TEMPLATE = XPCOM ++VBoxPython3_11m_INCS = $(VBOX_PYTHON311M_INC) ++VBoxPython3_11m_LIBS = $(VBOX_PYTHON311M_LIB) ++ ++ ifdef VBOX_WITH_32_ON_64_MAIN_API ++ ifdef VBOX_PYTHON311M_LIB_X86 ++DLLS += VBoxPython3_11m_x86 ++VBoxPython3_11m_x86_EXTENDS = VBoxPythonBase_x86_m ++VBoxPython3_11m_x86_EXTENDS_BY = appending ++VBoxPython3_11m_x86_TEMPLATE_ = XPCOM ++VBoxPython3_11m_x86_INCS = $(VBOX_PYTHON311M_INC) ++VBoxPython3_11m_x86_LIBS = $(VBOX_PYTHON311M_LIB_X86) ++ endif ++ endif ++endif ++ + ifdef VBOX_PYTHONDEF_INC + # + # Python without versioning +@@ -744,18 +790,13 @@ + # TODO: ASSUMING that we don't need a different headers for pymalloc + # ('m' builds < 3.8) and CRT malloc. + # +-VBOX_PYTHON_LIMITED_API_VER := $(firstword $(foreach ver, 35 36 38 39 310 34 33 \ ++VBOX_PYTHON_LIMITED_API_VER := $(firstword $(foreach ver, 35 36 38 39 310 311 34 33 \ + ,$(if-expr defined(VBOX_PYTHON$(ver)_INC),$(ver),)$(if-expr defined(VBOX_PYTHON$(ver)M_INC),$(ver)M,))) + ifneq ($(VBOX_PYTHON_LIMITED_API_VER),) + DLLS += VBoxPython3 + VBoxPython3_EXTENDS = VBoxPythonBase + VBoxPython3_DEFS = $(filter-out VBOX_PYXPCOM_VERSIONED,$(VBoxPythonBase_DEFS)) Py_LIMITED_API=0x03030000 + VBoxPython3_INCS = $(VBoxPythonBase_INCS) $(VBOX_PYTHON$(VBOX_PYTHON_LIMITED_API_VER)_INC) +- +-DLLS += VBoxPython3m +-VBoxPython3m_EXTENDS = VBoxPythonBase_m +-VBoxPython3m_DEFS = $(filter-out VBOX_PYXPCOM_VERSIONED,$(VBoxPythonBase_m_DEFS)) Py_LIMITED_API=0x03030000 +-VBoxPython3m_INCS = $(VBoxPythonBase_m_INCS) $(VBOX_PYTHON$(VBOX_PYTHON_LIMITED_API_VER)_INC) + endif + endif # VBOX_WITH_PYTHON_LIMITED_API + diff --git a/app-emulation/virtualbox/files/virtualbox-7.0.10-fix-binutils-hardened.patch b/app-emulation/virtualbox/files/virtualbox-7.0.10-fix-binutils-hardened.patch new file mode 100644 index 000000000000..1a5f85f89ff8 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-7.0.10-fix-binutils-hardened.patch @@ -0,0 +1,35 @@ +Fix building with sys-devel/binutils-2.41-r1[hardened]: read-only segment has dynamic relocations. +https://bugs.gentoo.org/913109 + +--- a/src/VBox/Runtime/Makefile.kmk ++++ b/src/VBox/Runtime/Makefile.kmk +@@ -3238,6 +3238,7 @@ + endif + endif + RuntimeR0_INCS = include ++RuntimeR0_LDFLAGS.linux = -z notext + RuntimeR0_SOURCES := \ + $(if $(VBOX_ONLY_VALIDATIONKIT),,../VMM/VBoxVMM.d) \ + common/checksum/crc32c.cpp \ +--- a/src/VBox/VMM/Makefile.kmk ++++ b/src/VBox/VMM/Makefile.kmk +@@ -603,6 +603,8 @@ + VMMR0_DEFS.darwin.amd64 += VBOX_WITH_NATIVE_NEM VBOX_WITH_NEM_R0 + endif + ++ VMMR0_LDFLAGS.linux += -z notext ++ + $(call VBOX_SET_VER_INFO_R0,VMMR0,VirtualBox VMM - ring-0 context parts) # Version info / description. + + if "$(USERNAME)" == "bird" && "$(KBUILD_TARGET)" == "win" +--- a/src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk ++++ b/src/VBox/ExtPacks/VBoxDTrace/Makefile.kmk +@@ -258,7 +258,7 @@ + VBoxDTraceR0_TEMPLATE = VBoxR0ExtPackDTrace + VBoxDTraceR0_DEFS = IN_VBOXDTRACE_R0 IN_RT_R0 + ifeq ($(VBOX_LDR_FMT),elf) +- VBoxDTraceR0_LDFLAGS = -e ModuleInit ++ VBoxDTraceR0_LDFLAGS = -e ModuleInit -z notext + endif + VBoxDTraceR0_INCS = \ + include \ diff --git a/app-emulation/virtualbox/files/virtualbox-7.0.10-key_openssl.patch b/app-emulation/virtualbox/files/virtualbox-7.0.10-key_openssl.patch new file mode 100644 index 000000000000..121a35e2888c --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-7.0.10-key_openssl.patch @@ -0,0 +1,30 @@ +diff -urN VirtualBox-7.0.10.orig/src/VBox/Runtime/common/crypto/key-openssl.cpp VirtualBox-7.0.10/src/VBox/Runtime/common/crypto/key-openssl.cpp +--- VirtualBox-7.0.10.orig/src/VBox/Runtime/common/crypto/key-openssl.cpp 2023-08-01 18:40:55.093173560 +0200 ++++ VirtualBox-7.0.10/src/VBox/Runtime/common/crypto/key-openssl.cpp 2023-08-01 18:41:29.896171237 +0200 +@@ -264,7 +264,7 @@ + "Unknown public key algorithm [OpenSSL]: %s", pszAlgoObjId); + const char *pszAlgoSn = OBJ_nid2sn(iAlgoNid); + +-# if OPENSSL_VERSION_NUMBER >= 0x10001000 && !defined(LIBRESSL_VERSION_NUMBER) ++# if OPENSSL_VERSION_NUMBER >= 0x10001000 + int idAlgoPkey = 0; + int idAlgoMd = 0; + if (!OBJ_find_sigid_algs(iAlgoNid, &idAlgoMd, &idAlgoPkey)) +@@ -295,7 +295,7 @@ + return RTERRINFO_LOG_SET_F(pErrInfo, VERR_NO_MEMORY, "EVP_PKEY_new(%d) failed", iAlgoNid); + + int rc; +-# if OPENSSL_VERSION_NUMBER >= 0x10001000 && !defined(LIBRESSL_VERSION_NUMBER) ++# if OPENSSL_VERSION_NUMBER >= 0x10001000 + if (EVP_PKEY_set_type(pEvpNewKey, idAlgoPkey)) + { + int idKeyType = EVP_PKEY_base_id(pEvpNewKey); +@@ -316,7 +316,7 @@ + } + } + else +-# if OPENSSL_VERSION_NUMBER < 0x10001000 || defined(LIBRESSL_VERSION_NUMBER) ++# if OPENSSL_VERSION_NUMBER < 0x10001000 + rc = RTERRINFO_LOG_SET(pErrInfo, VERR_CR_PKIX_OSSL_EVP_PKEY_TYPE_ERROR, "EVP_PKEY_type() failed"); + # else + rc = RTERRINFO_LOG_SET(pErrInfo, VERR_CR_PKIX_OSSL_EVP_PKEY_TYPE_ERROR, "EVP_PKEY_base_id() failed"); diff --git a/app-emulation/virtualbox/files/virtualbox-7.0.10-python.patch b/app-emulation/virtualbox/files/virtualbox-7.0.10-python.patch new file mode 100644 index 000000000000..f972580cb6c5 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-7.0.10-python.patch @@ -0,0 +1,18 @@ +Virtualbox 7.x will only build a lib named VBoxPython3.so, regardless of the +actual python version used when compiling. Remove VBoxPython3m.so, we don't +use it. + +--- a/src/libs/xpcom18a4/python/Makefile.kmk ++++ b/src/libs/xpcom18a4/python/Makefile.kmk +@@ -693,11 +693,6 @@ + VBoxPython3_EXTENDS = VBoxPythonBase + VBoxPython3_DEFS = $(filter-out VBOX_PYXPCOM_VERSIONED,$(VBoxPythonBase_DEFS)) Py_LIMITED_API=0x03030000 + VBoxPython3_INCS = $(VBoxPythonBase_INCS) $(VBOX_PYTHON$(VBOX_PYTHON_LIMITED_API_VER)_INC) +- +- DLLS += VBoxPython3m +- VBoxPython3m_EXTENDS = VBoxPythonBase_m +- VBoxPython3m_DEFS = $(filter-out VBOX_PYXPCOM_VERSIONED,$(VBoxPythonBase_m_DEFS)) Py_LIMITED_API=0x03030000 +- VBoxPython3m_INCS = $(VBoxPythonBase_m_INCS) $(VBOX_PYTHON$(VBOX_PYTHON_LIMITED_API_VER)_INC) + endif + endif # VBOX_WITH_PYTHON_LIMITED_API + diff --git a/app-emulation/virtualbox/files/virtualbox-7.0.14-gcc-13.patch b/app-emulation/virtualbox/files/virtualbox-7.0.14-gcc-13.patch new file mode 100644 index 000000000000..21e930ee3e40 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-7.0.14-gcc-13.patch @@ -0,0 +1,39 @@ +diff -urN VirtualBox-7.0.14.orig/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibRuntimeXF86.cpp VirtualBox-7.0.14/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibRuntimeXF86.cpp +--- VirtualBox-7.0.14.orig/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibRuntimeXF86.cpp 2024-02-04 10:54:27.553691648 +0100 ++++ VirtualBox-7.0.14/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibRuntimeXF86.cpp 2024-02-04 10:58:38.067674930 +0100 +@@ -46,6 +46,9 @@ + #if defined(VBOX_VBGLR3_XFREE86) + extern "C" { + # define XFree86LOADER ++# ifdef RT_GNUC_PREREQ(13,0) /* cmath gets dragged in and the c++/13/cmath header is allergic to -ffreestanding. */ ++# define _GLIBCXX_INCLUDE_NEXT_C_HEADERS ++# endif + # include <xf86_ansic.h> + # undef size_t + } +diff -urN VirtualBox-7.0.14.orig/src/libs/dxvk-native-1.9.2a/src/util/util_matrix.cpp VirtualBox-7.0.14/src/libs/dxvk-native-1.9.2a/src/util/util_matrix.cpp +--- VirtualBox-7.0.14.orig/src/libs/dxvk-native-1.9.2a/src/util/util_matrix.cpp 2024-02-04 10:54:26.768691700 +0100 ++++ VirtualBox-7.0.14/src/libs/dxvk-native-1.9.2a/src/util/util_matrix.cpp 2024-02-04 10:59:43.906670536 +0100 +@@ -1,3 +1,5 @@ ++#include <cstdint> ++ + #include "util_matrix.h" + + namespace dxvk { +@@ -229,4 +231,4 @@ + return os; + } + +-} +\ No newline at end of file ++} +diff -urN VirtualBox-7.0.14.orig/src/libs/dxvk-native-1.9.2a/src/util/util_vector.h VirtualBox-7.0.14/src/libs/dxvk-native-1.9.2a/src/util/util_vector.h +--- VirtualBox-7.0.14.orig/src/libs/dxvk-native-1.9.2a/src/util/util_vector.h 2024-02-04 10:54:26.767691700 +0100 ++++ VirtualBox-7.0.14/src/libs/dxvk-native-1.9.2a/src/util/util_vector.h 2024-02-04 11:00:13.690668548 +0100 +@@ -1,5 +1,6 @@ + #pragma once + ++#include <cstdint> + #include <iostream> + + #include "util_bit.h" diff --git a/app-emulation/virtualbox/files/virtualbox-7.0.2-cipher_openssl.patch b/app-emulation/virtualbox/files/virtualbox-7.0.2-cipher_openssl.patch new file mode 100644 index 000000000000..a75e5e3bce6d --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-7.0.2-cipher_openssl.patch @@ -0,0 +1,30 @@ +diff -urN VirtualBox-7.0.2.orig/src/VBox/Runtime/common/crypto/cipher-openssl.cpp VirtualBox-7.0.2/src/VBox/Runtime/common/crypto/cipher-openssl.cpp +--- VirtualBox-7.0.2.orig/src/VBox/Runtime/common/crypto/cipher-openssl.cpp 2022-11-08 21:24:29.464765085 +0100 ++++ VirtualBox-7.0.2/src/VBox/Runtime/common/crypto/cipher-openssl.cpp 2022-11-08 21:26:59.593755066 +0100 +@@ -236,7 +236,7 @@ + AssertReturn(hCipherCtx, VERR_INVALID_PARAMETER); + RTCRCIPHERCTXINT *pCtx = hCipherCtx; + +-# if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER) ++# if OPENSSL_VERSION_NUMBER >= 0x10100000 + EVP_CIPHER_CTX_free(pCtx->pCipherCtx); + # else + EVP_CIPHER_CTX_cleanup(pCtx->pCipherCtx); +@@ -280,7 +280,7 @@ + { + pCtx->phCipher = hCipher; + pCtx->fDecryption = false; +-# if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER) ++# if OPENSSL_VERSION_NUMBER >= 0x10100000 + pCtx->pCipherCtx = EVP_CIPHER_CTX_new(); + if (pCtx->pCipherCtx) + # else +@@ -402,7 +402,7 @@ + { + pCtx->phCipher = hCipher; + pCtx->fDecryption = true; +-# if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER) ++# if OPENSSL_VERSION_NUMBER >= 0x10100000 + pCtx->pCipherCtx = EVP_CIPHER_CTX_new(); + # else + pCtx->pCipherCtx = (EVP_CIPHER_CTX *)RTMemAllocZ(sizeof(EVP_CIPHER_CTX)); diff --git a/app-emulation/virtualbox/files/virtualbox-7.0.6-fix-libxml2.patch b/app-emulation/virtualbox/files/virtualbox-7.0.6-fix-libxml2.patch new file mode 100644 index 000000000000..9da2891721d9 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-7.0.6-fix-libxml2.patch @@ -0,0 +1,169 @@ +With dev-libs/libxml2-2.11, xi:include errors out if it can't find a file, so add an empty fallback. +Used to work with dev-libs/libxml2-2.10. + +Upstream has removed user_ and overview_ altogether in the next release as part of a larger docs change, +so this no longer applies. + +See also: https://bugs.gentoo.org/906309 + +--- a/doc/manual/en_US/user_VBoxManage.xml ++++ b/doc/manual/en_US/user_VBoxManage.xml +@@ -242,107 +242,107 @@ + on your particular host. + </para> + +- <xi:include href="overview_man_VBoxManage-common.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-common.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-list.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-list.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-showvminfo.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-showvminfo.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-registervm.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-registervm.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-unregistervm.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-unregistervm.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-createvm.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-createvm.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-modifyvm.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-modifyvm.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-clonevm.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-clonevm.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-movevm.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-movevm.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-encryptvm.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-encryptvm.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-cloud.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-cloud.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-cloudprofile.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-cloudprofile.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-import.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-import.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-export.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-export.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-signova.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-signova.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-startvm.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-startvm.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-controlvm.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-controlvm.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-unattended.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-unattended.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-discardstate.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-discardstate.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-adoptstate.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-adoptstate.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-snapshot.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-snapshot.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-closemedium.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-closemedium.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-storageattach.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-storageattach.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-storagectl.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-storagectl.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-bandwidthctl.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-bandwidthctl.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-showmediuminfo.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-showmediuminfo.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-createmedium.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-createmedium.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-modifymedium.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-modifymedium.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-clonemedium.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-clonemedium.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-mediumproperty.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-mediumproperty.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-encryptmedium.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-encryptmedium.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-checkmediumpwd.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-checkmediumpwd.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-convertfromraw.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-convertfromraw.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-mediumio.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-mediumio.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-setextradata.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-setextradata.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-getextradata.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-getextradata.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-setproperty.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-setproperty.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-usbfilter.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-usbfilter.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-sharedfolder.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-sharedfolder.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-guestproperty.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-guestproperty.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-guestcontrol.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-guestcontrol.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-debugvm.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-debugvm.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-metrics.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-metrics.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-natnetwork.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-natnetwork.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-hostonlyif.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-hostonlyif.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-hostonlynet.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-hostonlynet.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-dhcpserver.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-dhcpserver.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-usbdevsource.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-usbdevsource.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-extpack.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-extpack.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-updatecheck.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-updatecheck.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + +- <xi:include href="overview_man_VBoxManage-modifynvram.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" /> ++ <xi:include href="overview_man_VBoxManage-modifynvram.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include> + + <para> + Each time <command>VBoxManage</command> is invoked, only one diff --git a/app-emulation/virtualbox/files/virtualbox-7.0.6-gcc-13.patch b/app-emulation/virtualbox/files/virtualbox-7.0.6-gcc-13.patch new file mode 100644 index 000000000000..ed3a2d02fbc0 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-7.0.6-gcc-13.patch @@ -0,0 +1,28 @@ +Add a few missing includes. + +Bug: https://bugs.gentoo.org/892852 + +--- a/src/libs/dxvk-native-1.9.2a/src/util/util_matrix.cpp ++++ b/src/libs/dxvk-native-1.9.2a/src/util/util_matrix.cpp +@@ -1,3 +1,4 @@ ++#include <cstdint> + #include "util_matrix.h" + + namespace dxvk { +@@ -229,4 +230,4 @@ + return os; + } + +-} +\ No newline at end of file ++} +--- a/src/libs/dxvk-native-1.9.2a/src/util/util_vector.h ++++ b/src/libs/dxvk-native-1.9.2a/src/util/util_vector.h +@@ -1,6 +1,7 @@ + #pragma once + + #include <iostream> ++#include <cstdint> + + #include "util_bit.h" + #include "util_math.h" diff --git a/app-emulation/virtualbox/files/virtualbox-7.0.8-mtune-keep-size.patch b/app-emulation/virtualbox/files/virtualbox-7.0.8-mtune-keep-size.patch new file mode 100644 index 000000000000..e37d9d6dcb94 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-7.0.8-mtune-keep-size.patch @@ -0,0 +1,13 @@ +Force -mtune=i386. Random -mtune can lead to iPxeBiosBin.rom getting too +large (larger than 56k). This can happen because we support custom CFLAGS. + +--- a/src/VBox/Devices/PC/ipxe/Makefile.kmk ++++ b/src/VBox/Devices/PC/ipxe/Makefile.kmk +@@ -125,6 +125,7 @@ + -ffreestanding \ + -ffunction-sections \ + -march=i386 \ ++ -mtune=i386 \ + -fomit-frame-pointer \ + -fstrength-reduce \ + -falign-jumps=1 \ diff --git a/app-emulation/virtualbox/files/virtualbox-7.0.8-python3_11.patch b/app-emulation/virtualbox/files/virtualbox-7.0.8-python3_11.patch new file mode 100644 index 000000000000..02fc9c1b12fe --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-7.0.8-python3_11.patch @@ -0,0 +1,86 @@ +Add support for python 3.11 + +Virtualbox 7.0.0 will only build a lib named VBoxPython3.so, regardless of the +actual python version used when compiling. Remove VBoxPython3m.so, we don't +use it. + +--- a/src/libs/xpcom18a4/python/Makefile.kmk ++++ b/src/libs/xpcom18a4/python/Makefile.kmk +@@ -30,7 +30,7 @@ + + # + # List of supported Python versions, defining a number of +-# VBOX_PYTHON[26|27|31|32|32M|33|33M|34|34M|35|35M|36|36M|37|37M|38|38M|39|39M|310|310M|DEF]_[INC|LIB] variables ++# VBOX_PYTHON[26|27|31|32|32M|33|33M|34|34M|35|35M|36|36M|37|37M|38|38M|39|39M|310|310M|311|311M|DEF]_[INC|LIB] variables + # which get picked up below. + # + ifeq ($(KBUILD_TARGET),darwin) # Relatively predictable, don't script. +@@ -665,6 +665,48 @@ + endif + endif + ++ ifdef VBOX_PYTHON311_INC ++ # ++ # Python 3.11 version ++ # ++ DLLS += VBoxPython3_11 ++ VBoxPython3_11_EXTENDS = VBoxPythonBase ++ VBoxPython3_11_EXTENDS_BY = appending ++ VBoxPython3_11_INCS = $(VBOX_PYTHON311_INC) ++ VBoxPython3_11_LIBS = $(VBOX_PYTHON311_LIB) ++ ++ ifdef VBOX_WITH_32_ON_64_MAIN_API ++ ifdef VBOX_PYTHON311_LIB_X86 ++ DLLS += VBoxPython3_11_x86 ++ VBoxPython3_11_x86_EXTENDS = VBoxPythonBase_x86 ++ VBoxPython3_11_x86_EXTENDS_BY = appending ++ VBoxPython3_11_x86_INCS = $(VBOX_PYTHON311_INC) ++ VBoxPython3_11_x86_LIBS = $(VBOX_PYTHON311_LIB_X86) ++ endif ++ endif ++ endif ++ ++ ifdef VBOX_PYTHON311M_INC ++ # ++ # Python 3.11 version with pymalloc ++ # ++ DLLS += VBoxPython3_11m ++ VBoxPython3_11m_EXTENDS = VBoxPythonBase_m ++ VBoxPython3_11m_EXTENDS_BY = appending ++ VBoxPython3_11m_INCS = $(VBOX_PYTHON311M_INC) ++ VBoxPython3_11m_LIBS = $(VBOX_PYTHON311M_LIB) ++ ++ ifdef VBOX_WITH_32_ON_64_MAIN_API ++ ifdef VBOX_PYTHON311M_LIB_X86 ++ DLLS += VBoxPython3_11m_x86 ++ VBoxPython3_11m_x86_EXTENDS = VBoxPythonBase_x86_m ++ VBoxPython3_11m_x86_EXTENDS_BY = appending ++ VBoxPython3_11m_x86_INCS = $(VBOX_PYTHON311M_INC) ++ VBoxPython3_11m_x86_LIBS = $(VBOX_PYTHON311M_LIB_X86) ++ endif ++ endif ++ endif ++ + ifdef VBOX_PYTHONDEF_INC + # + # Python without versioning +@@ -707,18 +749,13 @@ + # TODO: ASSUMING that we don't need a different headers for pymalloc + # ('m' builds < 3.8) and CRT malloc. + # +- VBOX_PYTHON_LIMITED_API_VER := $(firstword $(foreach ver, 35 36 38 39 310 34 33 \ ++ VBOX_PYTHON_LIMITED_API_VER := $(firstword $(foreach ver, 35 36 38 39 310 311 34 33 \ + ,$(if-expr defined(VBOX_PYTHON$(ver)_INC),$(ver),)$(if-expr defined(VBOX_PYTHON$(ver)M_INC),$(ver)M,))) + ifneq ($(VBOX_PYTHON_LIMITED_API_VER),) + DLLS += VBoxPython3 + VBoxPython3_EXTENDS = VBoxPythonBase + VBoxPython3_DEFS = $(filter-out VBOX_PYXPCOM_VERSIONED,$(VBoxPythonBase_DEFS)) Py_LIMITED_API=0x03030000 + VBoxPython3_INCS = $(VBoxPythonBase_INCS) $(VBOX_PYTHON$(VBOX_PYTHON_LIMITED_API_VER)_INC) +- +- DLLS += VBoxPython3m +- VBoxPython3m_EXTENDS = VBoxPythonBase_m +- VBoxPython3m_DEFS = $(filter-out VBOX_PYXPCOM_VERSIONED,$(VBoxPythonBase_m_DEFS)) Py_LIMITED_API=0x03030000 +- VBoxPython3m_INCS = $(VBoxPythonBase_m_INCS) $(VBOX_PYTHON$(VBOX_PYTHON_LIMITED_API_VER)_INC) + endif + endif # VBOX_WITH_PYTHON_LIMITED_API + diff --git a/app-emulation/virtualbox/files/virtualbox-7.2.8-parallel-make.patch b/app-emulation/virtualbox/files/virtualbox-7.2.8-parallel-make.patch deleted file mode 100644 index 799c6b01f0fc..000000000000 --- a/app-emulation/virtualbox/files/virtualbox-7.2.8-parallel-make.patch +++ /dev/null @@ -1,17 +0,0 @@ -Attempt to fix a parallel make issue (code here depends on included sdk/bindings/xpcom - but can run before the sdk is copied to out/linux) - -https://bugs.gentoo.org/973421 -https://bugs.gentoo.org/950489 -https://bugs.gentoo.org/675646 - ---- a/src/VBox/HostServices/SharedFolders/Makefile.kmk -+++ b/src/VBox/HostServices/SharedFolders/Makefile.kmk -@@ -67,5 +67,7 @@ - VBoxSharedFolders_LIBS = \ - $(LIB_RUNTIME) - -+VBoxSharedFolders_DEPS = $(VBOX_PATH_SDK)/bindings/xpcom/include/xpcom/xpcom-config.h -+ - include $(FILE_KBUILD_SUB_FOOTER) - diff --git a/app-emulation/virtualbox/files/virtualbox-ose-5-wrapper b/app-emulation/virtualbox/files/virtualbox-ose-5-wrapper new file mode 100644 index 000000000000..e2249b0e16f9 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-ose-5-wrapper @@ -0,0 +1,113 @@ +#!/bin/sh +## @file +# Oracle VM VirtualBox startup script, Linux hosts. +# + +# +# Copyright (C) 2006-2015 Oracle Corporation +# +# This file is part of VirtualBox Open Source Edition (OSE), as +# available from http://www.virtualbox.org. This file is free software; +# you can redistribute it and/or modify it under the terms of the GNU +# General Public License (GPL) as published by the Free Software +# Foundation, in version 2 as it comes in the "COPYING" file of the +# VirtualBox OSE distribution. VirtualBox OSE is distributed in the +# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. +# + +PATH="/usr/bin:/bin:/usr/sbin:/sbin" +CONFIG="/etc/vbox/vbox.cfg" + +test -r "${CONFIG}" && + . "${CONFIG}" +test -z "${INSTALL_DIR}" && + if test -f /usr/lib/virtualbox/VirtualBox && + test -x /usr/lib/virtualbox/VirtualBox; then + INSTALL_DIR=/usr/lib/virtualbox + else + echo "Could not find VirtualBox installation. Please reinstall." + exit 1 + fi + +# Note: This script must not fail if the module was not successfully installed +# because the user might not want to run a VM but only change VM params! + +if [ "$1" = "shutdown" ]; then + SHUTDOWN="true" +elif ! lsmod|grep -q vboxdrv; then + cat << EOF +WARNING: The vboxdrv kernel module is not loaded. Either there is no module + available for the current kernel (`uname -r`) or it failed to + load. Please recompile the kernel module and install it by + + for m in vbox{drv,netadp,netflt}; do modprobe \$m; done + + You will not be able to start VMs until this problem is fixed. +EOF +elif [ ! -c /dev/vboxdrv ]; then + cat << EOF +WARNING: The character device /dev/vboxdrv does not exist. + Please try to reload all the needed kernel modules by: + + for m in vbox{netflt,netadp,drv}; do rmmod \$m; done + for m in vbox{drv,netadp,netflt}; do modprobe \$m; done + + and if that is not successful, try to re-install the package by: + + emerge -1av app-emulation/virtualbox-modules + + You will not be able to start VMs until this problem is fixed. +EOF +fi + +SERVER_PID=`ps -U \`whoami\` | grep VBoxSVC | awk '{ print $1 }'` +if [ -z "$SERVER_PID" ]; then + # Server not running yet/anymore, cleanup socket path. + # See IPC_GetDefaultSocketPath()! + if [ -n "$LOGNAME" ]; then + rm -rf /tmp/.vbox-$LOGNAME-ipc > /dev/null 2>&1 + else + rm -rf /tmp/.vbox-$USER-ipc > /dev/null 2>&1 + fi +fi + +if [ "$SHUTDOWN" = "true" ]; then + if [ -n "$SERVER_PID" ]; then + kill -TERM $SERVER_PID + sleep 2 + fi + exit 0 +fi + +APP=`basename $0` +case "$APP" in + VirtualBox|virtualbox) + exec "$INSTALL_DIR/VirtualBox" "$@" + ;; + VBoxManage|vboxmanage) + exec "$INSTALL_DIR/VBoxManage" "$@" + ;; + VBoxSDL|vboxsdl) + exec "$INSTALL_DIR/VBoxSDL" "$@" + ;; + VBoxVRDP|VBoxHeadless|vboxheadless) + exec "$INSTALL_DIR/VBoxHeadless" "$@" + ;; + VBoxAutostart|vboxautostart) + exec "$INSTALL_DIR/VBoxAutostart" "$@" + ;; + VBoxBalloonCtrl|vboxballoonctrl) + exec "$INSTALL_DIR/VBoxBalloonCtrl" "$@" + ;; + VBoxDTrace|vboxdtrace) + exec "$INSTALL_DIR/VBoxDTrace" "$@" + ;; + vboxwebsrv) + exec "$INSTALL_DIR/vboxwebsrv" "$@" + ;; + *) + echo "Unknown application - $APP" + exit 1 + ;; +esac +exit 0 diff --git a/app-emulation/virtualbox/files/virtualbox-ose-6-wrapper b/app-emulation/virtualbox/files/virtualbox-ose-6-wrapper index 57b15cc93eba..af8090dd09af 100644 --- a/app-emulation/virtualbox/files/virtualbox-ose-6-wrapper +++ b/app-emulation/virtualbox/files/virtualbox-ose-6-wrapper @@ -60,7 +60,7 @@ WARNING: The character device /dev/vboxdrv does not exist. EOF fi -SERVER_PID=$(ps -U ${LOGNAME:-$USER} | grep VBoxSVC | awk '{ print $1 }') +SERVER_PID=`ps -U \`whoami\` | grep VBoxSVC | awk '{ print $1 }'` if [ -z "$SERVER_PID" ]; then # Server not running yet/anymore, cleanup socket path. # See IPC_GetDefaultSocketPath()! diff --git a/app-emulation/virtualbox/files/virtualbox-ose.desktop-2 b/app-emulation/virtualbox/files/virtualbox-ose.desktop-2 new file mode 100644 index 000000000000..ce798dacbdf3 --- /dev/null +++ b/app-emulation/virtualbox/files/virtualbox-ose.desktop-2 @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=Oracle xVM VirtualBox +Type=Application +Comment=Run several virtual systems on a single host computer +Exec=VirtualBox +TryExec=VirtualBox +Icon=virtualbox +Categories=System;Emulator; diff --git a/app-emulation/virtualbox/metadata.xml b/app-emulation/virtualbox/metadata.xml index 1c5d74ca4ec3..ad9ccdc08fe1 100644 --- a/app-emulation/virtualbox/metadata.xml +++ b/app-emulation/virtualbox/metadata.xml @@ -1,18 +1,25 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> <pkgmetadata> + <maintainer type="project"> + <email>dev@liguros.net</email> + <name>Development</name> + </maintainer> <maintainer type="person"> - <email>ceamac@gentoo.org</email> - <name>Viorel Munteanu</name> + <email>polynomial-c@gentoo.org</email> + <name>Lars Wendler</name> </maintainer> + <upstream> + <remote-id type="cpe">cpe:/a:oracle:vm_virtualbox</remote-id> + </upstream> <use> - <flag name="dtrace">Install dtrace Extension Pack.</flag> + <flag name="dtrace">Install dtrace Extension Pack</flag> + <flag name="headless">Build without any graphic frontend</flag> <flag name="lvm">Build VBoxVolInfo that needs devicemapper from <pkg>sys-fs/lvm2</pkg>.</flag> - <flag name="sdk">Enable building of SDK.</flag> + <flag name="pax_kernel">Apply patch needed for pax enabled kernels.</flag> + <flag name="sdk">Enable building of SDK</flag> <flag name="udev">Controls installation of special USB udev rules.</flag> - <flag name="vboxwebsrv">Build and install the VirtualBox webservice.</flag> - <flag name="vde">Support for VDE networking via <pkg>net-misc/vde</pkg>.</flag> - <flag name="vmmraw">Enable 32-bit support on a 64-bit kernel.</flag> + <flag name="vboxwebsrv">Build and install the VirtualBox webservice</flag> </use> <origin>baldeagleos-repo</origin> </pkgmetadata> diff --git a/app-emulation/virtualbox/virtualbox-7.0.26-r1.ebuild b/app-emulation/virtualbox/virtualbox-7.0.26-r1.ebuild deleted file mode 100644 index a7f7959bbbf7..000000000000 --- a/app-emulation/virtualbox/virtualbox-7.0.26-r1.ebuild +++ /dev/null @@ -1,693 +0,0 @@ -# Copyright 2022-2025 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_{11..12} ) - -inherit 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/ https://github.com/VirtualBox/virtualbox" -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.22-r1.tar.bz2 -" -S="${WORKDIR}/${MY_PN}-${PV}" - -LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )" -SLOT="0/$(ver_cut 1-2)" -KEYWORDS="amd64" -IUSE="alsa dbus debug doc dtrace java lvm pam pch pulseaudio +opengl python +sdk +sdl test +udev vboxwebsrv vde +vmmraw vnc" -RESTRICT="!test? ( test )" - -unset WATCOM #856769 - -COMMON_DEPEND=" - 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 - virtual/zlib:= - dbus? ( sys-apps/dbus ) - lvm? ( sys-fs/lvm2 ) - opengl? ( - media-libs/libglvnd[X] - media-libs/vulkan-loader - x11-libs/libX11 - x11-libs/libXt - ) - pam? ( sys-libs/pam ) - python? ( ${PYTHON_DEPS} ) - 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 ) - 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} - java? ( virtual/jre:1.8 ) -" -BDEPEND=" - >=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 - ) - java? ( virtual/jdk:1.8 ) - python? ( - ${PYTHON_DEPS} - test? ( - $(python_gen_cond_dep ' - dev-python/pytest[${PYTHON_USEDEP}] - ') - ) - ) -" - -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 ${PYTHON_REQUIRED_USE} ) - vboxwebsrv? ( java ) -" - -PATCHES=( - # Downloaded patchset - "${WORKDIR}"/virtualbox-patches-7.0.22-r1/patches - - "${FILESDIR}"/${PN}-7.2.2-curl-8.16.patch -) - -pkg_pretend() { - einfo - einfo "QT 5 is going away. This build will not include any QT frontend." - einfo "Please upgrade to virtualbox 7.1.x, which uses QT 6." - einfo - - if ! use opengl; then - einfo "No USE=\"opengl\" selected, this build will lack" - einfo "the OpenGL feature." - 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 - use python && python-single-r1_pkg_setup -} - -src_prepare() { - default - - if use python; then - mkdir test - cp "${FILESDIR}"/test_python.py test/ - python_fix_shebang test/test_python.py - fi - - # Only add nopie patch when we're on hardened - if gcc-specs-pie; then - eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch - fi - - # 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 - - # bug #916002, #488176, #925347 - tc-ld-is-mold || 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 #940482 - filter-flags -fno-plt - - # 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}"/${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/ /\ /g' \ - -e 's/–/\–/g' \ - -e 's/←/\←/g' \ - -e 's/→/\→/g' \ - -e 's/↔/\↔/g' {} \+ || die - - # fix help path #891879 - echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die - - # 489208 - # Cannot patch the whole text, many translations. Use sed instead to replace the command - find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \ - 's/'[^&]*\(vboxdrv setup\|vboxconfig\)'/\'emerge -1 virtualbox-modules\'/' {} \+ || die - sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \ - src/VBox/Frontends/VirtualBox/src/main.cpp \ - src/VBox/VMM/VMMR3/VM.cpp || die - - # 890561 - echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die - - # because nls support depends on QT5, disable it - cat >> LocalConfig.kmk <<-EOF || die - VBOX_WITH_NLS := - VBOX_WITH_MAIN_NLS := - VBOX_WITH_PUEL_NLS := - VBOX_WITH_VBOXMANAGE_NLS := - VBOX_WITH_DOCS_QHELP := - EOF -} - -src_configure() { - tc-export AR CC CXX LD RANLIB - export HOST_CC="$(tc-getBUILD_CC)" - - # --enable-webservice is a no-op - # webservice is automagically enabled if gsoap is found - 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 --with-gsoap-dir=/dev/null) - $(usev vde --enable-vde) - $(usev !vmmraw --disable-vmmraw) - $(usev vnc --enable-vnc) - ) - - if use sdl || use opengl; then - myconf+=( - --disable-qt - $(usev !opengl --disable-opengl) - $(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 - - if use python; then - 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 - - 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 - else - cat >> AutoConfig.kmk <<-EOF || die - VBOX_WITH_PYTHON:= - EOF - 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_test() { - if use python; then - local -x VBOX_PROGRAM_PATH="${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin - local -x VBOX_SDK_PATH="${VBOX_PROGRAM_PATH}"/sdk - local -x PYTHONPATH="${VBOX_SDK_PATH}"/installer - LD_LIBRARY_PATH="${VBOX_PROGRAM_PATH}" epytest test/ - fi -} - -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 lvm; then - vbox_inst VBoxVolInfo 4750 - dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo - fi - - if use sdk; then - insinto ${vbox_inst_path} - doins -r sdk - - if use java; then - java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar" - java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so" - fi - fi - - if use udev; then - local udevdir="$(get_udevdir)" - local udev_file="VBoxCreateUSBNode.sh" - local rules_file="10-virtualbox.rules" - - insinto ${udevdir} - doins ${udev_file} - fowners root:vboxusers ${udevdir}/${udev_file} - fperms 0750 ${udevdir}/${udev_file} - - insinto ${udevdir}/rules.d - sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \ - > "${T}"/${rules_file} || die - doins "${T}"/${rules_file} - fi - - if use vboxwebsrv; then - vbox_inst vboxwebsrv - dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv - newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv - newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv - fi - - # Remove dead symlinks (bug #715338) - find "${ED}"/usr/$(get_libdir)/${PN} -xtype l -delete || die - - # Fix version string in extensions or else they don't get accepted - # by the virtualbox host process (see bug #438930) - find ExtensionPacks -type f -name "ExtPack.xml" -exec sed -i '/Version/s@_Gentoo@@' {} \+ || die - - local extensions_dir="${vbox_inst_path}/ExtensionPacks" - - if use vnc; then - insinto ${extensions_dir} - doins -r ExtensionPacks/VNC - fi - - if use dtrace; then - insinto ${extensions_dir} - doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack - fi - - if use doc; then - dodoc UserManual.pdf - docompress -x /usr/share/doc/${PF} - 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 - sed -e "1 i\#! ${PYTHON}" -i vboxshell.py || 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 - - 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.1.18.ebuild b/app-emulation/virtualbox/virtualbox-7.1.18.ebuild deleted file mode 100644 index 31393f5737a2..000000000000 --- a/app-emulation/virtualbox/virtualbox-7.1.18.ebuild +++ /dev/null @@ -1,782 +0,0 @@ -# Copyright 2022-2026 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_{12..14} ) - -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} -HELP_PV=${PV} -PATCHES_PV="7.1.16" - -DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use" -HOMEPAGE="https://www.virtualbox.org/ https://github.com/VirtualBox/virtualbox" -SRC_URI=" - https://download.virtualbox.org/virtualbox/${PV%*a}/${MY_P}.tar.bz2 - https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2 - gui? ( !doc? ( https://distfiles.gentoo.org/pub/dev/ceamac@gentoo.org/${CATEGORY}/${PN}/${PN}-help-${HELP_PV}.tar.xz ) ) -" -S="${WORKDIR}/${MY_PN}-${PV%*a}" - -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 test +udev vboxwebsrv vde +vmmraw vnc" -RESTRICT="!test? ( test )" - -unset WATCOM #856769 - -COMMON_DEPEND=" - acct-group/vboxusers - app-arch/xz-utils - ~app-emulation/virtualbox-modules-${PV%*a} - dev-libs/libtpms - dev-libs/libxml2:= - dev-libs/openssl:0= - media-libs/libogg - media-libs/libpng:0= - media-libs/libvorbis - media-libs/libvpx:0= - net-misc/curl - virtual/zlib:= - dbus? ( sys-apps/dbus ) - gui? ( - dev-qt/qtbase:6[X,widgets] - dev-qt/qtscxml:6 - dev-qt/qttools:6[assistant] - x11-libs/libX11 - x11-libs/libXt - ) - lvm? ( sys-fs/lvm2 ) - opengl? ( - media-libs/libglvnd[X] - media-libs/vulkan-loader - x11-libs/libX11 - x11-libs/libXt - ) - pam? ( sys-libs/pam ) - python? ( ${PYTHON_DEPS} ) - sdl? ( - media-libs/libsdl2[X,video] - x11-libs/libX11 - 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:= - x11-libs/libXt - 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/libXcursor - x11-libs/libXinerama - ) - pulseaudio? ( media-libs/libpulse ) - udev? ( >=virtual/udev-171 ) -" -RDEPEND=" - ${COMMON_DEPEND} - gui? ( x11-libs/libxcb:= ) - java? ( virtual/jre:1.8 ) -" -BDEPEND=" - >=app-arch/tar-1.34-r2 - >=dev-lang/yasm-0.6.2 - 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-doc/dita-ot-bin - 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/qttools:6[assistant] - sys-libs/nss_wrapper - ) - gui? ( dev-qt/qttools:6[linguist] ) - nls? ( dev-qt/qttools:6[linguist] ) - java? ( virtual/jdk:1.8 ) - python? ( - ${PYTHON_DEPS} - test? ( - $(python_gen_cond_dep ' - dev-python/pytest[${PYTHON_USEDEP}] - ') - ) - ) -" - -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 ${PYTHON_REQUIRED_USE} ) - vboxwebsrv? ( java ) -" - -PATCHES=( - # Downloaded patchset - "${WORKDIR}"/virtualbox-patches-${PATCHES_PV}/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 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 - use python && python-single-r1_pkg_setup -} - -src_prepare() { - default - - if use python; then - mkdir test - cp "${FILESDIR}"/test_python.py test/ - python_fix_shebang test/test_python.py - fi - - # Only add nopie patch when we're on hardened - if gcc-specs-pie; then - eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch - fi - - # 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 - - # bug #916002, #488176, #925347 - tc-ld-is-mold || 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 - - # bug #940482 - filter-flags -fno-plt - - # 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 does not support this extension - eapply "${FILESDIR}"/${PN}-7.1.0-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/ /\ /g' \ - -e 's/–/\–/g' \ - -e 's/←/\←/g' \ - -e 's/→/\→/g' \ - -e 's/↔/\↔/g' {} \+ || die - - # fix help path #891879 - echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die - - # 489208 - # Cannot patch the whole text, many translations. Use sed instead to replace the command - find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \ - 's/'[^&]*\(vboxdrv setup\|vboxconfig\)'/\'emerge -1 virtualbox-modules\'/' {} \+ || die - sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \ - src/VBox/Frontends/VirtualBox/src/main.cpp \ - src/VBox/VMM/VMMR3/VM.cpp || die - - # 890561 - echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die - - if ! use nls && ! use gui; then - cat >> LocalConfig.kmk <<-EOF || die - VBOX_WITH_NLS := - VBOX_WITH_MAIN_NLS := - VBOX_WITH_PUEL_NLS := - VBOX_WITH_VBOXMANAGE_NLS := - EOF - fi -} - -src_configure() { - tc-export AR CC CXX LD RANLIB - export HOST_CC="$(tc-getBUILD_CC)" - - # --enable-webservice is a no-op - # webservice is automagically enabled if gsoap is found - 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 --with-gsoap-dir=/dev/null) - $(usev vde --enable-vde) - $(usev !vmmraw --disable-vmmraw) - $(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 - ) - # disable shared clipboard when headless, it crashes when connecting with RDP: bug #955867 - echo -e "\nVBOX_WITH_SHARED_CLIPBOARD :=" >> LocalConfig.kmk || die - 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 - - if use python; then - 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 - - 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 - else - cat >> AutoConfig.kmk <<-EOF || die - VBOX_WITH_PYTHON:= - EOF - 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 - - if use doc; then - # dita needs to write to ~/.fop and ~/.java - # but it ignores ${HOME} and tries to write to the real home of user portage - # resulting in a sandbox violation - # -Duser.home= does not work - # force using the temporary homedir with nss_wrapper - echo "${LOGNAME}::$(id -u):$(id -g):${USER}:${HOME}:/bin/bash" >> ~/passwd - echo "${LOGNAME}::$(id -g):" >> ~/group - - local -x LD_PRELOAD=libnss_wrapper.so - local -x NSS_WRAPPER_PASSWD="${HOME}"/passwd - local -x NSS_WRAPPER_GROUP="${HOME}"/group - fi - - MAKE="kmk" emake "${myemakeargs[@]}" all -} - -src_test() { - if use python; then - local -x VBOX_APP_HOME="${S}"/out/linux.${ARCH}/$(usex debug debug release) - local -x VBOX_INSTALL_PATH="${VBOX_APP_HOME}" - local -x VBOX_PROGRAM_PATH="${VBOX_APP_HOME}"/bin - local -x VBOX_SDK_PATH="${VBOX_PROGRAM_PATH}"/sdk - local -x PYTHONPATH="${VBOX_SDK_PATH}"/installer/python/vboxapi/src - einfo "VBOX_APP_HOME ${VBOX_APP_HOME}" - einfo "VBOX_PROGRAM_PATH ${VBOX_PROGRAM_PATH}" - einfo "VBOX_SDK_PATH ${VBOX_SDK_PATH}" - einfo "PYTHONPATH ${PYTHONPATH}" - LD_LIBRARY_PATH="${VBOX_PROGRAM_PATH}" epytest test/ - fi -} - -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} \ - 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 - - 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-${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/python/vboxapi/src" - 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 - - # upstream added a /bin/sh stub here - # use /usr/bin/python3, python_doscript will take care of it - sed -e '1 i #! /usr/bin/python3' -i vboxshell.py - python_doscript vboxshell.py - - # do not install the installer - rm -r "${installer_dir%vboxapi*}" || 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.2.6-r1.ebuild b/app-emulation/virtualbox/virtualbox-7.2.6.ebuild index a9d6ba35d169..c584d3a9a863 100644 --- a/app-emulation/virtualbox/virtualbox-7.2.6-r1.ebuild +++ b/app-emulation/virtualbox/virtualbox-7.2.6.ebuild @@ -1,6 +1,5 @@ -# Copyright 2022-2026 Gentoo Authors +# Copyright 2021-2026 Liguros Authors # Distributed under the terms of the GNU General Public License v2 - EAPI=8 # To add a new Python here: @@ -15,10 +14,8 @@ EAPI=8 # trunk branch but not release branch. # # See bug #785835, bug #856121. -PYTHON_COMPAT=( python3_{11..14} ) - -inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \ - python-single-r1 tmpfiles toolchain-funcs udev xdg +PYTHON_COMPAT=( python3_{10..14} ) +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^^} @@ -30,13 +27,13 @@ HOMEPAGE="https://www.virtualbox.org/ https://github.com/VirtualBox/virtualbox" SRC_URI=" https://download.virtualbox.org/virtualbox/${PV^^}/${MY_P}.tar.bz2 https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2 - gui? ( !doc? ( https://distfiles.gentoo.org/pub/dev/ceamac@gentoo.org/${CATEGORY}/${PN}/${PN}-help-${HELP_PV}.tar.xz ) ) + gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${PN}-help-${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" +KEYWORDS="~amd64" IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl test +udev vboxwebsrv vde vnc" RESTRICT="!test? ( test )" @@ -48,10 +45,9 @@ COMMON_DEPEND=" ~app-emulation/virtualbox-modules-${PV%*a} dev-libs/libtpms dev-libs/libxml2:= + dev-libs/openssl:0= - media-libs/libogg media-libs/libpng:0= - media-libs/libvorbis media-libs/libvpx:0= net-misc/curl virtual/zlib:= @@ -289,6 +285,7 @@ src_prepare() { java-pkg-opt-2_src_prepare fi + # bug #940482 filter-flags -fno-plt @@ -332,8 +329,7 @@ src_prepare() { find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \ 's/'[^&]*\(vboxdrv setup\|vboxconfig\)'/\'emerge -1 virtualbox-modules\'/' {} \+ || die sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \ - src/VBox/Frontends/VirtualBox/src/main.cpp \ - src/VBox/VMM/VMMR3/VMR3.cpp || die + src/VBox/Frontends/VirtualBox/src/main.cpp || die # 890561 echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die @@ -352,8 +348,6 @@ src_configure() { tc-export AR CC CXX LD RANLIB export HOST_CC="$(tc-getBUILD_CC)" - # --enable-webservice is a no-op - # webservice is automagically enabled if gsoap is found local myconf=( --with-gcc="$(tc-getCC)" --with-g++="$(tc-getCXX)" @@ -384,9 +378,10 @@ src_configure() { --build-headless ) # disable shared clipboard when headless, it crashes when connecting with RDP: bug #955867 - echo -e "\nVBOX_WITH_SHARED_CLIPBOARD :=" >> LocalConfig.kmk || die + echo -e "\nVBOX_WITH_SHARED_CLIPBOARD :=" >> LocalConfig.kmk || die fi + # not an autoconf script edo ./configure "${myconf[@]}" diff --git a/app-emulation/virtualbox/virtualbox-7.2.8.ebuild b/app-emulation/virtualbox/virtualbox-7.2.8.ebuild index c27a8191b3d9..c584d3a9a863 100644 --- a/app-emulation/virtualbox/virtualbox-7.2.8.ebuild +++ b/app-emulation/virtualbox/virtualbox-7.2.8.ebuild @@ -1,6 +1,5 @@ -# Copyright 2022-2026 Gentoo Authors +# Copyright 2021-2026 Liguros Authors # Distributed under the terms of the GNU General Public License v2 - EAPI=8 # To add a new Python here: @@ -15,10 +14,8 @@ EAPI=8 # trunk branch but not release branch. # # See bug #785835, bug #856121. -PYTHON_COMPAT=( python3_{12..14} ) - -inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \ - python-single-r1 tmpfiles toolchain-funcs udev xdg +PYTHON_COMPAT=( python3_{10..14} ) +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^^} @@ -30,13 +27,13 @@ HOMEPAGE="https://www.virtualbox.org/ https://github.com/VirtualBox/virtualbox" SRC_URI=" https://download.virtualbox.org/virtualbox/${PV^^}/${MY_P}.tar.bz2 https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2 - gui? ( !doc? ( https://distfiles.gentoo.org/pub/dev/ceamac@gentoo.org/${CATEGORY}/${PN}/${PN}-help-${HELP_PV}.tar.xz ) ) + gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${PN}-help-${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" +KEYWORDS="~amd64" IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl test +udev vboxwebsrv vde vnc" RESTRICT="!test? ( test )" @@ -48,10 +45,9 @@ COMMON_DEPEND=" ~app-emulation/virtualbox-modules-${PV%*a} dev-libs/libtpms dev-libs/libxml2:= + dev-libs/openssl:0= - media-libs/libogg media-libs/libpng:0= - media-libs/libvorbis media-libs/libvpx:0= net-misc/curl virtual/zlib:= @@ -196,13 +192,10 @@ QA_PRESTRIPPED=" REQUIRED_USE=" java? ( sdk ) python? ( sdk ${PYTHON_REQUIRED_USE} ) - test? ( !debug ) vboxwebsrv? ( java ) " PATCHES=( - "${FILESDIR}"/${P}-parallel-make.patch - # Downloaded patchset "${WORKDIR}"/virtualbox-patches-${PATCHES_PV}/patches ) @@ -292,6 +285,7 @@ src_prepare() { java-pkg-opt-2_src_prepare fi + # bug #940482 filter-flags -fno-plt @@ -335,8 +329,7 @@ src_prepare() { find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \ 's/'[^&]*\(vboxdrv setup\|vboxconfig\)'/\'emerge -1 virtualbox-modules\'/' {} \+ || die sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \ - src/VBox/Frontends/VirtualBox/src/main.cpp \ - src/VBox/VMM/VMMR3/VMR3.cpp || die + src/VBox/Frontends/VirtualBox/src/main.cpp || die # 890561 echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die @@ -355,8 +348,6 @@ src_configure() { tc-export AR CC CXX LD RANLIB export HOST_CC="$(tc-getBUILD_CC)" - # --enable-webservice is a no-op - # webservice is automagically enabled if gsoap is found local myconf=( --with-gcc="$(tc-getCC)" --with-g++="$(tc-getCXX)" @@ -387,9 +378,10 @@ src_configure() { --build-headless ) # disable shared clipboard when headless, it crashes when connecting with RDP: bug #955867 - echo -e "\nVBOX_WITH_SHARED_CLIPBOARD :=" >> LocalConfig.kmk || die + echo -e "\nVBOX_WITH_SHARED_CLIPBOARD :=" >> LocalConfig.kmk || die fi + # not an autoconf script edo ./configure "${myconf[@]}" diff --git a/app-emulation/virtualbox/virtualbox-9999.ebuild b/app-emulation/virtualbox/virtualbox-9999.ebuild deleted file mode 100644 index 586c035d01b2..000000000000 --- a/app-emulation/virtualbox/virtualbox-9999.ebuild +++ /dev/null @@ -1,815 +0,0 @@ -# Copyright 2022-2026 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Important! -# This compiles the latest git version. -# It also compiles the kernel modules. Does not depend on virtualbox-modules. -# It is not meant to be used, might be very unstable. -# -# -# -# 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_{11..14} ) - -inherit desktop edo flag-o-matic git-r3 java-pkg-opt-2 linux-mod-r1 multilib \ - optfeature pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg - -MY_PN="VirtualBox" -BASE_PV=7.1.0 -MY_P=${MY_PN}-${PV} -PATCHES_TAG=7.2.4 - -DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use" -HOMEPAGE="https://www.virtualbox.org/ https://github.com/VirtualBox/virtualbox" -EGIT_REPO_URI="https://github.com/VirtualBox/virtualbox.git" -SRC_URI=" - https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_TAG}.tar.bz2 - gui? ( !doc? ( https://distfiles.gentoo.org/pub/dev/ceamac@gentoo.org/${CATEGORY}/${PN}/${PN}-help-${BASE_PV}.tar.xz ) ) -" - -LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )" -SLOT="0/$(ver_cut 1-2)" -IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl test +udev vboxwebsrv vde vnc" -RESTRICT="!test? ( test )" - -unset WATCOM #856769 - -COMMON_DEPEND=" - acct-group/vboxusers - app-arch/xz-utils - dev-libs/libtpms - dev-libs/libxml2:= - dev-libs/openssl:0= - media-libs/libpng:0= - media-libs/libvpx:0= - net-misc/curl - virtual/zlib:= - dbus? ( sys-apps/dbus ) - gui? ( - dev-qt/qtbase:6[X,wayland,widgets] - dev-qt/qtscxml:6 - dev-qt/qttools:6[assistant] - x11-libs/libX11 - x11-libs/libXt - ) - lvm? ( sys-fs/lvm2 ) - opengl? ( - media-libs/libglvnd[X] - media-libs/vulkan-loader - x11-libs/libX11 - x11-libs/libXt - ) - pam? ( sys-libs/pam ) - python? ( ${PYTHON_DEPS} ) - sdl? ( - media-libs/libsdl2[X,video] - x11-libs/libX11 - 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:= - x11-libs/libXt - 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/libXcursor - x11-libs/libXinerama - ) - pulseaudio? ( media-libs/libpulse ) - udev? ( >=virtual/udev-171 ) -" -RDEPEND=" - ${COMMON_DEPEND} - !app-emulation/virtualbox-modules - gui? ( x11-libs/libxcb:= ) - java? ( virtual/jre:1.8 ) -" -BDEPEND=" - >=app-arch/tar-1.34-r2 - >=dev-lang/yasm-0.6.2 - dev-util/glslang - >=dev-build/kbuild-0.1.9998.3660 - sys-apps/which - sys-devel/bin86 - sys-libs/libcap - sys-power/iasl - virtual/pkgconfig - doc? ( - app-doc/dita-ot-bin - 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/qttools:6[assistant] - sys-libs/nss_wrapper - ) - gui? ( dev-qt/qttools:6[linguist] ) - nls? ( dev-qt/qttools:6[linguist] ) - java? ( virtual/jdk:1.8 ) - python? ( - ${PYTHON_DEPS} - test? ( - $(python_gen_cond_dep ' - dev-python/pytest[${PYTHON_USEDEP}] - ') - ) - ) -" - -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 ${PYTHON_REQUIRED_USE} ) - vboxwebsrv? ( java ) -" - -PATCHES=( - # Downloaded patchset - "${WORKDIR}"/virtualbox-patches-${PATCHES_TAG}/patches -) - -DOCS=() # Don't install the default README file during einstalldocs - -CONFIG_CHECK="~!SPINLOCK JUMP_LABEL ~PREEMPT_NOTIFIERS" - -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 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 - use python && python-single-r1_pkg_setup - linux-mod-r1_pkg_setup -} - -src_unpack() { - git-r3_src_unpack - default -} - -src_prepare() { - default - - if use python; then - mkdir test - cp "${FILESDIR}"/test_python.py test/ - python_fix_shebang test/test_python.py - fi - - # Only add nopie patch when we're on hardened - if gcc-specs-pie; then - eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch - fi - - # 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 - - # bug #916002, #488176, #925347 - tc-ld-is-mold || 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 - - # bug #940482 - filter-flags -fno-plt - - # 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 does not support this extension - eapply "${FILESDIR}"/${PN}-7.1.0-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/ /\ /g' \ - -e 's/–/\–/g' \ - -e 's/←/\←/g' \ - -e 's/→/\→/g' \ - -e 's/↔/\↔/g' {} \+ || die - - # fix help path #891879 - echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die - - # 489208 - # Cannot patch the whole text, many translations. Use sed instead to replace the command - find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \ - 's/'[^&]*\(vboxdrv setup\|vboxconfig\)'/\'emerge -1 virtualbox-modules\'/' {} \+ || die - sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \ - src/VBox/Frontends/VirtualBox/src/main.cpp \ - src/VBox/VMM/VMMR3/VMR3.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)" - - # --enable-webservice is a no-op - # webservice is automagically enabled if gsoap is found - 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 --with-gsoap-dir=/dev/null) - $(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 - ) - # disable shared clipboard when headless, it crashes when connecting with RDP: bug #955867 - echo -e "\nVBOX_WITH_SHARED_CLIPBOARD :=" >> LocalConfig.kmk || die - 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 - - if use python; then - 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 - - 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 - else - cat >> AutoConfig.kmk <<-EOF || die - VBOX_WITH_PYTHON:= - EOF - 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 - - if use doc; then - # dita needs to write to ~/.fop and ~/.java - # but it ignores ${HOME} and tries to write to the real home of user portage - # resulting in a sandbox violation - # -Duser.home= does not work - # force using the temporary homedir with nss_wrapper - echo "${LOGNAME}::$(id -u):$(id -g):${USER}:${HOME}:/bin/bash" >> ~/passwd - echo "${LOGNAME}::$(id -g):" >> ~/group - - local -x LD_PRELOAD=libnss_wrapper.so - local -x NSS_WRAPPER_PASSWD="${HOME}"/passwd - local -x NSS_WRAPPER_GROUP="${HOME}"/group - fi - - MAKE="kmk" emake "${myemakeargs[@]}" all - - local modlist=( {vboxdrv,vboxnetflt,vboxnetadp}=misc:"out/linux.${ARCH}/release/bin/src" ) - local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" ) - linux-mod-r1_src_compile -} - -src_test() { - if use python; then - local -x VBOX_APP_HOME="${S}"/out/linux.${ARCH}/$(usex debug debug release) - local -x VBOX_INSTALL_PATH="${VBOX_APP_HOME}" - local -x VBOX_PROGRAM_PATH="${VBOX_APP_HOME}"/bin - local -x VBOX_SDK_PATH="${VBOX_PROGRAM_PATH}"/sdk - local -x PYTHONPATH="${VBOX_SDK_PATH}"/installer/python/vboxapi/src - einfo "VBOX_APP_HOME ${VBOX_APP_HOME}" - einfo "VBOX_PROGRAM_PATH ${VBOX_PROGRAM_PATH}" - einfo "VBOX_SDK_PATH ${VBOX_SDK_PATH}" - einfo "PYTHONPATH ${PYTHONPATH}" - LD_LIBRARY_PATH="${VBOX_PROGRAM_PATH}" epytest test/ - fi -} - -src_install() { - linux-mod-r1_src_install - insinto /usr/lib/modules-load.d/ - newins - virtualbox.conf <<-EOF - vboxdrv - vboxnetflt - vboxnetadp - EOF - insinto /etc/modprobe.d # bug #945135 - newins - virtualbox.conf <<-EOF - # modprobe.d configuration file for VBOXSF - - # Starting with kernel 6.12, - # KVM initializes virtualization on module loading by default. - # This prevents VirtualBox VMs from starting. - # See also: - # https://bugs.gentoo.org/945135 - # https://www.virtualbox.org/wiki/Changelog-7.1 - # ------------------------------ - options kvm enable_virt_at_load=0 - EOF - - 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} \ - 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{-x86,-amd64}.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 - - 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-${BASE_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/python/vboxapi/src" - 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 - - # upstream added a /bin/sh stub here - # use /usr/bin/python3, python_doscript will take care of it - sed -e '1 i #! /usr/bin/python3' -i vboxshell.py - python_doscript vboxshell.py - - # do not install the installer - rm -r "${installer_dir%vboxapi*}" || die - fi - - newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf -} - -pkg_postinst() { - linux-mod-r1_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/${BASE_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 -} |
