public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/
@ 2024-02-26 12:58 Viorel Munteanu
  0 siblings, 0 replies; 24+ messages in thread
From: Viorel Munteanu @ 2024-02-26 12:58 UTC (permalink / raw
  To: gentoo-commits

commit:     6802bfee226dfa07233e56853dce2421eb1b270c
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 26 12:51:27 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Mon Feb 26 12:58:21 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6802bfee

app-emulation/virtualbox-kvm: add 7.0.14_pre20240226

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox-kvm/Manifest              |   1 +
 .../virtualbox-kvm-7.0.14_pre20240226.ebuild       | 758 +++++++++++++++++++++
 2 files changed, 759 insertions(+)

diff --git a/app-emulation/virtualbox-kvm/Manifest b/app-emulation/virtualbox-kvm/Manifest
index b63662305f4d..df44ddd93619 100644
--- a/app-emulation/virtualbox-kvm/Manifest
+++ b/app-emulation/virtualbox-kvm/Manifest
@@ -1,3 +1,4 @@
 DIST virtualbox-help-7.0.14.tar.xz 3944832 BLAKE2B 95079e4da8c960c41cee799142779a6c2587e0e8af7956ca551cb5a4c0f36f313189dfe08afba83a0c32886866a7f9903b5e370008d6b3ce6283fb2288866b06 SHA512 e2f1acdd7577a93047e220300b1996d2855ddef20053c01294f8295fde0840645c41b75632d71dd2fc276219084fe4105fd057623f39375542358796425a2d03
 DIST virtualbox-kvm-7.0.14_pre20240208.tar.gz 213410613 BLAKE2B 19962b80d9509e018c23c860e3bdb0a6cb2864aca2e02bfd3b0b9fae5ced5202752d1f5e3f20181158dc5407c8f28badf6c4e617dce9219067931195085e7c4d SHA512 2de9720228b8751095cb29271495d5b90e0d63b6270cd4d33384bc23dce634f38379ebfde348933cd0672d7232e36523f876841f01862b9640a9d974adaf0574
+DIST virtualbox-kvm-7.0.14_pre20240226.tar.gz 213417750 BLAKE2B e67928ea411ed2b99dd2e8837bce4c1c5b22538b929f9751cd5ffd14b668c35cee93c4ff9a96e6664dccbc343969bdbed8401575b66bb82d0aa9f95f813e2580 SHA512 3cff52db6cd76756d392c43a8c5ebe8fd496b7d50205da45cb06d829d2748419727e1543939ddccb679dc7d780f55f3052e616cfa0873fe8f9885ebeba538db4
 DIST virtualbox-patches-7.0.14.tar.bz2 6937 BLAKE2B da5f18efbba2a8f4701b3d29dc00784e4e80e18a18b029e5dce8c142eb4dc97637069bfc5081422064a7dc59dfacf503ebbdc3421caa96430dc53fa72988aa20 SHA512 57cc34b92e4626de5c445e34ae025da7ec0d752a60618c619a55c28bf7d6b1cc9dc81ea059b949b0f3e625568207e8084f9462faf487ca0daf2794e7f1feac36

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240226.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240226.ebuild
new file mode 100644
index 000000000000..b7a2eef2da25
--- /dev/null
+++ b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240226.ebuild
@@ -0,0 +1,758 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# To add a new Python here:
+# 1. Patch src/libs/xpcom18a4/python/Makefile.kmk (copy the previous impl's logic)
+#    Do NOT skip this part. It'll end up silently not-building the Python extension
+#    or otherwise misbehaving if you do.
+#
+# 2. Then update PYTHON_COMPAT & set PYTHON_SINGLE_TARGET for testing w/ USE=python.
+#
+#  May need to look at other distros (e.g. Arch Linux) to find patches for newer
+#  Python versions as upstream tends to lag. Upstream may have patches on their
+#  trunk branch but not release branch.
+#
+#  See bug #785835, bug #856121.
+PYTHON_COMPAT=( python3_{10..11} )
+
+inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \
+	python-single-r1 tmpfiles toolchain-funcs udev xdg
+
+MY_PN="VirtualBox"
+MY_P=${MY_PN}-${PV}
+
+ORIGIN_PN="virtualbox"
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/ https://github.com/cyberus-technology/virtualbox-kvm"
+SRC_URI="https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-7.0.14.tar.bz2"
+if [[ ${PV} == *9999* ]]; then
+	inherit git-r3
+
+	ORIGIN_PV="7.0.14"
+	EGIT_REPO_URI="https://github.com/cyberus-technology/virtualbox-kvm"
+else
+	MY_PV=${PV#*_pre}
+	ORIGIN_PV=${PV%_pre*}
+	SRC_URI+=" https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz"
+	S="${WORKDIR}/${PN}-dev-${MY_PV}"
+fi
+SRC_URI+=" gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${ORIGIN_PN}/${ORIGIN_PN}-help-${ORIGIN_PV}.tar.xz ) )"
+
+LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
+SLOT="0"
+IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde vnc"
+
+unset WATCOM #856769
+
+COMMON_DEPEND="
+	${PYTHON_DEPS}
+	acct-group/vboxusers
+	dev-libs/libtpms
+	dev-libs/libxml2
+	dev-libs/openssl:0=
+	media-libs/libpng:0=
+	media-libs/libvpx:0=
+	net-misc/curl
+	sys-libs/zlib
+	dbus? ( sys-apps/dbus )
+	gui? (
+		dev-qt/qtcore:5
+		dev-qt/qtdbus:5
+		dev-qt/qtgui:5
+		dev-qt/qthelp:5
+		dev-qt/qtprintsupport:5
+		dev-qt/qtwidgets:5
+		dev-qt/qtx11extras:5
+		dev-qt/qtxml:5
+		x11-libs/libX11
+		x11-libs/libXt
+		opengl? ( dev-qt/qtopengl:5 )
+	)
+	lvm? ( sys-fs/lvm2 )
+	opengl? (
+		media-libs/libglvnd[X]
+		media-libs/vulkan-loader
+		x11-libs/libX11
+		x11-libs/libXt
+	)
+	pam? ( sys-libs/pam )
+	sdl? (
+		media-libs/libsdl2[X,video]
+		x11-libs/libX11
+		x11-libs/libXcursor
+		x11-libs/libXt
+	)
+	vboxwebsrv? ( net-libs/gsoap[-gnutls(-),debug?] )
+	vde? ( net-misc/vde )
+	vnc? ( >=net-libs/libvncserver-0.9.9 )
+"
+# We're stuck on JDK (and JRE, I guess?) 1.8 because of need for wsimport
+# with USE="vboxwebsrv java". Note that we have to put things in DEPEND,
+# not (only, anyway) BDEPEND, as the eclass magic to set the environment variables
+# based on *DEPEND doesn't work for BDEPEND at least right now.
+#
+# There's a comment in Config.kmk about it
+# ("With Java 11 wsimport was removed, usually part of a separate install now.")
+# but it needs more investigation.
+#
+# See bug #878299 to track this issue.
+DEPEND="
+	${COMMON_DEPEND}
+	>=dev-libs/libxslt-1.1.19
+	virtual/libcrypt:=
+	alsa? ( >=media-libs/alsa-lib-1.0.13 )
+	gui? (
+		x11-base/xorg-proto
+		x11-libs/libxcb:=
+		x11-libs/libXcursor
+		x11-libs/libXext
+		x11-libs/libXinerama
+		x11-libs/libXmu
+		x11-libs/libXrandr
+	)
+	java? ( virtual/jdk:1.8 )
+	opengl? (
+		x11-base/xorg-proto
+		x11-libs/libXcursor
+		x11-libs/libXinerama
+		x11-libs/libXmu
+		x11-libs/libXrandr
+		virtual/glu
+	)
+	sdl? ( x11-libs/libXinerama )
+	pulseaudio? ( media-libs/libpulse )
+	udev? ( >=virtual/udev-171 )
+"
+RDEPEND="
+	!app-emulation/virtualbox
+	${COMMON_DEPEND}
+	gui? ( x11-libs/libxcb:= )
+	java? ( virtual/jre:1.8 )
+"
+BDEPEND="
+	${PYTHON_DEPS}
+	>=app-arch/tar-1.34-r2
+	>=dev-lang/yasm-0.6.2
+	dev-libs/libIDL
+	dev-util/glslang
+	>=dev-build/kbuild-0.1.9998.3592
+	sys-apps/which
+	sys-devel/bin86
+	sys-libs/libcap
+	sys-power/iasl
+	virtual/pkgconfig
+	doc? (
+		app-text/docbook-sgml-dtd:4.4
+		app-text/docbook-xsl-ns-stylesheets
+		dev-texlive/texlive-basic
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-latexrecommended
+		dev-texlive/texlive-latexextra
+		dev-texlive/texlive-fontsrecommended
+		dev-texlive/texlive-fontsextra
+		dev-qt/qthelp:5
+	)
+	gui? ( dev-qt/linguist-tools:5 )
+	nls? ( dev-qt/linguist-tools:5 )
+	java? ( virtual/jdk:1.8 )
+"
+
+QA_FLAGS_IGNORED="
+	usr/lib64/virtualbox/VBoxDDR0.r0
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
+"
+
+QA_TEXTRELS="
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
+"
+
+QA_EXECSTACK="
+	usr/lib64/virtualbox/iPxeBaseBin
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/VBoxDDR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
+"
+
+QA_WX_LOAD="
+	usr/lib64/virtualbox/iPxeBaseBin
+"
+
+QA_PRESTRIPPED="
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/VBoxDDR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
+"
+
+REQUIRED_USE="
+	java? ( sdk )
+	python? ( sdk )
+	vboxwebsrv? ( java )
+	${PYTHON_REQUIRED_USE}
+"
+
+PATCHES=(
+	# Downloaded patchset
+	"${WORKDIR}"/virtualbox-patches-7.0.14/patches
+)
+
+pkg_pretend() {
+	if ! use gui; then
+		einfo "No USE=\"gui\" selected, this build will not include any Qt frontend."
+	fi
+
+	if ! use opengl; then
+		einfo "No USE=\"opengl\" selected, this build will lack"
+		einfo "the OpenGL feature."
+	fi
+	if ! use python; then
+		einfo "You have disabled the \"python\" USE flag. This will only"
+		einfo "disable the python bindings being installed."
+	fi
+	if ! use nls && use gui; then
+		einfo "USE=\"gui\" also selects USE=\"nls\".  This build"
+		einfo "will have NLS support."
+	fi
+
+	# 749273
+	local d=${ROOT}
+	for i in usr "$(get_libdir)"; do
+		d="${d}/$i"
+		if [[ "$(stat -L -c "%g %u" "${d}")" != "0 0" ]]; then
+			die "${d} should be owned by root, VirtualBox will not start otherwise"
+		fi
+	done
+}
+
+pkg_setup() {
+	java-pkg-opt-2_pkg_setup
+	python-single-r1_pkg_setup
+}
+
+src_unpack() {
+	[[ ${PV} == *9999* ]] && git-r3_src_unpack
+	default
+}
+
+src_prepare() {
+	default
+
+	# Only add nopie patch when we're on hardened
+	if gcc-specs-pie; then
+		eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch
+	fi
+
+	# Remove shipped binaries (kBuild, yasm) and tools, see bug #232775
+	rm -r kBuild/bin || die
+	# Remove everything in tools except kBuildUnits
+	find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || die
+
+	# Disable things unused or split into separate ebuilds
+	sed -e "s@MY_LIBDIR@$(get_libdir)@" \
+		"${FILESDIR}"/${ORIGIN_PN}-5-localconfig > LocalConfig.kmk || die
+
+	if ! use pch; then
+		# bug #753323
+		printf '\n%s\n' "VBOX_WITHOUT_PRECOMPILED_HEADERS=1" \
+			>> LocalConfig.kmk || die
+	fi
+
+	# bug #916002, #488176
+	tc-ld-force-bfd
+
+	# Respect LDFLAGS
+	sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
+		-i Config.kmk src/libs/xpcom18a4/Config.kmk || die
+
+	# Do not use hard-coded ld (related to bug #488176)
+	sed -e '/QUIET)ld /s@ld @$(LD) @' \
+		-i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
+
+	# Use PAM only when pam USE flag is enbaled (bug #376531)
+	if ! use pam; then
+		einfo "Disabling PAM removes the possibility to use the VRDP features."
+		sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
+		sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
+			src/VBox/HostServices/Makefile.kmk || die
+		echo -e "\nIPRT_WITHOUT_PAM=1" >> LocalConfig.kmk || die
+	fi
+
+	# add correct java path
+	if use java; then
+		sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
+			-i "${S}"/Config.kmk || die
+		java-pkg-opt-2_src_prepare
+	fi
+
+	#856811 #864274
+	# cannot filter out only one flag, some combinations of these flags produce buggy executables
+	for i in abm avx avx2 bmi bmi2 fma fma4 popcnt; do
+		append-cflags $(test-flags-CC -mno-$i)
+		append-cxxflags $(test-flags-CXX -mno-$i)
+	done
+
+	# bug #908814
+	filter-lto
+
+	# bug #843437
+	cat >> LocalConfig.kmk <<-EOF || die
+		CXXFLAGS=${CXXFLAGS}
+		CFLAGS=${CFLAGS}
+	EOF
+
+	if use sdl; then
+		sed -i 's/sdl-config/sdl2-config/' configure || die
+		echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
+	fi
+
+	#443830
+	echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die
+
+	if tc-is-clang; then
+		# clang assembler chokes on comments starting with /
+		sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
+
+		# clang does not support this extension
+		eapply "${FILESDIR}"/${ORIGIN_PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
+	fi
+
+	# fix doc generation
+	echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die
+	# replace xhtml names with numeric equivalents
+	find doc/manual -name \*.xml -exec sed -i \
+		-e 's/&nbsp;/\&#160;/g' \
+		-e 's/&ndash;/\&#8211;/g' \
+		-e 's/&larr;/\&#8592;/g' \
+		-e 's/&rarr;/\&#8594;/g' \
+		-e 's/&harr;/\&#8596;/g' {} \+ || die
+
+	# fix help path #891879
+	echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die
+
+	# 489208
+	# Cannot patch the whole text, many translations.  Use sed instead to replace the command
+	find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \
+		's/&apos;[^&]*\(vboxdrv setup\|vboxconfig\)&apos;/\&apos;emerge -1 virtualbox-modules\&apos;/' {} \+ || die
+	sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \
+		src/VBox/Frontends/VirtualBox/src/main.cpp \
+		src/VBox/VMM/VMMR3/VM.cpp || die
+
+	# 890561
+	echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
+
+	if ! use nls && ! use gui; then
+		cat >> LocalConfig.kmk <<-EOF || die
+			VBOX_WITH_NLS :=
+			VBOX_WITH_MAIN_NLS :=
+			VBOX_WITH_PUEL_NLS :=
+			VBOX_WITH_VBOXMANAGE_NLS :=
+		EOF
+	fi
+}
+
+src_configure() {
+	tc-export AR CC CXX LD RANLIB
+	export HOST_CC="$(tc-getBUILD_CC)"
+
+	local myconf=(
+		--with-gcc="$(tc-getCC)"
+		--with-g++="$(tc-getCXX)"
+
+		--disable-kmods
+		--with-kvm
+
+		# this is required for kvm to work.
+		# also this prohibits installation with suid.
+		--disable-hardening
+
+		$(usev !alsa --disable-alsa)
+		$(usev !dbus --disable-dbus)
+		$(usev debug --build-debug)
+		$(usev !doc --disable-docs)
+		$(usev !java --disable-java)
+		$(usev !lvm --disable-devmapper)
+		$(usev !pulseaudio --disable-pulse)
+		$(usev !python --disable-python)
+		$(usev vboxwebsrv --enable-webservice)
+		$(usev vde --enable-vde)
+		$(usev vnc --enable-vnc)
+	)
+
+	if use gui || use sdl || use opengl; then
+		myconf+=(
+			$(usev !opengl --disable-opengl)
+			$(usev !gui --disable-qt)
+			$(usev !sdl --disable-sdl)
+		)
+	else
+		myconf+=(
+			--build-headless
+		)
+	fi
+
+	if use amd64 && ! has_multilib_profile; then
+		myconf+=( --disable-vmmraw )
+	fi
+
+	# not an autoconf script
+	edo ./configure "${myconf[@]}"
+
+	# Force usage of chosen Python implementation
+	# bug #856121, bug #785835
+	sed -i \
+		-e '/VBOX_WITH_PYTHON.*=/d' \
+		-e '/VBOX_PATH_PYTHON_INC.*=/d' \
+		-e '/VBOX_LIB_PYTHON.*=/d' \
+		AutoConfig.kmk || die
+
+	cat >> AutoConfig.kmk <<-EOF || die
+		VBOX_WITH_PYTHON=$(usev python 1)
+		VBOX_PATH_PYTHON_INC=$(python_get_includedir)
+		VBOX_LIB_PYTHON=$(python_get_library_path)
+	EOF
+
+	if use python; then
+		local mangled_python="${EPYTHON#python}"
+		mangled_python="${mangled_python/.}"
+
+		# Stub out the script which defines what the Makefile ends up
+		# building for. gen_python_deps.py gets called by the Makefile
+		# with some args and it spits out a bunch of paths for a hardcoded
+		# list of Pythons. We just override it with what we're actually using.
+		# This minimises the amount of patching we have to do for new Pythons.
+		cat > src/libs/xpcom18a4/python/gen_python_deps.py <<-EOF || die
+			print("VBOX_PYTHON${mangled_python}_INC=$(python_get_includedir)")
+			print("VBOX_PYTHON${mangled_python}_LIB=$(python_get_library_path)")
+			print("VBOX_PYTHONDEF_INC=$(python_get_includedir)")
+			print("VBOX_PYTHONDEF_LIB=$(python_get_library_path)")
+		EOF
+
+		chmod +x src/libs/xpcom18a4/python/gen_python_deps.py || die
+	fi
+}
+
+src_compile() {
+	source ./env.sh || die
+
+	# Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
+	MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
+	MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
+	MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
+
+	local myemakeargs=(
+		VBOX_BUILD_PUBLISHER=_Gentoo
+		VBOX_WITH_VBOXIMGMOUNT=1
+
+		KBUILD_VERBOSE=2
+
+		AS="$(tc-getCC)"
+		CC="$(tc-getCC)"
+		CXX="$(tc-getCXX)"
+
+		TOOL_GCC3_CC="$(tc-getCC)"
+		TOOL_GCC3_LD="$(tc-getCC)"
+		TOOL_GCC3_AS="$(tc-getCC)"
+		TOOL_GCC3_AR="$(tc-getAR)"
+		TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
+
+		TOOL_GXX3_CC="$(tc-getCC)"
+		TOOL_GXX3_CXX="$(tc-getCXX)"
+		TOOL_GXX3_LD="$(tc-getCXX)"
+		TOOL_GXX3_AS="$(tc-getCXX)"
+		TOOL_GXX3_AR="$(tc-getAR)"
+		TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
+
+		TOOL_GCC3_CFLAGS="${CFLAGS}"
+		TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
+		VBOX_GCC_OPT="${CXXFLAGS}"
+		VBOX_NM="$(tc-getNM)"
+
+		TOOL_YASM_AS=yasm
+	)
+
+	if use amd64 && has_multilib_profile; then
+		myemakeargs+=(
+			CC32="$(tc-getCC) -m32"
+			CXX32="$(tc-getCXX) -m32"
+
+			TOOL_GCC32_CC="$(tc-getCC) -m32"
+			TOOL_GCC32_CXX="$(tc-getCXX) -m32"
+			TOOL_GCC32_LD="$(tc-getCC) -m32"
+			TOOL_GCC32_AS="$(tc-getCC) -m32"
+			TOOL_GCC32_AR="$(tc-getAR)"
+			TOOL_GCC32_OBJCOPY="$(tc-getOBJCOPY)"
+
+			TOOL_GXX32_CC="$(tc-getCC) -m32"
+			TOOL_GXX32_CXX="$(tc-getCXX) -m32"
+			TOOL_GXX32_LD="$(tc-getCXX) -m32"
+			TOOL_GXX32_AS="$(tc-getCXX) -m32"
+			TOOL_GXX32_AR="$(tc-getAR)"
+			TOOL_GXX32_OBJCOPY="$(tc-getOBJCOPY)"
+		)
+	fi
+
+	MAKE="kmk" emake "${myemakeargs[@]}" all
+}
+
+src_install() {
+	cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
+
+	local vbox_inst_path="/usr/$(get_libdir)/${ORIGIN_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}/${ORIGIN_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}/${ORIGIN_PN}-ose-6-wrapper" "VBox"
+	fowners root:vboxusers ${vbox_inst_path}/VBox
+	fperms 0750 ${vbox_inst_path}/VBox
+
+	# Install binaries and libraries
+	insinto ${vbox_inst_path}
+	doins -r components
+
+	for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,VMMPreload,XPCOMIPCD} \
+		vboximg-mount vbox-img *so *r0; do
+		vbox_inst ${each}
+	done
+
+	# These binaries need to be suid root.
+	for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
+		vbox_inst ${each} 0750
+	done
+
+	# Install EFI Firmware files (bug #320757)
+	for each in VBoxEFI{32,64}.fd ; do
+		vbox_inst ${each} 0644
+	done
+
+	# VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
+	# VBoxXPCOMIPCD (bug #524202)
+	for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
+		pax-mark -m "${ED}"${vbox_inst_path}/${each}
+	done
+
+	# Symlink binaries to the shipped wrapper
+	for each in vbox{autostart,balloonctrl,bugreport,headless,manage} \
+		VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do
+			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+	done
+	dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount
+	dosym ${vbox_inst_path}/vbox-img /usr/bin/vbox-img
+
+	if use pam; then
+		# VRDPAuth only works with this (bug #351949)
+		dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
+	fi
+
+	# set an env-variable for 3rd party tools
+	echo "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
+	# environment variables used during SDK binding installation
+	echo "VBOX_SDK_PATH=${vbox_inst_path}/sdk" >> "${T}/90virtualbox"
+	echo "VBOX_INSTALL_PATH=${vbox_inst_path}" >> "${T}/90virtualbox"
+	doenvd "${T}/90virtualbox"
+
+	if use sdl; then
+		vbox_inst VBoxSDL 0750
+		pax-mark -m "${ED}"${vbox_inst_path}/VBoxSDL
+
+		for each in vboxsdl VBoxSDL ; do
+			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+		done
+	fi
+
+	if use gui; then
+		vbox_inst VirtualBox
+		vbox_inst VirtualBoxVM 0750
+		for each in VirtualBox{,VM} ; do
+			pax-mark -m "${ED}"${vbox_inst_path}/${each}
+		done
+
+		if use opengl; then
+			vbox_inst VBoxTestOGL
+			pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
+		fi
+
+		for each in virtualbox{,vm} VirtualBox{,VM} ; do
+			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+		done
+
+		insinto /usr/share/${PN}
+		doins -r nls
+		doins -r UnattendedTemplates
+
+		newmenu ${ORIGIN_PN}.desktop ${PN}.desktop
+
+		pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
+		for size in 16 32 48 64 128 ; do
+			newicon -s ${size} ${ORIGIN_PN}-${size}px.png ${PN}.png
+		done
+		newicon ${ORIGIN_PN}-48px.png ${PN}.png
+		newicon -s scalable ${ORIGIN_PN}.svg ${PN}.png
+		popd &>/dev/null || die
+		pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
+		for size in 16 24 32 48 64 72 96 128 256 512 ; do
+			for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
+				icofile="${ORIGIN_PN}-${ico}-${size}px.png"
+				if [[ -f "${icofile}" ]]; then
+					newicon -s ${size} ${icofile} ${ORIGIN_PN}-${ico}.png
+				fi
+			done
+		done
+		popd &>/dev/null || die
+	fi
+
+	if use lvm; then
+		vbox_inst VBoxVolInfo 0750
+		dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
+	fi
+
+	if use sdk; then
+		insinto ${vbox_inst_path}
+		doins -r sdk
+
+		if use java; then
+			java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
+			java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
+		fi
+	fi
+
+	if use udev; then
+		local udevdir="$(get_udevdir)"
+		local udev_file="VBoxCreateUSBNode.sh"
+		local rules_file="10-virtualbox.rules"
+
+		insinto ${udevdir}
+		doins ${udev_file}
+		fowners root:vboxusers ${udevdir}/${udev_file}
+		fperms 0750 ${udevdir}/${udev_file}
+
+		insinto ${udevdir}/rules.d
+		sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \
+			> "${T}"/${rules_file} || die
+		doins "${T}"/${rules_file}
+	fi
+
+	if use vboxwebsrv; then
+		vbox_inst vboxwebsrv
+		dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
+		newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
+		newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
+	fi
+
+	# Remove dead symlinks (bug #715338)
+	find "${ED}"/usr/$(get_libdir)/${ORIGIN_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}"/${ORIGIN_PN}-help-${ORIGIN_PV}/UserManual.q{ch,hc}
+		docompress -x /usr/share/doc/${PF}
+	fi
+
+	if use python; then
+		local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.so"
+		if [[ ! -x "${python_path_ext}" ]]; then
+			eerror "Couldn't find ${python_path_ext}! Bindings were requested with USE=python"
+			eerror "but none were installed. This may happen if support for a Python target"
+			eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles."
+			die "Incomplete installation of Python bindings! File a bug with Gentoo!"
+		fi
+
+		# 378871
+		local installer_dir="${ED}/usr/$(get_libdir)/virtualbox/sdk/installer"
+		pushd "${installer_dir}" &> /dev/null || die
+		sed -e "s;%VBOX_INSTALL_PATH%;${vbox_inst_path};" \
+			-e "s;%VBOX_SDK_PATH%;${vbox_inst_path}/sdk;" \
+			-i vboxapi/__init__.py || die
+		# insert shebang, the files come without one
+		find vboxapi -name \*.py -exec sed -e "1 i\#! ${PYTHON}" -i {} \+ || die
+		python_domodule vboxapi
+		popd &> /dev/null || die
+		python_doscript vboxshell.py
+
+		# do not install the installer
+		rm -r "${installer_dir}" || die
+	fi
+
+	newtmpfiles "${FILESDIR}"/${ORIGIN_PN}-vboxusb_tmpfilesd virtualbox-vboxusb.conf
+}
+
+pkg_postinst() {
+	xdg_pkg_postinst
+
+	if use udev; then
+		udev_reload
+		udevadm trigger --subsystem-match=usb
+	fi
+
+	tmpfiles_process virtualbox-vboxusb.conf
+
+	if use gui; then
+		elog "To launch VirtualBox just type: \"virtualbox\"."
+	fi
+
+	elog "You must be in the vboxusers group to use VirtualBox."
+	elog ""
+	elog "The latest user manual is available for download at:"
+	elog "https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/UserManual.pdf"
+	elog ""
+
+	optfeature "Advanced networking setups" net-misc/bridge-utils sys-apps/usermode-utilities
+	optfeature "USB2, USB3, PXE boot, and VRDP support" app-emulation/virtualbox-extpack-oracle
+	optfeature "Guest additions ISO" app-emulation/virtualbox-additions
+
+	if ! use udev; then
+		ewarn "Without USE=udev, USB devices will likely not work in ${ORIGIN_PN}."
+	fi
+}
+
+pkg_postrm() {
+	xdg_pkg_postrm
+
+	use udev && udev_reload
+}


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/
@ 2024-03-09 15:49 Viorel Munteanu
  0 siblings, 0 replies; 24+ messages in thread
From: Viorel Munteanu @ 2024-03-09 15:49 UTC (permalink / raw
  To: gentoo-commits

commit:     2ce66c4551de69b347c91255fb2fb4990151d218
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Sat Mar  9 15:44:36 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Sat Mar  9 15:46:48 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ce66c45

app-emulation/virtualbox-kvm: sync live ebuild

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 .../virtualbox-kvm/virtualbox-kvm-9999.ebuild      | 62 +++++++++++++---------
 1 file changed, 36 insertions(+), 26 deletions(-)

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild
index b7a2eef2da25..653847dcfdf0 100644
--- a/app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild
+++ b/app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild
@@ -20,26 +20,34 @@ PYTHON_COMPAT=( python3_{10..11} )
 inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \
 	python-single-r1 tmpfiles toolchain-funcs udev xdg
 
-MY_PN="VirtualBox"
-MY_P=${MY_PN}-${PV}
+PATCHES_PV="7.0.14"
+ORIGIN_PN="VirtualBox"
+ORIGIN_PV=${PATCHES_PV}
 
-ORIGIN_PN="virtualbox"
+MY_PN=virtualbox
+MY_PV=${PV#*_pre}
+
+PATCHES_DIR="${WORKDIR}"/${PN}-${MY_PV}
 
 DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
 HOMEPAGE="https://www.virtualbox.org/ https://github.com/cyberus-technology/virtualbox-kvm"
-SRC_URI="https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-7.0.14.tar.bz2"
+SRC_URI="https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2"
 if [[ ${PV} == *9999* ]]; then
 	inherit git-r3
 
-	ORIGIN_PV="7.0.14"
+	ORIGIN_PV=${PATCHES_PV}
 	EGIT_REPO_URI="https://github.com/cyberus-technology/virtualbox-kvm"
 else
-	MY_PV=${PV#*_pre}
 	ORIGIN_PV=${PV%_pre*}
+	PATCHES_DIR="${WORKDIR}"/${PN}-dev-${MY_PV}
 	SRC_URI+=" https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz"
-	S="${WORKDIR}/${PN}-dev-${MY_PV}"
 fi
-SRC_URI+=" gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${ORIGIN_PN}/${ORIGIN_PN}-help-${ORIGIN_PV}.tar.xz ) )"
+MY_P=${ORIGIN_PN}-${ORIGIN_PV}
+SRC_URI+="
+	https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/${MY_P}.tar.bz2
+	gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${MY_PN}/${MY_PN}-help-${ORIGIN_PV}.tar.xz ) )
+"
+S="${WORKDIR}/${ORIGIN_PN}-${ORIGIN_PV}"
 
 LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
 SLOT="0"
@@ -199,7 +207,8 @@ REQUIRED_USE="
 
 PATCHES=(
 	# Downloaded patchset
-	"${WORKDIR}"/virtualbox-patches-7.0.14/patches
+	"${WORKDIR}"/virtualbox-patches-${PATCHES_PV}/patches
+	"${PATCHES_DIR}"/
 )
 
 pkg_pretend() {
@@ -255,7 +264,7 @@ src_prepare() {
 
 	# Disable things unused or split into separate ebuilds
 	sed -e "s@MY_LIBDIR@$(get_libdir)@" \
-		"${FILESDIR}"/${ORIGIN_PN}-5-localconfig > LocalConfig.kmk || die
+		"${FILESDIR}"/${MY_PN}-5-localconfig > LocalConfig.kmk || die
 
 	if ! use pch; then
 		# bug #753323
@@ -319,7 +328,7 @@ src_prepare() {
 		sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
 
 		# clang does not support this extension
-		eapply "${FILESDIR}"/${ORIGIN_PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
+		eapply "${FILESDIR}"/${MY_PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
 	fi
 
 	# fix doc generation
@@ -503,7 +512,7 @@ src_compile() {
 src_install() {
 	cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
 
-	local vbox_inst_path="/usr/$(get_libdir)/${ORIGIN_PN}" each size ico icofile
+	local vbox_inst_path="/usr/$(get_libdir)/${MY_PN}" each size ico icofile
 
 	vbox_inst() {
 		local binary="${1}"
@@ -521,7 +530,7 @@ src_install() {
 
 	# Create configuration files
 	insinto /etc/vbox
-	newins "${FILESDIR}/${ORIGIN_PN}-4-config" vbox.cfg
+	newins "${FILESDIR}/${MY_PN}-4-config" vbox.cfg
 
 	# Set the correct libdir
 	sed \
@@ -530,7 +539,7 @@ src_install() {
 
 	# Install the wrapper script
 	exeinto ${vbox_inst_path}
-	newexe "${FILESDIR}/${ORIGIN_PN}-ose-6-wrapper" "VBox"
+	newexe "${FILESDIR}/${MY_PN}-ose-6-wrapper" "VBox"
 	fowners root:vboxusers ${vbox_inst_path}/VBox
 	fperms 0750 ${vbox_inst_path}/VBox
 
@@ -608,21 +617,21 @@ src_install() {
 		doins -r nls
 		doins -r UnattendedTemplates
 
-		newmenu ${ORIGIN_PN}.desktop ${PN}.desktop
+		newmenu ${MY_PN}.desktop ${PN}.desktop
 
 		pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
 		for size in 16 32 48 64 128 ; do
-			newicon -s ${size} ${ORIGIN_PN}-${size}px.png ${PN}.png
+			newicon -s ${size} ${MY_PN}-${size}px.png ${PN}.png
 		done
-		newicon ${ORIGIN_PN}-48px.png ${PN}.png
-		newicon -s scalable ${ORIGIN_PN}.svg ${PN}.png
+		newicon ${MY_PN}-48px.png ${PN}.png
+		newicon -s scalable ${MY_PN}.svg ${PN}.png
 		popd &>/dev/null || die
 		pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
 		for size in 16 24 32 48 64 72 96 128 256 512 ; do
 			for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
-				icofile="${ORIGIN_PN}-${ico}-${size}px.png"
+				icofile="${MY_PN}-${ico}-${size}px.png"
 				if [[ -f "${icofile}" ]]; then
-					newicon -s ${size} ${icofile} ${ORIGIN_PN}-${ico}.png
+					newicon -s ${size} ${icofile} ${MY_PN}-${ico}.png
 				fi
 			done
 		done
@@ -668,7 +677,7 @@ src_install() {
 	fi
 
 	# Remove dead symlinks (bug #715338)
-	find "${ED}"/usr/$(get_libdir)/${ORIGIN_PN} -xtype l -delete || die
+	find "${ED}"/usr/$(get_libdir)/${MY_PN} -xtype l -delete || die
 
 	# Fix version string in extensions or else they don't get accepted
 	# by the virtualbox host process (see bug #438930)
@@ -688,11 +697,12 @@ src_install() {
 
 	if use doc; then
 		dodoc UserManual.pdf UserManual.q{ch,hc}
-		docompress -x /usr/share/doc/${PF}
+		docompress -x /usr/share/doc/${PF}/UserManual.*
 	elif use gui; then
-		dodoc "${WORKDIR}"/${ORIGIN_PN}-help-${ORIGIN_PV}/UserManual.q{ch,hc}
-		docompress -x /usr/share/doc/${PF}
+		dodoc "${WORKDIR}"/${MY_PN}-help-${ORIGIN_PV}/UserManual.q{ch,hc}
+		docompress -x /usr/share/doc/${PF}/UserManual.*
 	fi
+	dodoc ${PATCHES_DIR}/README.*
 
 	if use python; then
 		local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.so"
@@ -719,7 +729,7 @@ src_install() {
 		rm -r "${installer_dir}" || die
 	fi
 
-	newtmpfiles "${FILESDIR}"/${ORIGIN_PN}-vboxusb_tmpfilesd virtualbox-vboxusb.conf
+	newtmpfiles "${FILESDIR}"/${MY_PN}-vboxusb_tmpfilesd virtualbox-vboxusb.conf
 }
 
 pkg_postinst() {
@@ -747,7 +757,7 @@ pkg_postinst() {
 	optfeature "Guest additions ISO" app-emulation/virtualbox-additions
 
 	if ! use udev; then
-		ewarn "Without USE=udev, USB devices will likely not work in ${ORIGIN_PN}."
+		ewarn "Without USE=udev, USB devices will likely not work in ${MY_PN}."
 	fi
 }
 


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/
@ 2024-03-09 15:49 Viorel Munteanu
  0 siblings, 0 replies; 24+ messages in thread
From: Viorel Munteanu @ 2024-03-09 15:49 UTC (permalink / raw
  To: gentoo-commits

commit:     c6d1741c22e676452f15031045890c46dfcd883b
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Sat Mar  9 14:54:40 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Sat Mar  9 15:46:47 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6d1741c

app-emulation/virtualbox-kvm: add 7.0.14_pre20240307

Upstream switched to a collection of patches over the original
virtualbox sources.
They also wiped the git history and restarted it.

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox-kvm/Manifest              |   2 +
 .../virtualbox-kvm-7.0.14_pre20240307.ebuild       | 768 +++++++++++++++++++++
 2 files changed, 770 insertions(+)

diff --git a/app-emulation/virtualbox-kvm/Manifest b/app-emulation/virtualbox-kvm/Manifest
index df44ddd93619..6a7f5cb225d2 100644
--- a/app-emulation/virtualbox-kvm/Manifest
+++ b/app-emulation/virtualbox-kvm/Manifest
@@ -1,4 +1,6 @@
+DIST VirtualBox-7.0.14.tar.bz2 175654864 BLAKE2B 99f4942b864ce481d69983af31393d763452c5b55697ab642b43c155f5fbc2a9963fbe1b7744baef620d0b351e1ac73c1ef978698b9a7e77897bb9cbc18dc17c SHA512 6a82933bbf51ff255d17cb61ae6ddfb791a2200e3dff705f181cd06c6031b48cf15faa5e8202a65daef0fb20b7fd9e33d40dbd0f9cc3f49af49fff04a1cb0a73
 DIST virtualbox-help-7.0.14.tar.xz 3944832 BLAKE2B 95079e4da8c960c41cee799142779a6c2587e0e8af7956ca551cb5a4c0f36f313189dfe08afba83a0c32886866a7f9903b5e370008d6b3ce6283fb2288866b06 SHA512 e2f1acdd7577a93047e220300b1996d2855ddef20053c01294f8295fde0840645c41b75632d71dd2fc276219084fe4105fd057623f39375542358796425a2d03
 DIST virtualbox-kvm-7.0.14_pre20240208.tar.gz 213410613 BLAKE2B 19962b80d9509e018c23c860e3bdb0a6cb2864aca2e02bfd3b0b9fae5ced5202752d1f5e3f20181158dc5407c8f28badf6c4e617dce9219067931195085e7c4d SHA512 2de9720228b8751095cb29271495d5b90e0d63b6270cd4d33384bc23dce634f38379ebfde348933cd0672d7232e36523f876841f01862b9640a9d974adaf0574
 DIST virtualbox-kvm-7.0.14_pre20240226.tar.gz 213417750 BLAKE2B e67928ea411ed2b99dd2e8837bce4c1c5b22538b929f9751cd5ffd14b668c35cee93c4ff9a96e6664dccbc343969bdbed8401575b66bb82d0aa9f95f813e2580 SHA512 3cff52db6cd76756d392c43a8c5ebe8fd496b7d50205da45cb06d829d2748419727e1543939ddccb679dc7d780f55f3052e616cfa0873fe8f9885ebeba538db4
+DIST virtualbox-kvm-7.0.14_pre20240307.tar.gz 119996 BLAKE2B 7d58ca21d155973d95558d09d37d01515548e781081fce0106d1a76c576a572aef5b043405256b1d58f6b24172f05a81b96102fa1bba66bc51e3b0edc2892f0a SHA512 898a4375e5c23866e45b060cd4083bd3d8822e748b9aa94dd018197a6f8176c98c6a0e812d18f4d956fc291383d25ef107013ec61331004e81e0968997fe2119
 DIST virtualbox-patches-7.0.14.tar.bz2 6937 BLAKE2B da5f18efbba2a8f4701b3d29dc00784e4e80e18a18b029e5dce8c142eb4dc97637069bfc5081422064a7dc59dfacf503ebbdc3421caa96430dc53fa72988aa20 SHA512 57cc34b92e4626de5c445e34ae025da7ec0d752a60618c619a55c28bf7d6b1cc9dc81ea059b949b0f3e625568207e8084f9462faf487ca0daf2794e7f1feac36

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240307.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240307.ebuild
new file mode 100644
index 000000000000..653847dcfdf0
--- /dev/null
+++ b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240307.ebuild
@@ -0,0 +1,768 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# To add a new Python here:
+# 1. Patch src/libs/xpcom18a4/python/Makefile.kmk (copy the previous impl's logic)
+#    Do NOT skip this part. It'll end up silently not-building the Python extension
+#    or otherwise misbehaving if you do.
+#
+# 2. Then update PYTHON_COMPAT & set PYTHON_SINGLE_TARGET for testing w/ USE=python.
+#
+#  May need to look at other distros (e.g. Arch Linux) to find patches for newer
+#  Python versions as upstream tends to lag. Upstream may have patches on their
+#  trunk branch but not release branch.
+#
+#  See bug #785835, bug #856121.
+PYTHON_COMPAT=( python3_{10..11} )
+
+inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \
+	python-single-r1 tmpfiles toolchain-funcs udev xdg
+
+PATCHES_PV="7.0.14"
+ORIGIN_PN="VirtualBox"
+ORIGIN_PV=${PATCHES_PV}
+
+MY_PN=virtualbox
+MY_PV=${PV#*_pre}
+
+PATCHES_DIR="${WORKDIR}"/${PN}-${MY_PV}
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/ https://github.com/cyberus-technology/virtualbox-kvm"
+SRC_URI="https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2"
+if [[ ${PV} == *9999* ]]; then
+	inherit git-r3
+
+	ORIGIN_PV=${PATCHES_PV}
+	EGIT_REPO_URI="https://github.com/cyberus-technology/virtualbox-kvm"
+else
+	ORIGIN_PV=${PV%_pre*}
+	PATCHES_DIR="${WORKDIR}"/${PN}-dev-${MY_PV}
+	SRC_URI+=" https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz"
+fi
+MY_P=${ORIGIN_PN}-${ORIGIN_PV}
+SRC_URI+="
+	https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/${MY_P}.tar.bz2
+	gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${MY_PN}/${MY_PN}-help-${ORIGIN_PV}.tar.xz ) )
+"
+S="${WORKDIR}/${ORIGIN_PN}-${ORIGIN_PV}"
+
+LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
+SLOT="0"
+IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde vnc"
+
+unset WATCOM #856769
+
+COMMON_DEPEND="
+	${PYTHON_DEPS}
+	acct-group/vboxusers
+	dev-libs/libtpms
+	dev-libs/libxml2
+	dev-libs/openssl:0=
+	media-libs/libpng:0=
+	media-libs/libvpx:0=
+	net-misc/curl
+	sys-libs/zlib
+	dbus? ( sys-apps/dbus )
+	gui? (
+		dev-qt/qtcore:5
+		dev-qt/qtdbus:5
+		dev-qt/qtgui:5
+		dev-qt/qthelp:5
+		dev-qt/qtprintsupport:5
+		dev-qt/qtwidgets:5
+		dev-qt/qtx11extras:5
+		dev-qt/qtxml:5
+		x11-libs/libX11
+		x11-libs/libXt
+		opengl? ( dev-qt/qtopengl:5 )
+	)
+	lvm? ( sys-fs/lvm2 )
+	opengl? (
+		media-libs/libglvnd[X]
+		media-libs/vulkan-loader
+		x11-libs/libX11
+		x11-libs/libXt
+	)
+	pam? ( sys-libs/pam )
+	sdl? (
+		media-libs/libsdl2[X,video]
+		x11-libs/libX11
+		x11-libs/libXcursor
+		x11-libs/libXt
+	)
+	vboxwebsrv? ( net-libs/gsoap[-gnutls(-),debug?] )
+	vde? ( net-misc/vde )
+	vnc? ( >=net-libs/libvncserver-0.9.9 )
+"
+# We're stuck on JDK (and JRE, I guess?) 1.8 because of need for wsimport
+# with USE="vboxwebsrv java". Note that we have to put things in DEPEND,
+# not (only, anyway) BDEPEND, as the eclass magic to set the environment variables
+# based on *DEPEND doesn't work for BDEPEND at least right now.
+#
+# There's a comment in Config.kmk about it
+# ("With Java 11 wsimport was removed, usually part of a separate install now.")
+# but it needs more investigation.
+#
+# See bug #878299 to track this issue.
+DEPEND="
+	${COMMON_DEPEND}
+	>=dev-libs/libxslt-1.1.19
+	virtual/libcrypt:=
+	alsa? ( >=media-libs/alsa-lib-1.0.13 )
+	gui? (
+		x11-base/xorg-proto
+		x11-libs/libxcb:=
+		x11-libs/libXcursor
+		x11-libs/libXext
+		x11-libs/libXinerama
+		x11-libs/libXmu
+		x11-libs/libXrandr
+	)
+	java? ( virtual/jdk:1.8 )
+	opengl? (
+		x11-base/xorg-proto
+		x11-libs/libXcursor
+		x11-libs/libXinerama
+		x11-libs/libXmu
+		x11-libs/libXrandr
+		virtual/glu
+	)
+	sdl? ( x11-libs/libXinerama )
+	pulseaudio? ( media-libs/libpulse )
+	udev? ( >=virtual/udev-171 )
+"
+RDEPEND="
+	!app-emulation/virtualbox
+	${COMMON_DEPEND}
+	gui? ( x11-libs/libxcb:= )
+	java? ( virtual/jre:1.8 )
+"
+BDEPEND="
+	${PYTHON_DEPS}
+	>=app-arch/tar-1.34-r2
+	>=dev-lang/yasm-0.6.2
+	dev-libs/libIDL
+	dev-util/glslang
+	>=dev-build/kbuild-0.1.9998.3592
+	sys-apps/which
+	sys-devel/bin86
+	sys-libs/libcap
+	sys-power/iasl
+	virtual/pkgconfig
+	doc? (
+		app-text/docbook-sgml-dtd:4.4
+		app-text/docbook-xsl-ns-stylesheets
+		dev-texlive/texlive-basic
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-latexrecommended
+		dev-texlive/texlive-latexextra
+		dev-texlive/texlive-fontsrecommended
+		dev-texlive/texlive-fontsextra
+		dev-qt/qthelp:5
+	)
+	gui? ( dev-qt/linguist-tools:5 )
+	nls? ( dev-qt/linguist-tools:5 )
+	java? ( virtual/jdk:1.8 )
+"
+
+QA_FLAGS_IGNORED="
+	usr/lib64/virtualbox/VBoxDDR0.r0
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
+"
+
+QA_TEXTRELS="
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
+"
+
+QA_EXECSTACK="
+	usr/lib64/virtualbox/iPxeBaseBin
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/VBoxDDR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
+"
+
+QA_WX_LOAD="
+	usr/lib64/virtualbox/iPxeBaseBin
+"
+
+QA_PRESTRIPPED="
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/VBoxDDR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
+"
+
+REQUIRED_USE="
+	java? ( sdk )
+	python? ( sdk )
+	vboxwebsrv? ( java )
+	${PYTHON_REQUIRED_USE}
+"
+
+PATCHES=(
+	# Downloaded patchset
+	"${WORKDIR}"/virtualbox-patches-${PATCHES_PV}/patches
+	"${PATCHES_DIR}"/
+)
+
+pkg_pretend() {
+	if ! use gui; then
+		einfo "No USE=\"gui\" selected, this build will not include any Qt frontend."
+	fi
+
+	if ! use opengl; then
+		einfo "No USE=\"opengl\" selected, this build will lack"
+		einfo "the OpenGL feature."
+	fi
+	if ! use python; then
+		einfo "You have disabled the \"python\" USE flag. This will only"
+		einfo "disable the python bindings being installed."
+	fi
+	if ! use nls && use gui; then
+		einfo "USE=\"gui\" also selects USE=\"nls\".  This build"
+		einfo "will have NLS support."
+	fi
+
+	# 749273
+	local d=${ROOT}
+	for i in usr "$(get_libdir)"; do
+		d="${d}/$i"
+		if [[ "$(stat -L -c "%g %u" "${d}")" != "0 0" ]]; then
+			die "${d} should be owned by root, VirtualBox will not start otherwise"
+		fi
+	done
+}
+
+pkg_setup() {
+	java-pkg-opt-2_pkg_setup
+	python-single-r1_pkg_setup
+}
+
+src_unpack() {
+	[[ ${PV} == *9999* ]] && git-r3_src_unpack
+	default
+}
+
+src_prepare() {
+	default
+
+	# Only add nopie patch when we're on hardened
+	if gcc-specs-pie; then
+		eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch
+	fi
+
+	# Remove shipped binaries (kBuild, yasm) and tools, see bug #232775
+	rm -r kBuild/bin || die
+	# Remove everything in tools except kBuildUnits
+	find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || die
+
+	# Disable things unused or split into separate ebuilds
+	sed -e "s@MY_LIBDIR@$(get_libdir)@" \
+		"${FILESDIR}"/${MY_PN}-5-localconfig > LocalConfig.kmk || die
+
+	if ! use pch; then
+		# bug #753323
+		printf '\n%s\n' "VBOX_WITHOUT_PRECOMPILED_HEADERS=1" \
+			>> LocalConfig.kmk || die
+	fi
+
+	# bug #916002, #488176
+	tc-ld-force-bfd
+
+	# Respect LDFLAGS
+	sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
+		-i Config.kmk src/libs/xpcom18a4/Config.kmk || die
+
+	# Do not use hard-coded ld (related to bug #488176)
+	sed -e '/QUIET)ld /s@ld @$(LD) @' \
+		-i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
+
+	# Use PAM only when pam USE flag is enbaled (bug #376531)
+	if ! use pam; then
+		einfo "Disabling PAM removes the possibility to use the VRDP features."
+		sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
+		sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
+			src/VBox/HostServices/Makefile.kmk || die
+		echo -e "\nIPRT_WITHOUT_PAM=1" >> LocalConfig.kmk || die
+	fi
+
+	# add correct java path
+	if use java; then
+		sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
+			-i "${S}"/Config.kmk || die
+		java-pkg-opt-2_src_prepare
+	fi
+
+	#856811 #864274
+	# cannot filter out only one flag, some combinations of these flags produce buggy executables
+	for i in abm avx avx2 bmi bmi2 fma fma4 popcnt; do
+		append-cflags $(test-flags-CC -mno-$i)
+		append-cxxflags $(test-flags-CXX -mno-$i)
+	done
+
+	# bug #908814
+	filter-lto
+
+	# bug #843437
+	cat >> LocalConfig.kmk <<-EOF || die
+		CXXFLAGS=${CXXFLAGS}
+		CFLAGS=${CFLAGS}
+	EOF
+
+	if use sdl; then
+		sed -i 's/sdl-config/sdl2-config/' configure || die
+		echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
+	fi
+
+	#443830
+	echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die
+
+	if tc-is-clang; then
+		# clang assembler chokes on comments starting with /
+		sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
+
+		# clang does not support this extension
+		eapply "${FILESDIR}"/${MY_PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
+	fi
+
+	# fix doc generation
+	echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die
+	# replace xhtml names with numeric equivalents
+	find doc/manual -name \*.xml -exec sed -i \
+		-e 's/&nbsp;/\&#160;/g' \
+		-e 's/&ndash;/\&#8211;/g' \
+		-e 's/&larr;/\&#8592;/g' \
+		-e 's/&rarr;/\&#8594;/g' \
+		-e 's/&harr;/\&#8596;/g' {} \+ || die
+
+	# fix help path #891879
+	echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die
+
+	# 489208
+	# Cannot patch the whole text, many translations.  Use sed instead to replace the command
+	find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \
+		's/&apos;[^&]*\(vboxdrv setup\|vboxconfig\)&apos;/\&apos;emerge -1 virtualbox-modules\&apos;/' {} \+ || die
+	sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \
+		src/VBox/Frontends/VirtualBox/src/main.cpp \
+		src/VBox/VMM/VMMR3/VM.cpp || die
+
+	# 890561
+	echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
+
+	if ! use nls && ! use gui; then
+		cat >> LocalConfig.kmk <<-EOF || die
+			VBOX_WITH_NLS :=
+			VBOX_WITH_MAIN_NLS :=
+			VBOX_WITH_PUEL_NLS :=
+			VBOX_WITH_VBOXMANAGE_NLS :=
+		EOF
+	fi
+}
+
+src_configure() {
+	tc-export AR CC CXX LD RANLIB
+	export HOST_CC="$(tc-getBUILD_CC)"
+
+	local myconf=(
+		--with-gcc="$(tc-getCC)"
+		--with-g++="$(tc-getCXX)"
+
+		--disable-kmods
+		--with-kvm
+
+		# this is required for kvm to work.
+		# also this prohibits installation with suid.
+		--disable-hardening
+
+		$(usev !alsa --disable-alsa)
+		$(usev !dbus --disable-dbus)
+		$(usev debug --build-debug)
+		$(usev !doc --disable-docs)
+		$(usev !java --disable-java)
+		$(usev !lvm --disable-devmapper)
+		$(usev !pulseaudio --disable-pulse)
+		$(usev !python --disable-python)
+		$(usev vboxwebsrv --enable-webservice)
+		$(usev vde --enable-vde)
+		$(usev vnc --enable-vnc)
+	)
+
+	if use gui || use sdl || use opengl; then
+		myconf+=(
+			$(usev !opengl --disable-opengl)
+			$(usev !gui --disable-qt)
+			$(usev !sdl --disable-sdl)
+		)
+	else
+		myconf+=(
+			--build-headless
+		)
+	fi
+
+	if use amd64 && ! has_multilib_profile; then
+		myconf+=( --disable-vmmraw )
+	fi
+
+	# not an autoconf script
+	edo ./configure "${myconf[@]}"
+
+	# Force usage of chosen Python implementation
+	# bug #856121, bug #785835
+	sed -i \
+		-e '/VBOX_WITH_PYTHON.*=/d' \
+		-e '/VBOX_PATH_PYTHON_INC.*=/d' \
+		-e '/VBOX_LIB_PYTHON.*=/d' \
+		AutoConfig.kmk || die
+
+	cat >> AutoConfig.kmk <<-EOF || die
+		VBOX_WITH_PYTHON=$(usev python 1)
+		VBOX_PATH_PYTHON_INC=$(python_get_includedir)
+		VBOX_LIB_PYTHON=$(python_get_library_path)
+	EOF
+
+	if use python; then
+		local mangled_python="${EPYTHON#python}"
+		mangled_python="${mangled_python/.}"
+
+		# Stub out the script which defines what the Makefile ends up
+		# building for. gen_python_deps.py gets called by the Makefile
+		# with some args and it spits out a bunch of paths for a hardcoded
+		# list of Pythons. We just override it with what we're actually using.
+		# This minimises the amount of patching we have to do for new Pythons.
+		cat > src/libs/xpcom18a4/python/gen_python_deps.py <<-EOF || die
+			print("VBOX_PYTHON${mangled_python}_INC=$(python_get_includedir)")
+			print("VBOX_PYTHON${mangled_python}_LIB=$(python_get_library_path)")
+			print("VBOX_PYTHONDEF_INC=$(python_get_includedir)")
+			print("VBOX_PYTHONDEF_LIB=$(python_get_library_path)")
+		EOF
+
+		chmod +x src/libs/xpcom18a4/python/gen_python_deps.py || die
+	fi
+}
+
+src_compile() {
+	source ./env.sh || die
+
+	# Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
+	MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
+	MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
+	MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
+
+	local myemakeargs=(
+		VBOX_BUILD_PUBLISHER=_Gentoo
+		VBOX_WITH_VBOXIMGMOUNT=1
+
+		KBUILD_VERBOSE=2
+
+		AS="$(tc-getCC)"
+		CC="$(tc-getCC)"
+		CXX="$(tc-getCXX)"
+
+		TOOL_GCC3_CC="$(tc-getCC)"
+		TOOL_GCC3_LD="$(tc-getCC)"
+		TOOL_GCC3_AS="$(tc-getCC)"
+		TOOL_GCC3_AR="$(tc-getAR)"
+		TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
+
+		TOOL_GXX3_CC="$(tc-getCC)"
+		TOOL_GXX3_CXX="$(tc-getCXX)"
+		TOOL_GXX3_LD="$(tc-getCXX)"
+		TOOL_GXX3_AS="$(tc-getCXX)"
+		TOOL_GXX3_AR="$(tc-getAR)"
+		TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
+
+		TOOL_GCC3_CFLAGS="${CFLAGS}"
+		TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
+		VBOX_GCC_OPT="${CXXFLAGS}"
+		VBOX_NM="$(tc-getNM)"
+
+		TOOL_YASM_AS=yasm
+	)
+
+	if use amd64 && has_multilib_profile; then
+		myemakeargs+=(
+			CC32="$(tc-getCC) -m32"
+			CXX32="$(tc-getCXX) -m32"
+
+			TOOL_GCC32_CC="$(tc-getCC) -m32"
+			TOOL_GCC32_CXX="$(tc-getCXX) -m32"
+			TOOL_GCC32_LD="$(tc-getCC) -m32"
+			TOOL_GCC32_AS="$(tc-getCC) -m32"
+			TOOL_GCC32_AR="$(tc-getAR)"
+			TOOL_GCC32_OBJCOPY="$(tc-getOBJCOPY)"
+
+			TOOL_GXX32_CC="$(tc-getCC) -m32"
+			TOOL_GXX32_CXX="$(tc-getCXX) -m32"
+			TOOL_GXX32_LD="$(tc-getCXX) -m32"
+			TOOL_GXX32_AS="$(tc-getCXX) -m32"
+			TOOL_GXX32_AR="$(tc-getAR)"
+			TOOL_GXX32_OBJCOPY="$(tc-getOBJCOPY)"
+		)
+	fi
+
+	MAKE="kmk" emake "${myemakeargs[@]}" all
+}
+
+src_install() {
+	cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
+
+	local vbox_inst_path="/usr/$(get_libdir)/${MY_PN}" each size ico icofile
+
+	vbox_inst() {
+		local binary="${1}"
+		local perms="${2:-0750}"
+		local path="${3:-${vbox_inst_path}}"
+
+		[[ -n "${binary}" ]] || die "vbox_inst: No binary given!"
+		[[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
+
+		insinto ${path}
+		doins ${binary}
+		fowners root:vboxusers ${path}/${binary}
+		fperms ${perms} ${path}/${binary}
+	}
+
+	# Create configuration files
+	insinto /etc/vbox
+	newins "${FILESDIR}/${MY_PN}-4-config" vbox.cfg
+
+	# Set the correct libdir
+	sed \
+		-e "s@MY_LIBDIR@$(get_libdir)@" \
+		-i "${ED}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
+
+	# Install the wrapper script
+	exeinto ${vbox_inst_path}
+	newexe "${FILESDIR}/${MY_PN}-ose-6-wrapper" "VBox"
+	fowners root:vboxusers ${vbox_inst_path}/VBox
+	fperms 0750 ${vbox_inst_path}/VBox
+
+	# Install binaries and libraries
+	insinto ${vbox_inst_path}
+	doins -r components
+
+	for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,VMMPreload,XPCOMIPCD} \
+		vboximg-mount vbox-img *so *r0; do
+		vbox_inst ${each}
+	done
+
+	# These binaries need to be suid root.
+	for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
+		vbox_inst ${each} 0750
+	done
+
+	# Install EFI Firmware files (bug #320757)
+	for each in VBoxEFI{32,64}.fd ; do
+		vbox_inst ${each} 0644
+	done
+
+	# VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
+	# VBoxXPCOMIPCD (bug #524202)
+	for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
+		pax-mark -m "${ED}"${vbox_inst_path}/${each}
+	done
+
+	# Symlink binaries to the shipped wrapper
+	for each in vbox{autostart,balloonctrl,bugreport,headless,manage} \
+		VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do
+			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+	done
+	dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount
+	dosym ${vbox_inst_path}/vbox-img /usr/bin/vbox-img
+
+	if use pam; then
+		# VRDPAuth only works with this (bug #351949)
+		dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
+	fi
+
+	# set an env-variable for 3rd party tools
+	echo "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
+	# environment variables used during SDK binding installation
+	echo "VBOX_SDK_PATH=${vbox_inst_path}/sdk" >> "${T}/90virtualbox"
+	echo "VBOX_INSTALL_PATH=${vbox_inst_path}" >> "${T}/90virtualbox"
+	doenvd "${T}/90virtualbox"
+
+	if use sdl; then
+		vbox_inst VBoxSDL 0750
+		pax-mark -m "${ED}"${vbox_inst_path}/VBoxSDL
+
+		for each in vboxsdl VBoxSDL ; do
+			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+		done
+	fi
+
+	if use gui; then
+		vbox_inst VirtualBox
+		vbox_inst VirtualBoxVM 0750
+		for each in VirtualBox{,VM} ; do
+			pax-mark -m "${ED}"${vbox_inst_path}/${each}
+		done
+
+		if use opengl; then
+			vbox_inst VBoxTestOGL
+			pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
+		fi
+
+		for each in virtualbox{,vm} VirtualBox{,VM} ; do
+			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+		done
+
+		insinto /usr/share/${PN}
+		doins -r nls
+		doins -r UnattendedTemplates
+
+		newmenu ${MY_PN}.desktop ${PN}.desktop
+
+		pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
+		for size in 16 32 48 64 128 ; do
+			newicon -s ${size} ${MY_PN}-${size}px.png ${PN}.png
+		done
+		newicon ${MY_PN}-48px.png ${PN}.png
+		newicon -s scalable ${MY_PN}.svg ${PN}.png
+		popd &>/dev/null || die
+		pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
+		for size in 16 24 32 48 64 72 96 128 256 512 ; do
+			for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
+				icofile="${MY_PN}-${ico}-${size}px.png"
+				if [[ -f "${icofile}" ]]; then
+					newicon -s ${size} ${icofile} ${MY_PN}-${ico}.png
+				fi
+			done
+		done
+		popd &>/dev/null || die
+	fi
+
+	if use lvm; then
+		vbox_inst VBoxVolInfo 0750
+		dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
+	fi
+
+	if use sdk; then
+		insinto ${vbox_inst_path}
+		doins -r sdk
+
+		if use java; then
+			java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
+			java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
+		fi
+	fi
+
+	if use udev; then
+		local udevdir="$(get_udevdir)"
+		local udev_file="VBoxCreateUSBNode.sh"
+		local rules_file="10-virtualbox.rules"
+
+		insinto ${udevdir}
+		doins ${udev_file}
+		fowners root:vboxusers ${udevdir}/${udev_file}
+		fperms 0750 ${udevdir}/${udev_file}
+
+		insinto ${udevdir}/rules.d
+		sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \
+			> "${T}"/${rules_file} || die
+		doins "${T}"/${rules_file}
+	fi
+
+	if use vboxwebsrv; then
+		vbox_inst vboxwebsrv
+		dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
+		newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
+		newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
+	fi
+
+	# Remove dead symlinks (bug #715338)
+	find "${ED}"/usr/$(get_libdir)/${MY_PN} -xtype l -delete || die
+
+	# Fix version string in extensions or else they don't get accepted
+	# by the virtualbox host process (see bug #438930)
+	find ExtensionPacks -type f -name "ExtPack.xml" -exec sed -i '/Version/s@_Gentoo@@' {} \+ || die
+
+	local extensions_dir="${vbox_inst_path}/ExtensionPacks"
+
+	if use vnc; then
+		insinto ${extensions_dir}
+		doins -r ExtensionPacks/VNC
+	fi
+
+	if use dtrace; then
+		insinto ${extensions_dir}
+		doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
+	fi
+
+	if use doc; then
+		dodoc UserManual.pdf UserManual.q{ch,hc}
+		docompress -x /usr/share/doc/${PF}/UserManual.*
+	elif use gui; then
+		dodoc "${WORKDIR}"/${MY_PN}-help-${ORIGIN_PV}/UserManual.q{ch,hc}
+		docompress -x /usr/share/doc/${PF}/UserManual.*
+	fi
+	dodoc ${PATCHES_DIR}/README.*
+
+	if use python; then
+		local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.so"
+		if [[ ! -x "${python_path_ext}" ]]; then
+			eerror "Couldn't find ${python_path_ext}! Bindings were requested with USE=python"
+			eerror "but none were installed. This may happen if support for a Python target"
+			eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles."
+			die "Incomplete installation of Python bindings! File a bug with Gentoo!"
+		fi
+
+		# 378871
+		local installer_dir="${ED}/usr/$(get_libdir)/virtualbox/sdk/installer"
+		pushd "${installer_dir}" &> /dev/null || die
+		sed -e "s;%VBOX_INSTALL_PATH%;${vbox_inst_path};" \
+			-e "s;%VBOX_SDK_PATH%;${vbox_inst_path}/sdk;" \
+			-i vboxapi/__init__.py || die
+		# insert shebang, the files come without one
+		find vboxapi -name \*.py -exec sed -e "1 i\#! ${PYTHON}" -i {} \+ || die
+		python_domodule vboxapi
+		popd &> /dev/null || die
+		python_doscript vboxshell.py
+
+		# do not install the installer
+		rm -r "${installer_dir}" || die
+	fi
+
+	newtmpfiles "${FILESDIR}"/${MY_PN}-vboxusb_tmpfilesd virtualbox-vboxusb.conf
+}
+
+pkg_postinst() {
+	xdg_pkg_postinst
+
+	if use udev; then
+		udev_reload
+		udevadm trigger --subsystem-match=usb
+	fi
+
+	tmpfiles_process virtualbox-vboxusb.conf
+
+	if use gui; then
+		elog "To launch VirtualBox just type: \"virtualbox\"."
+	fi
+
+	elog "You must be in the vboxusers group to use VirtualBox."
+	elog ""
+	elog "The latest user manual is available for download at:"
+	elog "https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/UserManual.pdf"
+	elog ""
+
+	optfeature "Advanced networking setups" net-misc/bridge-utils sys-apps/usermode-utilities
+	optfeature "USB2, USB3, PXE boot, and VRDP support" app-emulation/virtualbox-extpack-oracle
+	optfeature "Guest additions ISO" app-emulation/virtualbox-additions
+
+	if ! use udev; then
+		ewarn "Without USE=udev, USB devices will likely not work in ${MY_PN}."
+	fi
+}
+
+pkg_postrm() {
+	xdg_pkg_postrm
+
+	use udev && udev_reload
+}


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/
@ 2024-03-25 16:16 Viorel Munteanu
  0 siblings, 0 replies; 24+ messages in thread
From: Viorel Munteanu @ 2024-03-25 16:16 UTC (permalink / raw
  To: gentoo-commits

commit:     51f3baa40f9082a888d351d54e963cddd5cf5921
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 25 16:00:40 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Mon Mar 25 16:15:54 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=51f3baa4

app-emulation/virtualbox-kvm: sync live ebuild

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild
index 653847dcfdf0..34dd04078029 100644
--- a/app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild
+++ b/app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild
@@ -208,7 +208,7 @@ REQUIRED_USE="
 PATCHES=(
 	# Downloaded patchset
 	"${WORKDIR}"/virtualbox-patches-${PATCHES_PV}/patches
-	"${PATCHES_DIR}"/
+	"${PATCHES_DIR}"/patches
 )
 
 pkg_pretend() {
@@ -697,10 +697,10 @@ src_install() {
 
 	if use doc; then
 		dodoc UserManual.pdf UserManual.q{ch,hc}
-		docompress -x /usr/share/doc/${PF}/UserManual.*
+		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
 	elif use gui; then
 		dodoc "${WORKDIR}"/${MY_PN}-help-${ORIGIN_PV}/UserManual.q{ch,hc}
-		docompress -x /usr/share/doc/${PF}/UserManual.*
+		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
 	fi
 	dodoc ${PATCHES_DIR}/README.*
 


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/
@ 2024-03-25 16:16 Viorel Munteanu
  0 siblings, 0 replies; 24+ messages in thread
From: Viorel Munteanu @ 2024-03-25 16:16 UTC (permalink / raw
  To: gentoo-commits

commit:     e73f28c33a52da0cd916e4210e3efe80995f28b1
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 25 16:00:29 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Mon Mar 25 16:15:54 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e73f28c3

app-emulation/virtualbox-kvm: add 7.0.14_pre20240325

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox-kvm/Manifest              |   1 +
 .../virtualbox-kvm-7.0.14_pre20240325.ebuild       | 768 +++++++++++++++++++++
 2 files changed, 769 insertions(+)

diff --git a/app-emulation/virtualbox-kvm/Manifest b/app-emulation/virtualbox-kvm/Manifest
index 6a7f5cb225d2..3bcf59294d21 100644
--- a/app-emulation/virtualbox-kvm/Manifest
+++ b/app-emulation/virtualbox-kvm/Manifest
@@ -3,4 +3,5 @@ DIST virtualbox-help-7.0.14.tar.xz 3944832 BLAKE2B 95079e4da8c960c41cee799142779
 DIST virtualbox-kvm-7.0.14_pre20240208.tar.gz 213410613 BLAKE2B 19962b80d9509e018c23c860e3bdb0a6cb2864aca2e02bfd3b0b9fae5ced5202752d1f5e3f20181158dc5407c8f28badf6c4e617dce9219067931195085e7c4d SHA512 2de9720228b8751095cb29271495d5b90e0d63b6270cd4d33384bc23dce634f38379ebfde348933cd0672d7232e36523f876841f01862b9640a9d974adaf0574
 DIST virtualbox-kvm-7.0.14_pre20240226.tar.gz 213417750 BLAKE2B e67928ea411ed2b99dd2e8837bce4c1c5b22538b929f9751cd5ffd14b668c35cee93c4ff9a96e6664dccbc343969bdbed8401575b66bb82d0aa9f95f813e2580 SHA512 3cff52db6cd76756d392c43a8c5ebe8fd496b7d50205da45cb06d829d2748419727e1543939ddccb679dc7d780f55f3052e616cfa0873fe8f9885ebeba538db4
 DIST virtualbox-kvm-7.0.14_pre20240307.tar.gz 119996 BLAKE2B 7d58ca21d155973d95558d09d37d01515548e781081fce0106d1a76c576a572aef5b043405256b1d58f6b24172f05a81b96102fa1bba66bc51e3b0edc2892f0a SHA512 898a4375e5c23866e45b060cd4083bd3d8822e748b9aa94dd018197a6f8176c98c6a0e812d18f4d956fc291383d25ef107013ec61331004e81e0968997fe2119
+DIST virtualbox-kvm-7.0.14_pre20240325.tar.gz 134910 BLAKE2B 1fc9e5ee97b062d7b56d4772b86a1e119c5534ef707a22bf16c84bfa3806c116166c8fed1318abd7ffcb352136d0529a3a8b9fe33aae9db3ae8de0d6f1b441f3 SHA512 d7a79b263a31700c76e4e76c5eb5b6473bb951753f3f463465f859c3626bd0da2d9d09db68d9b561f360c99f31c1fcfe5735fdcd7f7049711437c6251276f83f
 DIST virtualbox-patches-7.0.14.tar.bz2 6937 BLAKE2B da5f18efbba2a8f4701b3d29dc00784e4e80e18a18b029e5dce8c142eb4dc97637069bfc5081422064a7dc59dfacf503ebbdc3421caa96430dc53fa72988aa20 SHA512 57cc34b92e4626de5c445e34ae025da7ec0d752a60618c619a55c28bf7d6b1cc9dc81ea059b949b0f3e625568207e8084f9462faf487ca0daf2794e7f1feac36

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240325.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240325.ebuild
new file mode 100644
index 000000000000..34dd04078029
--- /dev/null
+++ b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240325.ebuild
@@ -0,0 +1,768 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# To add a new Python here:
+# 1. Patch src/libs/xpcom18a4/python/Makefile.kmk (copy the previous impl's logic)
+#    Do NOT skip this part. It'll end up silently not-building the Python extension
+#    or otherwise misbehaving if you do.
+#
+# 2. Then update PYTHON_COMPAT & set PYTHON_SINGLE_TARGET for testing w/ USE=python.
+#
+#  May need to look at other distros (e.g. Arch Linux) to find patches for newer
+#  Python versions as upstream tends to lag. Upstream may have patches on their
+#  trunk branch but not release branch.
+#
+#  See bug #785835, bug #856121.
+PYTHON_COMPAT=( python3_{10..11} )
+
+inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \
+	python-single-r1 tmpfiles toolchain-funcs udev xdg
+
+PATCHES_PV="7.0.14"
+ORIGIN_PN="VirtualBox"
+ORIGIN_PV=${PATCHES_PV}
+
+MY_PN=virtualbox
+MY_PV=${PV#*_pre}
+
+PATCHES_DIR="${WORKDIR}"/${PN}-${MY_PV}
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/ https://github.com/cyberus-technology/virtualbox-kvm"
+SRC_URI="https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2"
+if [[ ${PV} == *9999* ]]; then
+	inherit git-r3
+
+	ORIGIN_PV=${PATCHES_PV}
+	EGIT_REPO_URI="https://github.com/cyberus-technology/virtualbox-kvm"
+else
+	ORIGIN_PV=${PV%_pre*}
+	PATCHES_DIR="${WORKDIR}"/${PN}-dev-${MY_PV}
+	SRC_URI+=" https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz"
+fi
+MY_P=${ORIGIN_PN}-${ORIGIN_PV}
+SRC_URI+="
+	https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/${MY_P}.tar.bz2
+	gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${MY_PN}/${MY_PN}-help-${ORIGIN_PV}.tar.xz ) )
+"
+S="${WORKDIR}/${ORIGIN_PN}-${ORIGIN_PV}"
+
+LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
+SLOT="0"
+IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde vnc"
+
+unset WATCOM #856769
+
+COMMON_DEPEND="
+	${PYTHON_DEPS}
+	acct-group/vboxusers
+	dev-libs/libtpms
+	dev-libs/libxml2
+	dev-libs/openssl:0=
+	media-libs/libpng:0=
+	media-libs/libvpx:0=
+	net-misc/curl
+	sys-libs/zlib
+	dbus? ( sys-apps/dbus )
+	gui? (
+		dev-qt/qtcore:5
+		dev-qt/qtdbus:5
+		dev-qt/qtgui:5
+		dev-qt/qthelp:5
+		dev-qt/qtprintsupport:5
+		dev-qt/qtwidgets:5
+		dev-qt/qtx11extras:5
+		dev-qt/qtxml:5
+		x11-libs/libX11
+		x11-libs/libXt
+		opengl? ( dev-qt/qtopengl:5 )
+	)
+	lvm? ( sys-fs/lvm2 )
+	opengl? (
+		media-libs/libglvnd[X]
+		media-libs/vulkan-loader
+		x11-libs/libX11
+		x11-libs/libXt
+	)
+	pam? ( sys-libs/pam )
+	sdl? (
+		media-libs/libsdl2[X,video]
+		x11-libs/libX11
+		x11-libs/libXcursor
+		x11-libs/libXt
+	)
+	vboxwebsrv? ( net-libs/gsoap[-gnutls(-),debug?] )
+	vde? ( net-misc/vde )
+	vnc? ( >=net-libs/libvncserver-0.9.9 )
+"
+# We're stuck on JDK (and JRE, I guess?) 1.8 because of need for wsimport
+# with USE="vboxwebsrv java". Note that we have to put things in DEPEND,
+# not (only, anyway) BDEPEND, as the eclass magic to set the environment variables
+# based on *DEPEND doesn't work for BDEPEND at least right now.
+#
+# There's a comment in Config.kmk about it
+# ("With Java 11 wsimport was removed, usually part of a separate install now.")
+# but it needs more investigation.
+#
+# See bug #878299 to track this issue.
+DEPEND="
+	${COMMON_DEPEND}
+	>=dev-libs/libxslt-1.1.19
+	virtual/libcrypt:=
+	alsa? ( >=media-libs/alsa-lib-1.0.13 )
+	gui? (
+		x11-base/xorg-proto
+		x11-libs/libxcb:=
+		x11-libs/libXcursor
+		x11-libs/libXext
+		x11-libs/libXinerama
+		x11-libs/libXmu
+		x11-libs/libXrandr
+	)
+	java? ( virtual/jdk:1.8 )
+	opengl? (
+		x11-base/xorg-proto
+		x11-libs/libXcursor
+		x11-libs/libXinerama
+		x11-libs/libXmu
+		x11-libs/libXrandr
+		virtual/glu
+	)
+	sdl? ( x11-libs/libXinerama )
+	pulseaudio? ( media-libs/libpulse )
+	udev? ( >=virtual/udev-171 )
+"
+RDEPEND="
+	!app-emulation/virtualbox
+	${COMMON_DEPEND}
+	gui? ( x11-libs/libxcb:= )
+	java? ( virtual/jre:1.8 )
+"
+BDEPEND="
+	${PYTHON_DEPS}
+	>=app-arch/tar-1.34-r2
+	>=dev-lang/yasm-0.6.2
+	dev-libs/libIDL
+	dev-util/glslang
+	>=dev-build/kbuild-0.1.9998.3592
+	sys-apps/which
+	sys-devel/bin86
+	sys-libs/libcap
+	sys-power/iasl
+	virtual/pkgconfig
+	doc? (
+		app-text/docbook-sgml-dtd:4.4
+		app-text/docbook-xsl-ns-stylesheets
+		dev-texlive/texlive-basic
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-latexrecommended
+		dev-texlive/texlive-latexextra
+		dev-texlive/texlive-fontsrecommended
+		dev-texlive/texlive-fontsextra
+		dev-qt/qthelp:5
+	)
+	gui? ( dev-qt/linguist-tools:5 )
+	nls? ( dev-qt/linguist-tools:5 )
+	java? ( virtual/jdk:1.8 )
+"
+
+QA_FLAGS_IGNORED="
+	usr/lib64/virtualbox/VBoxDDR0.r0
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
+"
+
+QA_TEXTRELS="
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
+"
+
+QA_EXECSTACK="
+	usr/lib64/virtualbox/iPxeBaseBin
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/VBoxDDR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
+"
+
+QA_WX_LOAD="
+	usr/lib64/virtualbox/iPxeBaseBin
+"
+
+QA_PRESTRIPPED="
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/VBoxDDR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
+"
+
+REQUIRED_USE="
+	java? ( sdk )
+	python? ( sdk )
+	vboxwebsrv? ( java )
+	${PYTHON_REQUIRED_USE}
+"
+
+PATCHES=(
+	# Downloaded patchset
+	"${WORKDIR}"/virtualbox-patches-${PATCHES_PV}/patches
+	"${PATCHES_DIR}"/patches
+)
+
+pkg_pretend() {
+	if ! use gui; then
+		einfo "No USE=\"gui\" selected, this build will not include any Qt frontend."
+	fi
+
+	if ! use opengl; then
+		einfo "No USE=\"opengl\" selected, this build will lack"
+		einfo "the OpenGL feature."
+	fi
+	if ! use python; then
+		einfo "You have disabled the \"python\" USE flag. This will only"
+		einfo "disable the python bindings being installed."
+	fi
+	if ! use nls && use gui; then
+		einfo "USE=\"gui\" also selects USE=\"nls\".  This build"
+		einfo "will have NLS support."
+	fi
+
+	# 749273
+	local d=${ROOT}
+	for i in usr "$(get_libdir)"; do
+		d="${d}/$i"
+		if [[ "$(stat -L -c "%g %u" "${d}")" != "0 0" ]]; then
+			die "${d} should be owned by root, VirtualBox will not start otherwise"
+		fi
+	done
+}
+
+pkg_setup() {
+	java-pkg-opt-2_pkg_setup
+	python-single-r1_pkg_setup
+}
+
+src_unpack() {
+	[[ ${PV} == *9999* ]] && git-r3_src_unpack
+	default
+}
+
+src_prepare() {
+	default
+
+	# Only add nopie patch when we're on hardened
+	if gcc-specs-pie; then
+		eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch
+	fi
+
+	# Remove shipped binaries (kBuild, yasm) and tools, see bug #232775
+	rm -r kBuild/bin || die
+	# Remove everything in tools except kBuildUnits
+	find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || die
+
+	# Disable things unused or split into separate ebuilds
+	sed -e "s@MY_LIBDIR@$(get_libdir)@" \
+		"${FILESDIR}"/${MY_PN}-5-localconfig > LocalConfig.kmk || die
+
+	if ! use pch; then
+		# bug #753323
+		printf '\n%s\n' "VBOX_WITHOUT_PRECOMPILED_HEADERS=1" \
+			>> LocalConfig.kmk || die
+	fi
+
+	# bug #916002, #488176
+	tc-ld-force-bfd
+
+	# Respect LDFLAGS
+	sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
+		-i Config.kmk src/libs/xpcom18a4/Config.kmk || die
+
+	# Do not use hard-coded ld (related to bug #488176)
+	sed -e '/QUIET)ld /s@ld @$(LD) @' \
+		-i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
+
+	# Use PAM only when pam USE flag is enbaled (bug #376531)
+	if ! use pam; then
+		einfo "Disabling PAM removes the possibility to use the VRDP features."
+		sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
+		sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
+			src/VBox/HostServices/Makefile.kmk || die
+		echo -e "\nIPRT_WITHOUT_PAM=1" >> LocalConfig.kmk || die
+	fi
+
+	# add correct java path
+	if use java; then
+		sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
+			-i "${S}"/Config.kmk || die
+		java-pkg-opt-2_src_prepare
+	fi
+
+	#856811 #864274
+	# cannot filter out only one flag, some combinations of these flags produce buggy executables
+	for i in abm avx avx2 bmi bmi2 fma fma4 popcnt; do
+		append-cflags $(test-flags-CC -mno-$i)
+		append-cxxflags $(test-flags-CXX -mno-$i)
+	done
+
+	# bug #908814
+	filter-lto
+
+	# bug #843437
+	cat >> LocalConfig.kmk <<-EOF || die
+		CXXFLAGS=${CXXFLAGS}
+		CFLAGS=${CFLAGS}
+	EOF
+
+	if use sdl; then
+		sed -i 's/sdl-config/sdl2-config/' configure || die
+		echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
+	fi
+
+	#443830
+	echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die
+
+	if tc-is-clang; then
+		# clang assembler chokes on comments starting with /
+		sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
+
+		# clang does not support this extension
+		eapply "${FILESDIR}"/${MY_PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
+	fi
+
+	# fix doc generation
+	echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die
+	# replace xhtml names with numeric equivalents
+	find doc/manual -name \*.xml -exec sed -i \
+		-e 's/&nbsp;/\&#160;/g' \
+		-e 's/&ndash;/\&#8211;/g' \
+		-e 's/&larr;/\&#8592;/g' \
+		-e 's/&rarr;/\&#8594;/g' \
+		-e 's/&harr;/\&#8596;/g' {} \+ || die
+
+	# fix help path #891879
+	echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die
+
+	# 489208
+	# Cannot patch the whole text, many translations.  Use sed instead to replace the command
+	find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \
+		's/&apos;[^&]*\(vboxdrv setup\|vboxconfig\)&apos;/\&apos;emerge -1 virtualbox-modules\&apos;/' {} \+ || die
+	sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \
+		src/VBox/Frontends/VirtualBox/src/main.cpp \
+		src/VBox/VMM/VMMR3/VM.cpp || die
+
+	# 890561
+	echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
+
+	if ! use nls && ! use gui; then
+		cat >> LocalConfig.kmk <<-EOF || die
+			VBOX_WITH_NLS :=
+			VBOX_WITH_MAIN_NLS :=
+			VBOX_WITH_PUEL_NLS :=
+			VBOX_WITH_VBOXMANAGE_NLS :=
+		EOF
+	fi
+}
+
+src_configure() {
+	tc-export AR CC CXX LD RANLIB
+	export HOST_CC="$(tc-getBUILD_CC)"
+
+	local myconf=(
+		--with-gcc="$(tc-getCC)"
+		--with-g++="$(tc-getCXX)"
+
+		--disable-kmods
+		--with-kvm
+
+		# this is required for kvm to work.
+		# also this prohibits installation with suid.
+		--disable-hardening
+
+		$(usev !alsa --disable-alsa)
+		$(usev !dbus --disable-dbus)
+		$(usev debug --build-debug)
+		$(usev !doc --disable-docs)
+		$(usev !java --disable-java)
+		$(usev !lvm --disable-devmapper)
+		$(usev !pulseaudio --disable-pulse)
+		$(usev !python --disable-python)
+		$(usev vboxwebsrv --enable-webservice)
+		$(usev vde --enable-vde)
+		$(usev vnc --enable-vnc)
+	)
+
+	if use gui || use sdl || use opengl; then
+		myconf+=(
+			$(usev !opengl --disable-opengl)
+			$(usev !gui --disable-qt)
+			$(usev !sdl --disable-sdl)
+		)
+	else
+		myconf+=(
+			--build-headless
+		)
+	fi
+
+	if use amd64 && ! has_multilib_profile; then
+		myconf+=( --disable-vmmraw )
+	fi
+
+	# not an autoconf script
+	edo ./configure "${myconf[@]}"
+
+	# Force usage of chosen Python implementation
+	# bug #856121, bug #785835
+	sed -i \
+		-e '/VBOX_WITH_PYTHON.*=/d' \
+		-e '/VBOX_PATH_PYTHON_INC.*=/d' \
+		-e '/VBOX_LIB_PYTHON.*=/d' \
+		AutoConfig.kmk || die
+
+	cat >> AutoConfig.kmk <<-EOF || die
+		VBOX_WITH_PYTHON=$(usev python 1)
+		VBOX_PATH_PYTHON_INC=$(python_get_includedir)
+		VBOX_LIB_PYTHON=$(python_get_library_path)
+	EOF
+
+	if use python; then
+		local mangled_python="${EPYTHON#python}"
+		mangled_python="${mangled_python/.}"
+
+		# Stub out the script which defines what the Makefile ends up
+		# building for. gen_python_deps.py gets called by the Makefile
+		# with some args and it spits out a bunch of paths for a hardcoded
+		# list of Pythons. We just override it with what we're actually using.
+		# This minimises the amount of patching we have to do for new Pythons.
+		cat > src/libs/xpcom18a4/python/gen_python_deps.py <<-EOF || die
+			print("VBOX_PYTHON${mangled_python}_INC=$(python_get_includedir)")
+			print("VBOX_PYTHON${mangled_python}_LIB=$(python_get_library_path)")
+			print("VBOX_PYTHONDEF_INC=$(python_get_includedir)")
+			print("VBOX_PYTHONDEF_LIB=$(python_get_library_path)")
+		EOF
+
+		chmod +x src/libs/xpcom18a4/python/gen_python_deps.py || die
+	fi
+}
+
+src_compile() {
+	source ./env.sh || die
+
+	# Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
+	MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
+	MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
+	MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
+
+	local myemakeargs=(
+		VBOX_BUILD_PUBLISHER=_Gentoo
+		VBOX_WITH_VBOXIMGMOUNT=1
+
+		KBUILD_VERBOSE=2
+
+		AS="$(tc-getCC)"
+		CC="$(tc-getCC)"
+		CXX="$(tc-getCXX)"
+
+		TOOL_GCC3_CC="$(tc-getCC)"
+		TOOL_GCC3_LD="$(tc-getCC)"
+		TOOL_GCC3_AS="$(tc-getCC)"
+		TOOL_GCC3_AR="$(tc-getAR)"
+		TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
+
+		TOOL_GXX3_CC="$(tc-getCC)"
+		TOOL_GXX3_CXX="$(tc-getCXX)"
+		TOOL_GXX3_LD="$(tc-getCXX)"
+		TOOL_GXX3_AS="$(tc-getCXX)"
+		TOOL_GXX3_AR="$(tc-getAR)"
+		TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
+
+		TOOL_GCC3_CFLAGS="${CFLAGS}"
+		TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
+		VBOX_GCC_OPT="${CXXFLAGS}"
+		VBOX_NM="$(tc-getNM)"
+
+		TOOL_YASM_AS=yasm
+	)
+
+	if use amd64 && has_multilib_profile; then
+		myemakeargs+=(
+			CC32="$(tc-getCC) -m32"
+			CXX32="$(tc-getCXX) -m32"
+
+			TOOL_GCC32_CC="$(tc-getCC) -m32"
+			TOOL_GCC32_CXX="$(tc-getCXX) -m32"
+			TOOL_GCC32_LD="$(tc-getCC) -m32"
+			TOOL_GCC32_AS="$(tc-getCC) -m32"
+			TOOL_GCC32_AR="$(tc-getAR)"
+			TOOL_GCC32_OBJCOPY="$(tc-getOBJCOPY)"
+
+			TOOL_GXX32_CC="$(tc-getCC) -m32"
+			TOOL_GXX32_CXX="$(tc-getCXX) -m32"
+			TOOL_GXX32_LD="$(tc-getCXX) -m32"
+			TOOL_GXX32_AS="$(tc-getCXX) -m32"
+			TOOL_GXX32_AR="$(tc-getAR)"
+			TOOL_GXX32_OBJCOPY="$(tc-getOBJCOPY)"
+		)
+	fi
+
+	MAKE="kmk" emake "${myemakeargs[@]}" all
+}
+
+src_install() {
+	cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
+
+	local vbox_inst_path="/usr/$(get_libdir)/${MY_PN}" each size ico icofile
+
+	vbox_inst() {
+		local binary="${1}"
+		local perms="${2:-0750}"
+		local path="${3:-${vbox_inst_path}}"
+
+		[[ -n "${binary}" ]] || die "vbox_inst: No binary given!"
+		[[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
+
+		insinto ${path}
+		doins ${binary}
+		fowners root:vboxusers ${path}/${binary}
+		fperms ${perms} ${path}/${binary}
+	}
+
+	# Create configuration files
+	insinto /etc/vbox
+	newins "${FILESDIR}/${MY_PN}-4-config" vbox.cfg
+
+	# Set the correct libdir
+	sed \
+		-e "s@MY_LIBDIR@$(get_libdir)@" \
+		-i "${ED}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
+
+	# Install the wrapper script
+	exeinto ${vbox_inst_path}
+	newexe "${FILESDIR}/${MY_PN}-ose-6-wrapper" "VBox"
+	fowners root:vboxusers ${vbox_inst_path}/VBox
+	fperms 0750 ${vbox_inst_path}/VBox
+
+	# Install binaries and libraries
+	insinto ${vbox_inst_path}
+	doins -r components
+
+	for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,VMMPreload,XPCOMIPCD} \
+		vboximg-mount vbox-img *so *r0; do
+		vbox_inst ${each}
+	done
+
+	# These binaries need to be suid root.
+	for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
+		vbox_inst ${each} 0750
+	done
+
+	# Install EFI Firmware files (bug #320757)
+	for each in VBoxEFI{32,64}.fd ; do
+		vbox_inst ${each} 0644
+	done
+
+	# VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
+	# VBoxXPCOMIPCD (bug #524202)
+	for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
+		pax-mark -m "${ED}"${vbox_inst_path}/${each}
+	done
+
+	# Symlink binaries to the shipped wrapper
+	for each in vbox{autostart,balloonctrl,bugreport,headless,manage} \
+		VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do
+			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+	done
+	dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount
+	dosym ${vbox_inst_path}/vbox-img /usr/bin/vbox-img
+
+	if use pam; then
+		# VRDPAuth only works with this (bug #351949)
+		dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
+	fi
+
+	# set an env-variable for 3rd party tools
+	echo "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
+	# environment variables used during SDK binding installation
+	echo "VBOX_SDK_PATH=${vbox_inst_path}/sdk" >> "${T}/90virtualbox"
+	echo "VBOX_INSTALL_PATH=${vbox_inst_path}" >> "${T}/90virtualbox"
+	doenvd "${T}/90virtualbox"
+
+	if use sdl; then
+		vbox_inst VBoxSDL 0750
+		pax-mark -m "${ED}"${vbox_inst_path}/VBoxSDL
+
+		for each in vboxsdl VBoxSDL ; do
+			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+		done
+	fi
+
+	if use gui; then
+		vbox_inst VirtualBox
+		vbox_inst VirtualBoxVM 0750
+		for each in VirtualBox{,VM} ; do
+			pax-mark -m "${ED}"${vbox_inst_path}/${each}
+		done
+
+		if use opengl; then
+			vbox_inst VBoxTestOGL
+			pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
+		fi
+
+		for each in virtualbox{,vm} VirtualBox{,VM} ; do
+			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+		done
+
+		insinto /usr/share/${PN}
+		doins -r nls
+		doins -r UnattendedTemplates
+
+		newmenu ${MY_PN}.desktop ${PN}.desktop
+
+		pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
+		for size in 16 32 48 64 128 ; do
+			newicon -s ${size} ${MY_PN}-${size}px.png ${PN}.png
+		done
+		newicon ${MY_PN}-48px.png ${PN}.png
+		newicon -s scalable ${MY_PN}.svg ${PN}.png
+		popd &>/dev/null || die
+		pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
+		for size in 16 24 32 48 64 72 96 128 256 512 ; do
+			for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
+				icofile="${MY_PN}-${ico}-${size}px.png"
+				if [[ -f "${icofile}" ]]; then
+					newicon -s ${size} ${icofile} ${MY_PN}-${ico}.png
+				fi
+			done
+		done
+		popd &>/dev/null || die
+	fi
+
+	if use lvm; then
+		vbox_inst VBoxVolInfo 0750
+		dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
+	fi
+
+	if use sdk; then
+		insinto ${vbox_inst_path}
+		doins -r sdk
+
+		if use java; then
+			java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
+			java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
+		fi
+	fi
+
+	if use udev; then
+		local udevdir="$(get_udevdir)"
+		local udev_file="VBoxCreateUSBNode.sh"
+		local rules_file="10-virtualbox.rules"
+
+		insinto ${udevdir}
+		doins ${udev_file}
+		fowners root:vboxusers ${udevdir}/${udev_file}
+		fperms 0750 ${udevdir}/${udev_file}
+
+		insinto ${udevdir}/rules.d
+		sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \
+			> "${T}"/${rules_file} || die
+		doins "${T}"/${rules_file}
+	fi
+
+	if use vboxwebsrv; then
+		vbox_inst vboxwebsrv
+		dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
+		newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
+		newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
+	fi
+
+	# Remove dead symlinks (bug #715338)
+	find "${ED}"/usr/$(get_libdir)/${MY_PN} -xtype l -delete || die
+
+	# Fix version string in extensions or else they don't get accepted
+	# by the virtualbox host process (see bug #438930)
+	find ExtensionPacks -type f -name "ExtPack.xml" -exec sed -i '/Version/s@_Gentoo@@' {} \+ || die
+
+	local extensions_dir="${vbox_inst_path}/ExtensionPacks"
+
+	if use vnc; then
+		insinto ${extensions_dir}
+		doins -r ExtensionPacks/VNC
+	fi
+
+	if use dtrace; then
+		insinto ${extensions_dir}
+		doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
+	fi
+
+	if use doc; then
+		dodoc UserManual.pdf UserManual.q{ch,hc}
+		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
+	elif use gui; then
+		dodoc "${WORKDIR}"/${MY_PN}-help-${ORIGIN_PV}/UserManual.q{ch,hc}
+		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
+	fi
+	dodoc ${PATCHES_DIR}/README.*
+
+	if use python; then
+		local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.so"
+		if [[ ! -x "${python_path_ext}" ]]; then
+			eerror "Couldn't find ${python_path_ext}! Bindings were requested with USE=python"
+			eerror "but none were installed. This may happen if support for a Python target"
+			eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles."
+			die "Incomplete installation of Python bindings! File a bug with Gentoo!"
+		fi
+
+		# 378871
+		local installer_dir="${ED}/usr/$(get_libdir)/virtualbox/sdk/installer"
+		pushd "${installer_dir}" &> /dev/null || die
+		sed -e "s;%VBOX_INSTALL_PATH%;${vbox_inst_path};" \
+			-e "s;%VBOX_SDK_PATH%;${vbox_inst_path}/sdk;" \
+			-i vboxapi/__init__.py || die
+		# insert shebang, the files come without one
+		find vboxapi -name \*.py -exec sed -e "1 i\#! ${PYTHON}" -i {} \+ || die
+		python_domodule vboxapi
+		popd &> /dev/null || die
+		python_doscript vboxshell.py
+
+		# do not install the installer
+		rm -r "${installer_dir}" || die
+	fi
+
+	newtmpfiles "${FILESDIR}"/${MY_PN}-vboxusb_tmpfilesd virtualbox-vboxusb.conf
+}
+
+pkg_postinst() {
+	xdg_pkg_postinst
+
+	if use udev; then
+		udev_reload
+		udevadm trigger --subsystem-match=usb
+	fi
+
+	tmpfiles_process virtualbox-vboxusb.conf
+
+	if use gui; then
+		elog "To launch VirtualBox just type: \"virtualbox\"."
+	fi
+
+	elog "You must be in the vboxusers group to use VirtualBox."
+	elog ""
+	elog "The latest user manual is available for download at:"
+	elog "https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/UserManual.pdf"
+	elog ""
+
+	optfeature "Advanced networking setups" net-misc/bridge-utils sys-apps/usermode-utilities
+	optfeature "USB2, USB3, PXE boot, and VRDP support" app-emulation/virtualbox-extpack-oracle
+	optfeature "Guest additions ISO" app-emulation/virtualbox-additions
+
+	if ! use udev; then
+		ewarn "Without USE=udev, USB devices will likely not work in ${MY_PN}."
+	fi
+}
+
+pkg_postrm() {
+	xdg_pkg_postrm
+
+	use udev && udev_reload
+}


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/
@ 2024-03-25 16:16 Viorel Munteanu
  0 siblings, 0 replies; 24+ messages in thread
From: Viorel Munteanu @ 2024-03-25 16:16 UTC (permalink / raw
  To: gentoo-commits

commit:     3bee2c00f40703c89f308a0a855afaefe2671f34
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 25 16:01:12 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Mon Mar 25 16:15:54 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3bee2c00

app-emulation/virtualbox-kvm: drop 7.0.14_pre20240226

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox-kvm/Manifest              |   1 -
 .../virtualbox-kvm-7.0.14_pre20240226.ebuild       | 758 ---------------------
 2 files changed, 759 deletions(-)

diff --git a/app-emulation/virtualbox-kvm/Manifest b/app-emulation/virtualbox-kvm/Manifest
index 596b5ac194ce..ce4e260b6d62 100644
--- a/app-emulation/virtualbox-kvm/Manifest
+++ b/app-emulation/virtualbox-kvm/Manifest
@@ -1,6 +1,5 @@
 DIST VirtualBox-7.0.14.tar.bz2 175654864 BLAKE2B 99f4942b864ce481d69983af31393d763452c5b55697ab642b43c155f5fbc2a9963fbe1b7744baef620d0b351e1ac73c1ef978698b9a7e77897bb9cbc18dc17c SHA512 6a82933bbf51ff255d17cb61ae6ddfb791a2200e3dff705f181cd06c6031b48cf15faa5e8202a65daef0fb20b7fd9e33d40dbd0f9cc3f49af49fff04a1cb0a73
 DIST virtualbox-help-7.0.14.tar.xz 3944832 BLAKE2B 95079e4da8c960c41cee799142779a6c2587e0e8af7956ca551cb5a4c0f36f313189dfe08afba83a0c32886866a7f9903b5e370008d6b3ce6283fb2288866b06 SHA512 e2f1acdd7577a93047e220300b1996d2855ddef20053c01294f8295fde0840645c41b75632d71dd2fc276219084fe4105fd057623f39375542358796425a2d03
 DIST virtualbox-kvm-7.0.14_pre20240208.tar.gz 213410613 BLAKE2B 19962b80d9509e018c23c860e3bdb0a6cb2864aca2e02bfd3b0b9fae5ced5202752d1f5e3f20181158dc5407c8f28badf6c4e617dce9219067931195085e7c4d SHA512 2de9720228b8751095cb29271495d5b90e0d63b6270cd4d33384bc23dce634f38379ebfde348933cd0672d7232e36523f876841f01862b9640a9d974adaf0574
-DIST virtualbox-kvm-7.0.14_pre20240226.tar.gz 213417750 BLAKE2B e67928ea411ed2b99dd2e8837bce4c1c5b22538b929f9751cd5ffd14b668c35cee93c4ff9a96e6664dccbc343969bdbed8401575b66bb82d0aa9f95f813e2580 SHA512 3cff52db6cd76756d392c43a8c5ebe8fd496b7d50205da45cb06d829d2748419727e1543939ddccb679dc7d780f55f3052e616cfa0873fe8f9885ebeba538db4
 DIST virtualbox-kvm-7.0.14_pre20240325.tar.gz 134910 BLAKE2B 1fc9e5ee97b062d7b56d4772b86a1e119c5534ef707a22bf16c84bfa3806c116166c8fed1318abd7ffcb352136d0529a3a8b9fe33aae9db3ae8de0d6f1b441f3 SHA512 d7a79b263a31700c76e4e76c5eb5b6473bb951753f3f463465f859c3626bd0da2d9d09db68d9b561f360c99f31c1fcfe5735fdcd7f7049711437c6251276f83f
 DIST virtualbox-patches-7.0.14.tar.bz2 6937 BLAKE2B da5f18efbba2a8f4701b3d29dc00784e4e80e18a18b029e5dce8c142eb4dc97637069bfc5081422064a7dc59dfacf503ebbdc3421caa96430dc53fa72988aa20 SHA512 57cc34b92e4626de5c445e34ae025da7ec0d752a60618c619a55c28bf7d6b1cc9dc81ea059b949b0f3e625568207e8084f9462faf487ca0daf2794e7f1feac36

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240226.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240226.ebuild
deleted file mode 100644
index b7a2eef2da25..000000000000
--- a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240226.ebuild
+++ /dev/null
@@ -1,758 +0,0 @@
-# Copyright 2022-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# To add a new Python here:
-# 1. Patch src/libs/xpcom18a4/python/Makefile.kmk (copy the previous impl's logic)
-#    Do NOT skip this part. It'll end up silently not-building the Python extension
-#    or otherwise misbehaving if you do.
-#
-# 2. Then update PYTHON_COMPAT & set PYTHON_SINGLE_TARGET for testing w/ USE=python.
-#
-#  May need to look at other distros (e.g. Arch Linux) to find patches for newer
-#  Python versions as upstream tends to lag. Upstream may have patches on their
-#  trunk branch but not release branch.
-#
-#  See bug #785835, bug #856121.
-PYTHON_COMPAT=( python3_{10..11} )
-
-inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \
-	python-single-r1 tmpfiles toolchain-funcs udev xdg
-
-MY_PN="VirtualBox"
-MY_P=${MY_PN}-${PV}
-
-ORIGIN_PN="virtualbox"
-
-DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
-HOMEPAGE="https://www.virtualbox.org/ https://github.com/cyberus-technology/virtualbox-kvm"
-SRC_URI="https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-7.0.14.tar.bz2"
-if [[ ${PV} == *9999* ]]; then
-	inherit git-r3
-
-	ORIGIN_PV="7.0.14"
-	EGIT_REPO_URI="https://github.com/cyberus-technology/virtualbox-kvm"
-else
-	MY_PV=${PV#*_pre}
-	ORIGIN_PV=${PV%_pre*}
-	SRC_URI+=" https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz"
-	S="${WORKDIR}/${PN}-dev-${MY_PV}"
-fi
-SRC_URI+=" gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${ORIGIN_PN}/${ORIGIN_PN}-help-${ORIGIN_PV}.tar.xz ) )"
-
-LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
-SLOT="0"
-IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde vnc"
-
-unset WATCOM #856769
-
-COMMON_DEPEND="
-	${PYTHON_DEPS}
-	acct-group/vboxusers
-	dev-libs/libtpms
-	dev-libs/libxml2
-	dev-libs/openssl:0=
-	media-libs/libpng:0=
-	media-libs/libvpx:0=
-	net-misc/curl
-	sys-libs/zlib
-	dbus? ( sys-apps/dbus )
-	gui? (
-		dev-qt/qtcore:5
-		dev-qt/qtdbus:5
-		dev-qt/qtgui:5
-		dev-qt/qthelp:5
-		dev-qt/qtprintsupport:5
-		dev-qt/qtwidgets:5
-		dev-qt/qtx11extras:5
-		dev-qt/qtxml:5
-		x11-libs/libX11
-		x11-libs/libXt
-		opengl? ( dev-qt/qtopengl:5 )
-	)
-	lvm? ( sys-fs/lvm2 )
-	opengl? (
-		media-libs/libglvnd[X]
-		media-libs/vulkan-loader
-		x11-libs/libX11
-		x11-libs/libXt
-	)
-	pam? ( sys-libs/pam )
-	sdl? (
-		media-libs/libsdl2[X,video]
-		x11-libs/libX11
-		x11-libs/libXcursor
-		x11-libs/libXt
-	)
-	vboxwebsrv? ( net-libs/gsoap[-gnutls(-),debug?] )
-	vde? ( net-misc/vde )
-	vnc? ( >=net-libs/libvncserver-0.9.9 )
-"
-# We're stuck on JDK (and JRE, I guess?) 1.8 because of need for wsimport
-# with USE="vboxwebsrv java". Note that we have to put things in DEPEND,
-# not (only, anyway) BDEPEND, as the eclass magic to set the environment variables
-# based on *DEPEND doesn't work for BDEPEND at least right now.
-#
-# There's a comment in Config.kmk about it
-# ("With Java 11 wsimport was removed, usually part of a separate install now.")
-# but it needs more investigation.
-#
-# See bug #878299 to track this issue.
-DEPEND="
-	${COMMON_DEPEND}
-	>=dev-libs/libxslt-1.1.19
-	virtual/libcrypt:=
-	alsa? ( >=media-libs/alsa-lib-1.0.13 )
-	gui? (
-		x11-base/xorg-proto
-		x11-libs/libxcb:=
-		x11-libs/libXcursor
-		x11-libs/libXext
-		x11-libs/libXinerama
-		x11-libs/libXmu
-		x11-libs/libXrandr
-	)
-	java? ( virtual/jdk:1.8 )
-	opengl? (
-		x11-base/xorg-proto
-		x11-libs/libXcursor
-		x11-libs/libXinerama
-		x11-libs/libXmu
-		x11-libs/libXrandr
-		virtual/glu
-	)
-	sdl? ( x11-libs/libXinerama )
-	pulseaudio? ( media-libs/libpulse )
-	udev? ( >=virtual/udev-171 )
-"
-RDEPEND="
-	!app-emulation/virtualbox
-	${COMMON_DEPEND}
-	gui? ( x11-libs/libxcb:= )
-	java? ( virtual/jre:1.8 )
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	>=app-arch/tar-1.34-r2
-	>=dev-lang/yasm-0.6.2
-	dev-libs/libIDL
-	dev-util/glslang
-	>=dev-build/kbuild-0.1.9998.3592
-	sys-apps/which
-	sys-devel/bin86
-	sys-libs/libcap
-	sys-power/iasl
-	virtual/pkgconfig
-	doc? (
-		app-text/docbook-sgml-dtd:4.4
-		app-text/docbook-xsl-ns-stylesheets
-		dev-texlive/texlive-basic
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-latexrecommended
-		dev-texlive/texlive-latexextra
-		dev-texlive/texlive-fontsrecommended
-		dev-texlive/texlive-fontsextra
-		dev-qt/qthelp:5
-	)
-	gui? ( dev-qt/linguist-tools:5 )
-	nls? ( dev-qt/linguist-tools:5 )
-	java? ( virtual/jdk:1.8 )
-"
-
-QA_FLAGS_IGNORED="
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
-"
-
-QA_TEXTRELS="
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-"
-
-QA_EXECSTACK="
-	usr/lib64/virtualbox/iPxeBaseBin
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
-"
-
-QA_WX_LOAD="
-	usr/lib64/virtualbox/iPxeBaseBin
-"
-
-QA_PRESTRIPPED="
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-"
-
-REQUIRED_USE="
-	java? ( sdk )
-	python? ( sdk )
-	vboxwebsrv? ( java )
-	${PYTHON_REQUIRED_USE}
-"
-
-PATCHES=(
-	# Downloaded patchset
-	"${WORKDIR}"/virtualbox-patches-7.0.14/patches
-)
-
-pkg_pretend() {
-	if ! use gui; then
-		einfo "No USE=\"gui\" selected, this build will not include any Qt frontend."
-	fi
-
-	if ! use opengl; then
-		einfo "No USE=\"opengl\" selected, this build will lack"
-		einfo "the OpenGL feature."
-	fi
-	if ! use python; then
-		einfo "You have disabled the \"python\" USE flag. This will only"
-		einfo "disable the python bindings being installed."
-	fi
-	if ! use nls && use gui; then
-		einfo "USE=\"gui\" also selects USE=\"nls\".  This build"
-		einfo "will have NLS support."
-	fi
-
-	# 749273
-	local d=${ROOT}
-	for i in usr "$(get_libdir)"; do
-		d="${d}/$i"
-		if [[ "$(stat -L -c "%g %u" "${d}")" != "0 0" ]]; then
-			die "${d} should be owned by root, VirtualBox will not start otherwise"
-		fi
-	done
-}
-
-pkg_setup() {
-	java-pkg-opt-2_pkg_setup
-	python-single-r1_pkg_setup
-}
-
-src_unpack() {
-	[[ ${PV} == *9999* ]] && git-r3_src_unpack
-	default
-}
-
-src_prepare() {
-	default
-
-	# Only add nopie patch when we're on hardened
-	if gcc-specs-pie; then
-		eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch
-	fi
-
-	# Remove shipped binaries (kBuild, yasm) and tools, see bug #232775
-	rm -r kBuild/bin || die
-	# Remove everything in tools except kBuildUnits
-	find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || die
-
-	# Disable things unused or split into separate ebuilds
-	sed -e "s@MY_LIBDIR@$(get_libdir)@" \
-		"${FILESDIR}"/${ORIGIN_PN}-5-localconfig > LocalConfig.kmk || die
-
-	if ! use pch; then
-		# bug #753323
-		printf '\n%s\n' "VBOX_WITHOUT_PRECOMPILED_HEADERS=1" \
-			>> LocalConfig.kmk || die
-	fi
-
-	# bug #916002, #488176
-	tc-ld-force-bfd
-
-	# Respect LDFLAGS
-	sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
-		-i Config.kmk src/libs/xpcom18a4/Config.kmk || die
-
-	# Do not use hard-coded ld (related to bug #488176)
-	sed -e '/QUIET)ld /s@ld @$(LD) @' \
-		-i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
-
-	# Use PAM only when pam USE flag is enbaled (bug #376531)
-	if ! use pam; then
-		einfo "Disabling PAM removes the possibility to use the VRDP features."
-		sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
-		sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
-			src/VBox/HostServices/Makefile.kmk || die
-		echo -e "\nIPRT_WITHOUT_PAM=1" >> LocalConfig.kmk || die
-	fi
-
-	# add correct java path
-	if use java; then
-		sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
-			-i "${S}"/Config.kmk || die
-		java-pkg-opt-2_src_prepare
-	fi
-
-	#856811 #864274
-	# cannot filter out only one flag, some combinations of these flags produce buggy executables
-	for i in abm avx avx2 bmi bmi2 fma fma4 popcnt; do
-		append-cflags $(test-flags-CC -mno-$i)
-		append-cxxflags $(test-flags-CXX -mno-$i)
-	done
-
-	# bug #908814
-	filter-lto
-
-	# bug #843437
-	cat >> LocalConfig.kmk <<-EOF || die
-		CXXFLAGS=${CXXFLAGS}
-		CFLAGS=${CFLAGS}
-	EOF
-
-	if use sdl; then
-		sed -i 's/sdl-config/sdl2-config/' configure || die
-		echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
-	fi
-
-	#443830
-	echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die
-
-	if tc-is-clang; then
-		# clang assembler chokes on comments starting with /
-		sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
-
-		# clang does not support this extension
-		eapply "${FILESDIR}"/${ORIGIN_PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
-	fi
-
-	# fix doc generation
-	echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die
-	# replace xhtml names with numeric equivalents
-	find doc/manual -name \*.xml -exec sed -i \
-		-e 's/&nbsp;/\&#160;/g' \
-		-e 's/&ndash;/\&#8211;/g' \
-		-e 's/&larr;/\&#8592;/g' \
-		-e 's/&rarr;/\&#8594;/g' \
-		-e 's/&harr;/\&#8596;/g' {} \+ || die
-
-	# fix help path #891879
-	echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die
-
-	# 489208
-	# Cannot patch the whole text, many translations.  Use sed instead to replace the command
-	find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \
-		's/&apos;[^&]*\(vboxdrv setup\|vboxconfig\)&apos;/\&apos;emerge -1 virtualbox-modules\&apos;/' {} \+ || die
-	sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \
-		src/VBox/Frontends/VirtualBox/src/main.cpp \
-		src/VBox/VMM/VMMR3/VM.cpp || die
-
-	# 890561
-	echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
-
-	if ! use nls && ! use gui; then
-		cat >> LocalConfig.kmk <<-EOF || die
-			VBOX_WITH_NLS :=
-			VBOX_WITH_MAIN_NLS :=
-			VBOX_WITH_PUEL_NLS :=
-			VBOX_WITH_VBOXMANAGE_NLS :=
-		EOF
-	fi
-}
-
-src_configure() {
-	tc-export AR CC CXX LD RANLIB
-	export HOST_CC="$(tc-getBUILD_CC)"
-
-	local myconf=(
-		--with-gcc="$(tc-getCC)"
-		--with-g++="$(tc-getCXX)"
-
-		--disable-kmods
-		--with-kvm
-
-		# this is required for kvm to work.
-		# also this prohibits installation with suid.
-		--disable-hardening
-
-		$(usev !alsa --disable-alsa)
-		$(usev !dbus --disable-dbus)
-		$(usev debug --build-debug)
-		$(usev !doc --disable-docs)
-		$(usev !java --disable-java)
-		$(usev !lvm --disable-devmapper)
-		$(usev !pulseaudio --disable-pulse)
-		$(usev !python --disable-python)
-		$(usev vboxwebsrv --enable-webservice)
-		$(usev vde --enable-vde)
-		$(usev vnc --enable-vnc)
-	)
-
-	if use gui || use sdl || use opengl; then
-		myconf+=(
-			$(usev !opengl --disable-opengl)
-			$(usev !gui --disable-qt)
-			$(usev !sdl --disable-sdl)
-		)
-	else
-		myconf+=(
-			--build-headless
-		)
-	fi
-
-	if use amd64 && ! has_multilib_profile; then
-		myconf+=( --disable-vmmraw )
-	fi
-
-	# not an autoconf script
-	edo ./configure "${myconf[@]}"
-
-	# Force usage of chosen Python implementation
-	# bug #856121, bug #785835
-	sed -i \
-		-e '/VBOX_WITH_PYTHON.*=/d' \
-		-e '/VBOX_PATH_PYTHON_INC.*=/d' \
-		-e '/VBOX_LIB_PYTHON.*=/d' \
-		AutoConfig.kmk || die
-
-	cat >> AutoConfig.kmk <<-EOF || die
-		VBOX_WITH_PYTHON=$(usev python 1)
-		VBOX_PATH_PYTHON_INC=$(python_get_includedir)
-		VBOX_LIB_PYTHON=$(python_get_library_path)
-	EOF
-
-	if use python; then
-		local mangled_python="${EPYTHON#python}"
-		mangled_python="${mangled_python/.}"
-
-		# Stub out the script which defines what the Makefile ends up
-		# building for. gen_python_deps.py gets called by the Makefile
-		# with some args and it spits out a bunch of paths for a hardcoded
-		# list of Pythons. We just override it with what we're actually using.
-		# This minimises the amount of patching we have to do for new Pythons.
-		cat > src/libs/xpcom18a4/python/gen_python_deps.py <<-EOF || die
-			print("VBOX_PYTHON${mangled_python}_INC=$(python_get_includedir)")
-			print("VBOX_PYTHON${mangled_python}_LIB=$(python_get_library_path)")
-			print("VBOX_PYTHONDEF_INC=$(python_get_includedir)")
-			print("VBOX_PYTHONDEF_LIB=$(python_get_library_path)")
-		EOF
-
-		chmod +x src/libs/xpcom18a4/python/gen_python_deps.py || die
-	fi
-}
-
-src_compile() {
-	source ./env.sh || die
-
-	# Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
-	MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
-	MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
-	MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
-
-	local myemakeargs=(
-		VBOX_BUILD_PUBLISHER=_Gentoo
-		VBOX_WITH_VBOXIMGMOUNT=1
-
-		KBUILD_VERBOSE=2
-
-		AS="$(tc-getCC)"
-		CC="$(tc-getCC)"
-		CXX="$(tc-getCXX)"
-
-		TOOL_GCC3_CC="$(tc-getCC)"
-		TOOL_GCC3_LD="$(tc-getCC)"
-		TOOL_GCC3_AS="$(tc-getCC)"
-		TOOL_GCC3_AR="$(tc-getAR)"
-		TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
-
-		TOOL_GXX3_CC="$(tc-getCC)"
-		TOOL_GXX3_CXX="$(tc-getCXX)"
-		TOOL_GXX3_LD="$(tc-getCXX)"
-		TOOL_GXX3_AS="$(tc-getCXX)"
-		TOOL_GXX3_AR="$(tc-getAR)"
-		TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
-
-		TOOL_GCC3_CFLAGS="${CFLAGS}"
-		TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
-		VBOX_GCC_OPT="${CXXFLAGS}"
-		VBOX_NM="$(tc-getNM)"
-
-		TOOL_YASM_AS=yasm
-	)
-
-	if use amd64 && has_multilib_profile; then
-		myemakeargs+=(
-			CC32="$(tc-getCC) -m32"
-			CXX32="$(tc-getCXX) -m32"
-
-			TOOL_GCC32_CC="$(tc-getCC) -m32"
-			TOOL_GCC32_CXX="$(tc-getCXX) -m32"
-			TOOL_GCC32_LD="$(tc-getCC) -m32"
-			TOOL_GCC32_AS="$(tc-getCC) -m32"
-			TOOL_GCC32_AR="$(tc-getAR)"
-			TOOL_GCC32_OBJCOPY="$(tc-getOBJCOPY)"
-
-			TOOL_GXX32_CC="$(tc-getCC) -m32"
-			TOOL_GXX32_CXX="$(tc-getCXX) -m32"
-			TOOL_GXX32_LD="$(tc-getCXX) -m32"
-			TOOL_GXX32_AS="$(tc-getCXX) -m32"
-			TOOL_GXX32_AR="$(tc-getAR)"
-			TOOL_GXX32_OBJCOPY="$(tc-getOBJCOPY)"
-		)
-	fi
-
-	MAKE="kmk" emake "${myemakeargs[@]}" all
-}
-
-src_install() {
-	cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
-
-	local vbox_inst_path="/usr/$(get_libdir)/${ORIGIN_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}/${ORIGIN_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}/${ORIGIN_PN}-ose-6-wrapper" "VBox"
-	fowners root:vboxusers ${vbox_inst_path}/VBox
-	fperms 0750 ${vbox_inst_path}/VBox
-
-	# Install binaries and libraries
-	insinto ${vbox_inst_path}
-	doins -r components
-
-	for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,VMMPreload,XPCOMIPCD} \
-		vboximg-mount vbox-img *so *r0; do
-		vbox_inst ${each}
-	done
-
-	# These binaries need to be suid root.
-	for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
-		vbox_inst ${each} 0750
-	done
-
-	# Install EFI Firmware files (bug #320757)
-	for each in VBoxEFI{32,64}.fd ; do
-		vbox_inst ${each} 0644
-	done
-
-	# VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
-	# VBoxXPCOMIPCD (bug #524202)
-	for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
-		pax-mark -m "${ED}"${vbox_inst_path}/${each}
-	done
-
-	# Symlink binaries to the shipped wrapper
-	for each in vbox{autostart,balloonctrl,bugreport,headless,manage} \
-		VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-	done
-	dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount
-	dosym ${vbox_inst_path}/vbox-img /usr/bin/vbox-img
-
-	if use pam; then
-		# VRDPAuth only works with this (bug #351949)
-		dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
-	fi
-
-	# set an env-variable for 3rd party tools
-	echo "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
-	# environment variables used during SDK binding installation
-	echo "VBOX_SDK_PATH=${vbox_inst_path}/sdk" >> "${T}/90virtualbox"
-	echo "VBOX_INSTALL_PATH=${vbox_inst_path}" >> "${T}/90virtualbox"
-	doenvd "${T}/90virtualbox"
-
-	if use sdl; then
-		vbox_inst VBoxSDL 0750
-		pax-mark -m "${ED}"${vbox_inst_path}/VBoxSDL
-
-		for each in vboxsdl VBoxSDL ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-		done
-	fi
-
-	if use gui; then
-		vbox_inst VirtualBox
-		vbox_inst VirtualBoxVM 0750
-		for each in VirtualBox{,VM} ; do
-			pax-mark -m "${ED}"${vbox_inst_path}/${each}
-		done
-
-		if use opengl; then
-			vbox_inst VBoxTestOGL
-			pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
-		fi
-
-		for each in virtualbox{,vm} VirtualBox{,VM} ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-		done
-
-		insinto /usr/share/${PN}
-		doins -r nls
-		doins -r UnattendedTemplates
-
-		newmenu ${ORIGIN_PN}.desktop ${PN}.desktop
-
-		pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
-		for size in 16 32 48 64 128 ; do
-			newicon -s ${size} ${ORIGIN_PN}-${size}px.png ${PN}.png
-		done
-		newicon ${ORIGIN_PN}-48px.png ${PN}.png
-		newicon -s scalable ${ORIGIN_PN}.svg ${PN}.png
-		popd &>/dev/null || die
-		pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
-		for size in 16 24 32 48 64 72 96 128 256 512 ; do
-			for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
-				icofile="${ORIGIN_PN}-${ico}-${size}px.png"
-				if [[ -f "${icofile}" ]]; then
-					newicon -s ${size} ${icofile} ${ORIGIN_PN}-${ico}.png
-				fi
-			done
-		done
-		popd &>/dev/null || die
-	fi
-
-	if use lvm; then
-		vbox_inst VBoxVolInfo 0750
-		dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
-	fi
-
-	if use sdk; then
-		insinto ${vbox_inst_path}
-		doins -r sdk
-
-		if use java; then
-			java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
-			java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
-		fi
-	fi
-
-	if use udev; then
-		local udevdir="$(get_udevdir)"
-		local udev_file="VBoxCreateUSBNode.sh"
-		local rules_file="10-virtualbox.rules"
-
-		insinto ${udevdir}
-		doins ${udev_file}
-		fowners root:vboxusers ${udevdir}/${udev_file}
-		fperms 0750 ${udevdir}/${udev_file}
-
-		insinto ${udevdir}/rules.d
-		sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \
-			> "${T}"/${rules_file} || die
-		doins "${T}"/${rules_file}
-	fi
-
-	if use vboxwebsrv; then
-		vbox_inst vboxwebsrv
-		dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
-		newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
-		newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
-	fi
-
-	# Remove dead symlinks (bug #715338)
-	find "${ED}"/usr/$(get_libdir)/${ORIGIN_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}"/${ORIGIN_PN}-help-${ORIGIN_PV}/UserManual.q{ch,hc}
-		docompress -x /usr/share/doc/${PF}
-	fi
-
-	if use python; then
-		local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.so"
-		if [[ ! -x "${python_path_ext}" ]]; then
-			eerror "Couldn't find ${python_path_ext}! Bindings were requested with USE=python"
-			eerror "but none were installed. This may happen if support for a Python target"
-			eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles."
-			die "Incomplete installation of Python bindings! File a bug with Gentoo!"
-		fi
-
-		# 378871
-		local installer_dir="${ED}/usr/$(get_libdir)/virtualbox/sdk/installer"
-		pushd "${installer_dir}" &> /dev/null || die
-		sed -e "s;%VBOX_INSTALL_PATH%;${vbox_inst_path};" \
-			-e "s;%VBOX_SDK_PATH%;${vbox_inst_path}/sdk;" \
-			-i vboxapi/__init__.py || die
-		# insert shebang, the files come without one
-		find vboxapi -name \*.py -exec sed -e "1 i\#! ${PYTHON}" -i {} \+ || die
-		python_domodule vboxapi
-		popd &> /dev/null || die
-		python_doscript vboxshell.py
-
-		# do not install the installer
-		rm -r "${installer_dir}" || die
-	fi
-
-	newtmpfiles "${FILESDIR}"/${ORIGIN_PN}-vboxusb_tmpfilesd virtualbox-vboxusb.conf
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-
-	if use udev; then
-		udev_reload
-		udevadm trigger --subsystem-match=usb
-	fi
-
-	tmpfiles_process virtualbox-vboxusb.conf
-
-	if use gui; then
-		elog "To launch VirtualBox just type: \"virtualbox\"."
-	fi
-
-	elog "You must be in the vboxusers group to use VirtualBox."
-	elog ""
-	elog "The latest user manual is available for download at:"
-	elog "https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/UserManual.pdf"
-	elog ""
-
-	optfeature "Advanced networking setups" net-misc/bridge-utils sys-apps/usermode-utilities
-	optfeature "USB2, USB3, PXE boot, and VRDP support" app-emulation/virtualbox-extpack-oracle
-	optfeature "Guest additions ISO" app-emulation/virtualbox-additions
-
-	if ! use udev; then
-		ewarn "Without USE=udev, USB devices will likely not work in ${ORIGIN_PN}."
-	fi
-}
-
-pkg_postrm() {
-	xdg_pkg_postrm
-
-	use udev && udev_reload
-}


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/
@ 2024-03-25 16:16 Viorel Munteanu
  0 siblings, 0 replies; 24+ messages in thread
From: Viorel Munteanu @ 2024-03-25 16:16 UTC (permalink / raw
  To: gentoo-commits

commit:     02b321b6b62dfb6d900cca196ee96dec326af8bd
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 25 16:01:04 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Mon Mar 25 16:15:54 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02b321b6

app-emulation/virtualbox-kvm: drop 7.0.14_pre20240307

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox-kvm/Manifest              |   1 -
 .../virtualbox-kvm-7.0.14_pre20240307.ebuild       | 768 ---------------------
 2 files changed, 769 deletions(-)

diff --git a/app-emulation/virtualbox-kvm/Manifest b/app-emulation/virtualbox-kvm/Manifest
index 3bcf59294d21..596b5ac194ce 100644
--- a/app-emulation/virtualbox-kvm/Manifest
+++ b/app-emulation/virtualbox-kvm/Manifest
@@ -2,6 +2,5 @@ DIST VirtualBox-7.0.14.tar.bz2 175654864 BLAKE2B 99f4942b864ce481d69983af31393d7
 DIST virtualbox-help-7.0.14.tar.xz 3944832 BLAKE2B 95079e4da8c960c41cee799142779a6c2587e0e8af7956ca551cb5a4c0f36f313189dfe08afba83a0c32886866a7f9903b5e370008d6b3ce6283fb2288866b06 SHA512 e2f1acdd7577a93047e220300b1996d2855ddef20053c01294f8295fde0840645c41b75632d71dd2fc276219084fe4105fd057623f39375542358796425a2d03
 DIST virtualbox-kvm-7.0.14_pre20240208.tar.gz 213410613 BLAKE2B 19962b80d9509e018c23c860e3bdb0a6cb2864aca2e02bfd3b0b9fae5ced5202752d1f5e3f20181158dc5407c8f28badf6c4e617dce9219067931195085e7c4d SHA512 2de9720228b8751095cb29271495d5b90e0d63b6270cd4d33384bc23dce634f38379ebfde348933cd0672d7232e36523f876841f01862b9640a9d974adaf0574
 DIST virtualbox-kvm-7.0.14_pre20240226.tar.gz 213417750 BLAKE2B e67928ea411ed2b99dd2e8837bce4c1c5b22538b929f9751cd5ffd14b668c35cee93c4ff9a96e6664dccbc343969bdbed8401575b66bb82d0aa9f95f813e2580 SHA512 3cff52db6cd76756d392c43a8c5ebe8fd496b7d50205da45cb06d829d2748419727e1543939ddccb679dc7d780f55f3052e616cfa0873fe8f9885ebeba538db4
-DIST virtualbox-kvm-7.0.14_pre20240307.tar.gz 119996 BLAKE2B 7d58ca21d155973d95558d09d37d01515548e781081fce0106d1a76c576a572aef5b043405256b1d58f6b24172f05a81b96102fa1bba66bc51e3b0edc2892f0a SHA512 898a4375e5c23866e45b060cd4083bd3d8822e748b9aa94dd018197a6f8176c98c6a0e812d18f4d956fc291383d25ef107013ec61331004e81e0968997fe2119
 DIST virtualbox-kvm-7.0.14_pre20240325.tar.gz 134910 BLAKE2B 1fc9e5ee97b062d7b56d4772b86a1e119c5534ef707a22bf16c84bfa3806c116166c8fed1318abd7ffcb352136d0529a3a8b9fe33aae9db3ae8de0d6f1b441f3 SHA512 d7a79b263a31700c76e4e76c5eb5b6473bb951753f3f463465f859c3626bd0da2d9d09db68d9b561f360c99f31c1fcfe5735fdcd7f7049711437c6251276f83f
 DIST virtualbox-patches-7.0.14.tar.bz2 6937 BLAKE2B da5f18efbba2a8f4701b3d29dc00784e4e80e18a18b029e5dce8c142eb4dc97637069bfc5081422064a7dc59dfacf503ebbdc3421caa96430dc53fa72988aa20 SHA512 57cc34b92e4626de5c445e34ae025da7ec0d752a60618c619a55c28bf7d6b1cc9dc81ea059b949b0f3e625568207e8084f9462faf487ca0daf2794e7f1feac36

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240307.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240307.ebuild
deleted file mode 100644
index 653847dcfdf0..000000000000
--- a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240307.ebuild
+++ /dev/null
@@ -1,768 +0,0 @@
-# Copyright 2022-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# To add a new Python here:
-# 1. Patch src/libs/xpcom18a4/python/Makefile.kmk (copy the previous impl's logic)
-#    Do NOT skip this part. It'll end up silently not-building the Python extension
-#    or otherwise misbehaving if you do.
-#
-# 2. Then update PYTHON_COMPAT & set PYTHON_SINGLE_TARGET for testing w/ USE=python.
-#
-#  May need to look at other distros (e.g. Arch Linux) to find patches for newer
-#  Python versions as upstream tends to lag. Upstream may have patches on their
-#  trunk branch but not release branch.
-#
-#  See bug #785835, bug #856121.
-PYTHON_COMPAT=( python3_{10..11} )
-
-inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \
-	python-single-r1 tmpfiles toolchain-funcs udev xdg
-
-PATCHES_PV="7.0.14"
-ORIGIN_PN="VirtualBox"
-ORIGIN_PV=${PATCHES_PV}
-
-MY_PN=virtualbox
-MY_PV=${PV#*_pre}
-
-PATCHES_DIR="${WORKDIR}"/${PN}-${MY_PV}
-
-DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
-HOMEPAGE="https://www.virtualbox.org/ https://github.com/cyberus-technology/virtualbox-kvm"
-SRC_URI="https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2"
-if [[ ${PV} == *9999* ]]; then
-	inherit git-r3
-
-	ORIGIN_PV=${PATCHES_PV}
-	EGIT_REPO_URI="https://github.com/cyberus-technology/virtualbox-kvm"
-else
-	ORIGIN_PV=${PV%_pre*}
-	PATCHES_DIR="${WORKDIR}"/${PN}-dev-${MY_PV}
-	SRC_URI+=" https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz"
-fi
-MY_P=${ORIGIN_PN}-${ORIGIN_PV}
-SRC_URI+="
-	https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/${MY_P}.tar.bz2
-	gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${MY_PN}/${MY_PN}-help-${ORIGIN_PV}.tar.xz ) )
-"
-S="${WORKDIR}/${ORIGIN_PN}-${ORIGIN_PV}"
-
-LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
-SLOT="0"
-IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde vnc"
-
-unset WATCOM #856769
-
-COMMON_DEPEND="
-	${PYTHON_DEPS}
-	acct-group/vboxusers
-	dev-libs/libtpms
-	dev-libs/libxml2
-	dev-libs/openssl:0=
-	media-libs/libpng:0=
-	media-libs/libvpx:0=
-	net-misc/curl
-	sys-libs/zlib
-	dbus? ( sys-apps/dbus )
-	gui? (
-		dev-qt/qtcore:5
-		dev-qt/qtdbus:5
-		dev-qt/qtgui:5
-		dev-qt/qthelp:5
-		dev-qt/qtprintsupport:5
-		dev-qt/qtwidgets:5
-		dev-qt/qtx11extras:5
-		dev-qt/qtxml:5
-		x11-libs/libX11
-		x11-libs/libXt
-		opengl? ( dev-qt/qtopengl:5 )
-	)
-	lvm? ( sys-fs/lvm2 )
-	opengl? (
-		media-libs/libglvnd[X]
-		media-libs/vulkan-loader
-		x11-libs/libX11
-		x11-libs/libXt
-	)
-	pam? ( sys-libs/pam )
-	sdl? (
-		media-libs/libsdl2[X,video]
-		x11-libs/libX11
-		x11-libs/libXcursor
-		x11-libs/libXt
-	)
-	vboxwebsrv? ( net-libs/gsoap[-gnutls(-),debug?] )
-	vde? ( net-misc/vde )
-	vnc? ( >=net-libs/libvncserver-0.9.9 )
-"
-# We're stuck on JDK (and JRE, I guess?) 1.8 because of need for wsimport
-# with USE="vboxwebsrv java". Note that we have to put things in DEPEND,
-# not (only, anyway) BDEPEND, as the eclass magic to set the environment variables
-# based on *DEPEND doesn't work for BDEPEND at least right now.
-#
-# There's a comment in Config.kmk about it
-# ("With Java 11 wsimport was removed, usually part of a separate install now.")
-# but it needs more investigation.
-#
-# See bug #878299 to track this issue.
-DEPEND="
-	${COMMON_DEPEND}
-	>=dev-libs/libxslt-1.1.19
-	virtual/libcrypt:=
-	alsa? ( >=media-libs/alsa-lib-1.0.13 )
-	gui? (
-		x11-base/xorg-proto
-		x11-libs/libxcb:=
-		x11-libs/libXcursor
-		x11-libs/libXext
-		x11-libs/libXinerama
-		x11-libs/libXmu
-		x11-libs/libXrandr
-	)
-	java? ( virtual/jdk:1.8 )
-	opengl? (
-		x11-base/xorg-proto
-		x11-libs/libXcursor
-		x11-libs/libXinerama
-		x11-libs/libXmu
-		x11-libs/libXrandr
-		virtual/glu
-	)
-	sdl? ( x11-libs/libXinerama )
-	pulseaudio? ( media-libs/libpulse )
-	udev? ( >=virtual/udev-171 )
-"
-RDEPEND="
-	!app-emulation/virtualbox
-	${COMMON_DEPEND}
-	gui? ( x11-libs/libxcb:= )
-	java? ( virtual/jre:1.8 )
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	>=app-arch/tar-1.34-r2
-	>=dev-lang/yasm-0.6.2
-	dev-libs/libIDL
-	dev-util/glslang
-	>=dev-build/kbuild-0.1.9998.3592
-	sys-apps/which
-	sys-devel/bin86
-	sys-libs/libcap
-	sys-power/iasl
-	virtual/pkgconfig
-	doc? (
-		app-text/docbook-sgml-dtd:4.4
-		app-text/docbook-xsl-ns-stylesheets
-		dev-texlive/texlive-basic
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-latexrecommended
-		dev-texlive/texlive-latexextra
-		dev-texlive/texlive-fontsrecommended
-		dev-texlive/texlive-fontsextra
-		dev-qt/qthelp:5
-	)
-	gui? ( dev-qt/linguist-tools:5 )
-	nls? ( dev-qt/linguist-tools:5 )
-	java? ( virtual/jdk:1.8 )
-"
-
-QA_FLAGS_IGNORED="
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
-"
-
-QA_TEXTRELS="
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-"
-
-QA_EXECSTACK="
-	usr/lib64/virtualbox/iPxeBaseBin
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
-"
-
-QA_WX_LOAD="
-	usr/lib64/virtualbox/iPxeBaseBin
-"
-
-QA_PRESTRIPPED="
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-"
-
-REQUIRED_USE="
-	java? ( sdk )
-	python? ( sdk )
-	vboxwebsrv? ( java )
-	${PYTHON_REQUIRED_USE}
-"
-
-PATCHES=(
-	# Downloaded patchset
-	"${WORKDIR}"/virtualbox-patches-${PATCHES_PV}/patches
-	"${PATCHES_DIR}"/
-)
-
-pkg_pretend() {
-	if ! use gui; then
-		einfo "No USE=\"gui\" selected, this build will not include any Qt frontend."
-	fi
-
-	if ! use opengl; then
-		einfo "No USE=\"opengl\" selected, this build will lack"
-		einfo "the OpenGL feature."
-	fi
-	if ! use python; then
-		einfo "You have disabled the \"python\" USE flag. This will only"
-		einfo "disable the python bindings being installed."
-	fi
-	if ! use nls && use gui; then
-		einfo "USE=\"gui\" also selects USE=\"nls\".  This build"
-		einfo "will have NLS support."
-	fi
-
-	# 749273
-	local d=${ROOT}
-	for i in usr "$(get_libdir)"; do
-		d="${d}/$i"
-		if [[ "$(stat -L -c "%g %u" "${d}")" != "0 0" ]]; then
-			die "${d} should be owned by root, VirtualBox will not start otherwise"
-		fi
-	done
-}
-
-pkg_setup() {
-	java-pkg-opt-2_pkg_setup
-	python-single-r1_pkg_setup
-}
-
-src_unpack() {
-	[[ ${PV} == *9999* ]] && git-r3_src_unpack
-	default
-}
-
-src_prepare() {
-	default
-
-	# Only add nopie patch when we're on hardened
-	if gcc-specs-pie; then
-		eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch
-	fi
-
-	# Remove shipped binaries (kBuild, yasm) and tools, see bug #232775
-	rm -r kBuild/bin || die
-	# Remove everything in tools except kBuildUnits
-	find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || die
-
-	# Disable things unused or split into separate ebuilds
-	sed -e "s@MY_LIBDIR@$(get_libdir)@" \
-		"${FILESDIR}"/${MY_PN}-5-localconfig > LocalConfig.kmk || die
-
-	if ! use pch; then
-		# bug #753323
-		printf '\n%s\n' "VBOX_WITHOUT_PRECOMPILED_HEADERS=1" \
-			>> LocalConfig.kmk || die
-	fi
-
-	# bug #916002, #488176
-	tc-ld-force-bfd
-
-	# Respect LDFLAGS
-	sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
-		-i Config.kmk src/libs/xpcom18a4/Config.kmk || die
-
-	# Do not use hard-coded ld (related to bug #488176)
-	sed -e '/QUIET)ld /s@ld @$(LD) @' \
-		-i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
-
-	# Use PAM only when pam USE flag is enbaled (bug #376531)
-	if ! use pam; then
-		einfo "Disabling PAM removes the possibility to use the VRDP features."
-		sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
-		sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
-			src/VBox/HostServices/Makefile.kmk || die
-		echo -e "\nIPRT_WITHOUT_PAM=1" >> LocalConfig.kmk || die
-	fi
-
-	# add correct java path
-	if use java; then
-		sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
-			-i "${S}"/Config.kmk || die
-		java-pkg-opt-2_src_prepare
-	fi
-
-	#856811 #864274
-	# cannot filter out only one flag, some combinations of these flags produce buggy executables
-	for i in abm avx avx2 bmi bmi2 fma fma4 popcnt; do
-		append-cflags $(test-flags-CC -mno-$i)
-		append-cxxflags $(test-flags-CXX -mno-$i)
-	done
-
-	# bug #908814
-	filter-lto
-
-	# bug #843437
-	cat >> LocalConfig.kmk <<-EOF || die
-		CXXFLAGS=${CXXFLAGS}
-		CFLAGS=${CFLAGS}
-	EOF
-
-	if use sdl; then
-		sed -i 's/sdl-config/sdl2-config/' configure || die
-		echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
-	fi
-
-	#443830
-	echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die
-
-	if tc-is-clang; then
-		# clang assembler chokes on comments starting with /
-		sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
-
-		# clang does not support this extension
-		eapply "${FILESDIR}"/${MY_PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
-	fi
-
-	# fix doc generation
-	echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die
-	# replace xhtml names with numeric equivalents
-	find doc/manual -name \*.xml -exec sed -i \
-		-e 's/&nbsp;/\&#160;/g' \
-		-e 's/&ndash;/\&#8211;/g' \
-		-e 's/&larr;/\&#8592;/g' \
-		-e 's/&rarr;/\&#8594;/g' \
-		-e 's/&harr;/\&#8596;/g' {} \+ || die
-
-	# fix help path #891879
-	echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die
-
-	# 489208
-	# Cannot patch the whole text, many translations.  Use sed instead to replace the command
-	find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \
-		's/&apos;[^&]*\(vboxdrv setup\|vboxconfig\)&apos;/\&apos;emerge -1 virtualbox-modules\&apos;/' {} \+ || die
-	sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \
-		src/VBox/Frontends/VirtualBox/src/main.cpp \
-		src/VBox/VMM/VMMR3/VM.cpp || die
-
-	# 890561
-	echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
-
-	if ! use nls && ! use gui; then
-		cat >> LocalConfig.kmk <<-EOF || die
-			VBOX_WITH_NLS :=
-			VBOX_WITH_MAIN_NLS :=
-			VBOX_WITH_PUEL_NLS :=
-			VBOX_WITH_VBOXMANAGE_NLS :=
-		EOF
-	fi
-}
-
-src_configure() {
-	tc-export AR CC CXX LD RANLIB
-	export HOST_CC="$(tc-getBUILD_CC)"
-
-	local myconf=(
-		--with-gcc="$(tc-getCC)"
-		--with-g++="$(tc-getCXX)"
-
-		--disable-kmods
-		--with-kvm
-
-		# this is required for kvm to work.
-		# also this prohibits installation with suid.
-		--disable-hardening
-
-		$(usev !alsa --disable-alsa)
-		$(usev !dbus --disable-dbus)
-		$(usev debug --build-debug)
-		$(usev !doc --disable-docs)
-		$(usev !java --disable-java)
-		$(usev !lvm --disable-devmapper)
-		$(usev !pulseaudio --disable-pulse)
-		$(usev !python --disable-python)
-		$(usev vboxwebsrv --enable-webservice)
-		$(usev vde --enable-vde)
-		$(usev vnc --enable-vnc)
-	)
-
-	if use gui || use sdl || use opengl; then
-		myconf+=(
-			$(usev !opengl --disable-opengl)
-			$(usev !gui --disable-qt)
-			$(usev !sdl --disable-sdl)
-		)
-	else
-		myconf+=(
-			--build-headless
-		)
-	fi
-
-	if use amd64 && ! has_multilib_profile; then
-		myconf+=( --disable-vmmraw )
-	fi
-
-	# not an autoconf script
-	edo ./configure "${myconf[@]}"
-
-	# Force usage of chosen Python implementation
-	# bug #856121, bug #785835
-	sed -i \
-		-e '/VBOX_WITH_PYTHON.*=/d' \
-		-e '/VBOX_PATH_PYTHON_INC.*=/d' \
-		-e '/VBOX_LIB_PYTHON.*=/d' \
-		AutoConfig.kmk || die
-
-	cat >> AutoConfig.kmk <<-EOF || die
-		VBOX_WITH_PYTHON=$(usev python 1)
-		VBOX_PATH_PYTHON_INC=$(python_get_includedir)
-		VBOX_LIB_PYTHON=$(python_get_library_path)
-	EOF
-
-	if use python; then
-		local mangled_python="${EPYTHON#python}"
-		mangled_python="${mangled_python/.}"
-
-		# Stub out the script which defines what the Makefile ends up
-		# building for. gen_python_deps.py gets called by the Makefile
-		# with some args and it spits out a bunch of paths for a hardcoded
-		# list of Pythons. We just override it with what we're actually using.
-		# This minimises the amount of patching we have to do for new Pythons.
-		cat > src/libs/xpcom18a4/python/gen_python_deps.py <<-EOF || die
-			print("VBOX_PYTHON${mangled_python}_INC=$(python_get_includedir)")
-			print("VBOX_PYTHON${mangled_python}_LIB=$(python_get_library_path)")
-			print("VBOX_PYTHONDEF_INC=$(python_get_includedir)")
-			print("VBOX_PYTHONDEF_LIB=$(python_get_library_path)")
-		EOF
-
-		chmod +x src/libs/xpcom18a4/python/gen_python_deps.py || die
-	fi
-}
-
-src_compile() {
-	source ./env.sh || die
-
-	# Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
-	MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
-	MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
-	MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
-
-	local myemakeargs=(
-		VBOX_BUILD_PUBLISHER=_Gentoo
-		VBOX_WITH_VBOXIMGMOUNT=1
-
-		KBUILD_VERBOSE=2
-
-		AS="$(tc-getCC)"
-		CC="$(tc-getCC)"
-		CXX="$(tc-getCXX)"
-
-		TOOL_GCC3_CC="$(tc-getCC)"
-		TOOL_GCC3_LD="$(tc-getCC)"
-		TOOL_GCC3_AS="$(tc-getCC)"
-		TOOL_GCC3_AR="$(tc-getAR)"
-		TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
-
-		TOOL_GXX3_CC="$(tc-getCC)"
-		TOOL_GXX3_CXX="$(tc-getCXX)"
-		TOOL_GXX3_LD="$(tc-getCXX)"
-		TOOL_GXX3_AS="$(tc-getCXX)"
-		TOOL_GXX3_AR="$(tc-getAR)"
-		TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
-
-		TOOL_GCC3_CFLAGS="${CFLAGS}"
-		TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
-		VBOX_GCC_OPT="${CXXFLAGS}"
-		VBOX_NM="$(tc-getNM)"
-
-		TOOL_YASM_AS=yasm
-	)
-
-	if use amd64 && has_multilib_profile; then
-		myemakeargs+=(
-			CC32="$(tc-getCC) -m32"
-			CXX32="$(tc-getCXX) -m32"
-
-			TOOL_GCC32_CC="$(tc-getCC) -m32"
-			TOOL_GCC32_CXX="$(tc-getCXX) -m32"
-			TOOL_GCC32_LD="$(tc-getCC) -m32"
-			TOOL_GCC32_AS="$(tc-getCC) -m32"
-			TOOL_GCC32_AR="$(tc-getAR)"
-			TOOL_GCC32_OBJCOPY="$(tc-getOBJCOPY)"
-
-			TOOL_GXX32_CC="$(tc-getCC) -m32"
-			TOOL_GXX32_CXX="$(tc-getCXX) -m32"
-			TOOL_GXX32_LD="$(tc-getCXX) -m32"
-			TOOL_GXX32_AS="$(tc-getCXX) -m32"
-			TOOL_GXX32_AR="$(tc-getAR)"
-			TOOL_GXX32_OBJCOPY="$(tc-getOBJCOPY)"
-		)
-	fi
-
-	MAKE="kmk" emake "${myemakeargs[@]}" all
-}
-
-src_install() {
-	cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
-
-	local vbox_inst_path="/usr/$(get_libdir)/${MY_PN}" each size ico icofile
-
-	vbox_inst() {
-		local binary="${1}"
-		local perms="${2:-0750}"
-		local path="${3:-${vbox_inst_path}}"
-
-		[[ -n "${binary}" ]] || die "vbox_inst: No binary given!"
-		[[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
-
-		insinto ${path}
-		doins ${binary}
-		fowners root:vboxusers ${path}/${binary}
-		fperms ${perms} ${path}/${binary}
-	}
-
-	# Create configuration files
-	insinto /etc/vbox
-	newins "${FILESDIR}/${MY_PN}-4-config" vbox.cfg
-
-	# Set the correct libdir
-	sed \
-		-e "s@MY_LIBDIR@$(get_libdir)@" \
-		-i "${ED}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
-
-	# Install the wrapper script
-	exeinto ${vbox_inst_path}
-	newexe "${FILESDIR}/${MY_PN}-ose-6-wrapper" "VBox"
-	fowners root:vboxusers ${vbox_inst_path}/VBox
-	fperms 0750 ${vbox_inst_path}/VBox
-
-	# Install binaries and libraries
-	insinto ${vbox_inst_path}
-	doins -r components
-
-	for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,VMMPreload,XPCOMIPCD} \
-		vboximg-mount vbox-img *so *r0; do
-		vbox_inst ${each}
-	done
-
-	# These binaries need to be suid root.
-	for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
-		vbox_inst ${each} 0750
-	done
-
-	# Install EFI Firmware files (bug #320757)
-	for each in VBoxEFI{32,64}.fd ; do
-		vbox_inst ${each} 0644
-	done
-
-	# VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
-	# VBoxXPCOMIPCD (bug #524202)
-	for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
-		pax-mark -m "${ED}"${vbox_inst_path}/${each}
-	done
-
-	# Symlink binaries to the shipped wrapper
-	for each in vbox{autostart,balloonctrl,bugreport,headless,manage} \
-		VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-	done
-	dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount
-	dosym ${vbox_inst_path}/vbox-img /usr/bin/vbox-img
-
-	if use pam; then
-		# VRDPAuth only works with this (bug #351949)
-		dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
-	fi
-
-	# set an env-variable for 3rd party tools
-	echo "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
-	# environment variables used during SDK binding installation
-	echo "VBOX_SDK_PATH=${vbox_inst_path}/sdk" >> "${T}/90virtualbox"
-	echo "VBOX_INSTALL_PATH=${vbox_inst_path}" >> "${T}/90virtualbox"
-	doenvd "${T}/90virtualbox"
-
-	if use sdl; then
-		vbox_inst VBoxSDL 0750
-		pax-mark -m "${ED}"${vbox_inst_path}/VBoxSDL
-
-		for each in vboxsdl VBoxSDL ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-		done
-	fi
-
-	if use gui; then
-		vbox_inst VirtualBox
-		vbox_inst VirtualBoxVM 0750
-		for each in VirtualBox{,VM} ; do
-			pax-mark -m "${ED}"${vbox_inst_path}/${each}
-		done
-
-		if use opengl; then
-			vbox_inst VBoxTestOGL
-			pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
-		fi
-
-		for each in virtualbox{,vm} VirtualBox{,VM} ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-		done
-
-		insinto /usr/share/${PN}
-		doins -r nls
-		doins -r UnattendedTemplates
-
-		newmenu ${MY_PN}.desktop ${PN}.desktop
-
-		pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
-		for size in 16 32 48 64 128 ; do
-			newicon -s ${size} ${MY_PN}-${size}px.png ${PN}.png
-		done
-		newicon ${MY_PN}-48px.png ${PN}.png
-		newicon -s scalable ${MY_PN}.svg ${PN}.png
-		popd &>/dev/null || die
-		pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
-		for size in 16 24 32 48 64 72 96 128 256 512 ; do
-			for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
-				icofile="${MY_PN}-${ico}-${size}px.png"
-				if [[ -f "${icofile}" ]]; then
-					newicon -s ${size} ${icofile} ${MY_PN}-${ico}.png
-				fi
-			done
-		done
-		popd &>/dev/null || die
-	fi
-
-	if use lvm; then
-		vbox_inst VBoxVolInfo 0750
-		dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
-	fi
-
-	if use sdk; then
-		insinto ${vbox_inst_path}
-		doins -r sdk
-
-		if use java; then
-			java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
-			java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
-		fi
-	fi
-
-	if use udev; then
-		local udevdir="$(get_udevdir)"
-		local udev_file="VBoxCreateUSBNode.sh"
-		local rules_file="10-virtualbox.rules"
-
-		insinto ${udevdir}
-		doins ${udev_file}
-		fowners root:vboxusers ${udevdir}/${udev_file}
-		fperms 0750 ${udevdir}/${udev_file}
-
-		insinto ${udevdir}/rules.d
-		sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \
-			> "${T}"/${rules_file} || die
-		doins "${T}"/${rules_file}
-	fi
-
-	if use vboxwebsrv; then
-		vbox_inst vboxwebsrv
-		dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
-		newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
-		newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
-	fi
-
-	# Remove dead symlinks (bug #715338)
-	find "${ED}"/usr/$(get_libdir)/${MY_PN} -xtype l -delete || die
-
-	# Fix version string in extensions or else they don't get accepted
-	# by the virtualbox host process (see bug #438930)
-	find ExtensionPacks -type f -name "ExtPack.xml" -exec sed -i '/Version/s@_Gentoo@@' {} \+ || die
-
-	local extensions_dir="${vbox_inst_path}/ExtensionPacks"
-
-	if use vnc; then
-		insinto ${extensions_dir}
-		doins -r ExtensionPacks/VNC
-	fi
-
-	if use dtrace; then
-		insinto ${extensions_dir}
-		doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
-	fi
-
-	if use doc; then
-		dodoc UserManual.pdf UserManual.q{ch,hc}
-		docompress -x /usr/share/doc/${PF}/UserManual.*
-	elif use gui; then
-		dodoc "${WORKDIR}"/${MY_PN}-help-${ORIGIN_PV}/UserManual.q{ch,hc}
-		docompress -x /usr/share/doc/${PF}/UserManual.*
-	fi
-	dodoc ${PATCHES_DIR}/README.*
-
-	if use python; then
-		local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.so"
-		if [[ ! -x "${python_path_ext}" ]]; then
-			eerror "Couldn't find ${python_path_ext}! Bindings were requested with USE=python"
-			eerror "but none were installed. This may happen if support for a Python target"
-			eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles."
-			die "Incomplete installation of Python bindings! File a bug with Gentoo!"
-		fi
-
-		# 378871
-		local installer_dir="${ED}/usr/$(get_libdir)/virtualbox/sdk/installer"
-		pushd "${installer_dir}" &> /dev/null || die
-		sed -e "s;%VBOX_INSTALL_PATH%;${vbox_inst_path};" \
-			-e "s;%VBOX_SDK_PATH%;${vbox_inst_path}/sdk;" \
-			-i vboxapi/__init__.py || die
-		# insert shebang, the files come without one
-		find vboxapi -name \*.py -exec sed -e "1 i\#! ${PYTHON}" -i {} \+ || die
-		python_domodule vboxapi
-		popd &> /dev/null || die
-		python_doscript vboxshell.py
-
-		# do not install the installer
-		rm -r "${installer_dir}" || die
-	fi
-
-	newtmpfiles "${FILESDIR}"/${MY_PN}-vboxusb_tmpfilesd virtualbox-vboxusb.conf
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-
-	if use udev; then
-		udev_reload
-		udevadm trigger --subsystem-match=usb
-	fi
-
-	tmpfiles_process virtualbox-vboxusb.conf
-
-	if use gui; then
-		elog "To launch VirtualBox just type: \"virtualbox\"."
-	fi
-
-	elog "You must be in the vboxusers group to use VirtualBox."
-	elog ""
-	elog "The latest user manual is available for download at:"
-	elog "https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/UserManual.pdf"
-	elog ""
-
-	optfeature "Advanced networking setups" net-misc/bridge-utils sys-apps/usermode-utilities
-	optfeature "USB2, USB3, PXE boot, and VRDP support" app-emulation/virtualbox-extpack-oracle
-	optfeature "Guest additions ISO" app-emulation/virtualbox-additions
-
-	if ! use udev; then
-		ewarn "Without USE=udev, USB devices will likely not work in ${MY_PN}."
-	fi
-}
-
-pkg_postrm() {
-	xdg_pkg_postrm
-
-	use udev && udev_reload
-}


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/
@ 2024-03-25 16:16 Viorel Munteanu
  0 siblings, 0 replies; 24+ messages in thread
From: Viorel Munteanu @ 2024-03-25 16:16 UTC (permalink / raw
  To: gentoo-commits

commit:     18d9cd42d68315e714b1bb744125b47fe7e224f4
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 25 16:01:19 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Mon Mar 25 16:15:54 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18d9cd42

app-emulation/virtualbox-kvm: drop 7.0.14_pre20240208

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox-kvm/Manifest              |   1 -
 .../virtualbox-kvm-7.0.14_pre20240208.ebuild       | 758 ---------------------
 2 files changed, 759 deletions(-)

diff --git a/app-emulation/virtualbox-kvm/Manifest b/app-emulation/virtualbox-kvm/Manifest
index ce4e260b6d62..a8f7968d576d 100644
--- a/app-emulation/virtualbox-kvm/Manifest
+++ b/app-emulation/virtualbox-kvm/Manifest
@@ -1,5 +1,4 @@
 DIST VirtualBox-7.0.14.tar.bz2 175654864 BLAKE2B 99f4942b864ce481d69983af31393d763452c5b55697ab642b43c155f5fbc2a9963fbe1b7744baef620d0b351e1ac73c1ef978698b9a7e77897bb9cbc18dc17c SHA512 6a82933bbf51ff255d17cb61ae6ddfb791a2200e3dff705f181cd06c6031b48cf15faa5e8202a65daef0fb20b7fd9e33d40dbd0f9cc3f49af49fff04a1cb0a73
 DIST virtualbox-help-7.0.14.tar.xz 3944832 BLAKE2B 95079e4da8c960c41cee799142779a6c2587e0e8af7956ca551cb5a4c0f36f313189dfe08afba83a0c32886866a7f9903b5e370008d6b3ce6283fb2288866b06 SHA512 e2f1acdd7577a93047e220300b1996d2855ddef20053c01294f8295fde0840645c41b75632d71dd2fc276219084fe4105fd057623f39375542358796425a2d03
-DIST virtualbox-kvm-7.0.14_pre20240208.tar.gz 213410613 BLAKE2B 19962b80d9509e018c23c860e3bdb0a6cb2864aca2e02bfd3b0b9fae5ced5202752d1f5e3f20181158dc5407c8f28badf6c4e617dce9219067931195085e7c4d SHA512 2de9720228b8751095cb29271495d5b90e0d63b6270cd4d33384bc23dce634f38379ebfde348933cd0672d7232e36523f876841f01862b9640a9d974adaf0574
 DIST virtualbox-kvm-7.0.14_pre20240325.tar.gz 134910 BLAKE2B 1fc9e5ee97b062d7b56d4772b86a1e119c5534ef707a22bf16c84bfa3806c116166c8fed1318abd7ffcb352136d0529a3a8b9fe33aae9db3ae8de0d6f1b441f3 SHA512 d7a79b263a31700c76e4e76c5eb5b6473bb951753f3f463465f859c3626bd0da2d9d09db68d9b561f360c99f31c1fcfe5735fdcd7f7049711437c6251276f83f
 DIST virtualbox-patches-7.0.14.tar.bz2 6937 BLAKE2B da5f18efbba2a8f4701b3d29dc00784e4e80e18a18b029e5dce8c142eb4dc97637069bfc5081422064a7dc59dfacf503ebbdc3421caa96430dc53fa72988aa20 SHA512 57cc34b92e4626de5c445e34ae025da7ec0d752a60618c619a55c28bf7d6b1cc9dc81ea059b949b0f3e625568207e8084f9462faf487ca0daf2794e7f1feac36

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240208.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240208.ebuild
deleted file mode 100644
index b7a2eef2da25..000000000000
--- a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240208.ebuild
+++ /dev/null
@@ -1,758 +0,0 @@
-# Copyright 2022-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# To add a new Python here:
-# 1. Patch src/libs/xpcom18a4/python/Makefile.kmk (copy the previous impl's logic)
-#    Do NOT skip this part. It'll end up silently not-building the Python extension
-#    or otherwise misbehaving if you do.
-#
-# 2. Then update PYTHON_COMPAT & set PYTHON_SINGLE_TARGET for testing w/ USE=python.
-#
-#  May need to look at other distros (e.g. Arch Linux) to find patches for newer
-#  Python versions as upstream tends to lag. Upstream may have patches on their
-#  trunk branch but not release branch.
-#
-#  See bug #785835, bug #856121.
-PYTHON_COMPAT=( python3_{10..11} )
-
-inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \
-	python-single-r1 tmpfiles toolchain-funcs udev xdg
-
-MY_PN="VirtualBox"
-MY_P=${MY_PN}-${PV}
-
-ORIGIN_PN="virtualbox"
-
-DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
-HOMEPAGE="https://www.virtualbox.org/ https://github.com/cyberus-technology/virtualbox-kvm"
-SRC_URI="https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-7.0.14.tar.bz2"
-if [[ ${PV} == *9999* ]]; then
-	inherit git-r3
-
-	ORIGIN_PV="7.0.14"
-	EGIT_REPO_URI="https://github.com/cyberus-technology/virtualbox-kvm"
-else
-	MY_PV=${PV#*_pre}
-	ORIGIN_PV=${PV%_pre*}
-	SRC_URI+=" https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz"
-	S="${WORKDIR}/${PN}-dev-${MY_PV}"
-fi
-SRC_URI+=" gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${ORIGIN_PN}/${ORIGIN_PN}-help-${ORIGIN_PV}.tar.xz ) )"
-
-LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
-SLOT="0"
-IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde vnc"
-
-unset WATCOM #856769
-
-COMMON_DEPEND="
-	${PYTHON_DEPS}
-	acct-group/vboxusers
-	dev-libs/libtpms
-	dev-libs/libxml2
-	dev-libs/openssl:0=
-	media-libs/libpng:0=
-	media-libs/libvpx:0=
-	net-misc/curl
-	sys-libs/zlib
-	dbus? ( sys-apps/dbus )
-	gui? (
-		dev-qt/qtcore:5
-		dev-qt/qtdbus:5
-		dev-qt/qtgui:5
-		dev-qt/qthelp:5
-		dev-qt/qtprintsupport:5
-		dev-qt/qtwidgets:5
-		dev-qt/qtx11extras:5
-		dev-qt/qtxml:5
-		x11-libs/libX11
-		x11-libs/libXt
-		opengl? ( dev-qt/qtopengl:5 )
-	)
-	lvm? ( sys-fs/lvm2 )
-	opengl? (
-		media-libs/libglvnd[X]
-		media-libs/vulkan-loader
-		x11-libs/libX11
-		x11-libs/libXt
-	)
-	pam? ( sys-libs/pam )
-	sdl? (
-		media-libs/libsdl2[X,video]
-		x11-libs/libX11
-		x11-libs/libXcursor
-		x11-libs/libXt
-	)
-	vboxwebsrv? ( net-libs/gsoap[-gnutls(-),debug?] )
-	vde? ( net-misc/vde )
-	vnc? ( >=net-libs/libvncserver-0.9.9 )
-"
-# We're stuck on JDK (and JRE, I guess?) 1.8 because of need for wsimport
-# with USE="vboxwebsrv java". Note that we have to put things in DEPEND,
-# not (only, anyway) BDEPEND, as the eclass magic to set the environment variables
-# based on *DEPEND doesn't work for BDEPEND at least right now.
-#
-# There's a comment in Config.kmk about it
-# ("With Java 11 wsimport was removed, usually part of a separate install now.")
-# but it needs more investigation.
-#
-# See bug #878299 to track this issue.
-DEPEND="
-	${COMMON_DEPEND}
-	>=dev-libs/libxslt-1.1.19
-	virtual/libcrypt:=
-	alsa? ( >=media-libs/alsa-lib-1.0.13 )
-	gui? (
-		x11-base/xorg-proto
-		x11-libs/libxcb:=
-		x11-libs/libXcursor
-		x11-libs/libXext
-		x11-libs/libXinerama
-		x11-libs/libXmu
-		x11-libs/libXrandr
-	)
-	java? ( virtual/jdk:1.8 )
-	opengl? (
-		x11-base/xorg-proto
-		x11-libs/libXcursor
-		x11-libs/libXinerama
-		x11-libs/libXmu
-		x11-libs/libXrandr
-		virtual/glu
-	)
-	sdl? ( x11-libs/libXinerama )
-	pulseaudio? ( media-libs/libpulse )
-	udev? ( >=virtual/udev-171 )
-"
-RDEPEND="
-	!app-emulation/virtualbox
-	${COMMON_DEPEND}
-	gui? ( x11-libs/libxcb:= )
-	java? ( virtual/jre:1.8 )
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	>=app-arch/tar-1.34-r2
-	>=dev-lang/yasm-0.6.2
-	dev-libs/libIDL
-	dev-util/glslang
-	>=dev-build/kbuild-0.1.9998.3592
-	sys-apps/which
-	sys-devel/bin86
-	sys-libs/libcap
-	sys-power/iasl
-	virtual/pkgconfig
-	doc? (
-		app-text/docbook-sgml-dtd:4.4
-		app-text/docbook-xsl-ns-stylesheets
-		dev-texlive/texlive-basic
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-latexrecommended
-		dev-texlive/texlive-latexextra
-		dev-texlive/texlive-fontsrecommended
-		dev-texlive/texlive-fontsextra
-		dev-qt/qthelp:5
-	)
-	gui? ( dev-qt/linguist-tools:5 )
-	nls? ( dev-qt/linguist-tools:5 )
-	java? ( virtual/jdk:1.8 )
-"
-
-QA_FLAGS_IGNORED="
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
-"
-
-QA_TEXTRELS="
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-"
-
-QA_EXECSTACK="
-	usr/lib64/virtualbox/iPxeBaseBin
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
-"
-
-QA_WX_LOAD="
-	usr/lib64/virtualbox/iPxeBaseBin
-"
-
-QA_PRESTRIPPED="
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-"
-
-REQUIRED_USE="
-	java? ( sdk )
-	python? ( sdk )
-	vboxwebsrv? ( java )
-	${PYTHON_REQUIRED_USE}
-"
-
-PATCHES=(
-	# Downloaded patchset
-	"${WORKDIR}"/virtualbox-patches-7.0.14/patches
-)
-
-pkg_pretend() {
-	if ! use gui; then
-		einfo "No USE=\"gui\" selected, this build will not include any Qt frontend."
-	fi
-
-	if ! use opengl; then
-		einfo "No USE=\"opengl\" selected, this build will lack"
-		einfo "the OpenGL feature."
-	fi
-	if ! use python; then
-		einfo "You have disabled the \"python\" USE flag. This will only"
-		einfo "disable the python bindings being installed."
-	fi
-	if ! use nls && use gui; then
-		einfo "USE=\"gui\" also selects USE=\"nls\".  This build"
-		einfo "will have NLS support."
-	fi
-
-	# 749273
-	local d=${ROOT}
-	for i in usr "$(get_libdir)"; do
-		d="${d}/$i"
-		if [[ "$(stat -L -c "%g %u" "${d}")" != "0 0" ]]; then
-			die "${d} should be owned by root, VirtualBox will not start otherwise"
-		fi
-	done
-}
-
-pkg_setup() {
-	java-pkg-opt-2_pkg_setup
-	python-single-r1_pkg_setup
-}
-
-src_unpack() {
-	[[ ${PV} == *9999* ]] && git-r3_src_unpack
-	default
-}
-
-src_prepare() {
-	default
-
-	# Only add nopie patch when we're on hardened
-	if gcc-specs-pie; then
-		eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch
-	fi
-
-	# Remove shipped binaries (kBuild, yasm) and tools, see bug #232775
-	rm -r kBuild/bin || die
-	# Remove everything in tools except kBuildUnits
-	find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || die
-
-	# Disable things unused or split into separate ebuilds
-	sed -e "s@MY_LIBDIR@$(get_libdir)@" \
-		"${FILESDIR}"/${ORIGIN_PN}-5-localconfig > LocalConfig.kmk || die
-
-	if ! use pch; then
-		# bug #753323
-		printf '\n%s\n' "VBOX_WITHOUT_PRECOMPILED_HEADERS=1" \
-			>> LocalConfig.kmk || die
-	fi
-
-	# bug #916002, #488176
-	tc-ld-force-bfd
-
-	# Respect LDFLAGS
-	sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
-		-i Config.kmk src/libs/xpcom18a4/Config.kmk || die
-
-	# Do not use hard-coded ld (related to bug #488176)
-	sed -e '/QUIET)ld /s@ld @$(LD) @' \
-		-i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
-
-	# Use PAM only when pam USE flag is enbaled (bug #376531)
-	if ! use pam; then
-		einfo "Disabling PAM removes the possibility to use the VRDP features."
-		sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
-		sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
-			src/VBox/HostServices/Makefile.kmk || die
-		echo -e "\nIPRT_WITHOUT_PAM=1" >> LocalConfig.kmk || die
-	fi
-
-	# add correct java path
-	if use java; then
-		sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
-			-i "${S}"/Config.kmk || die
-		java-pkg-opt-2_src_prepare
-	fi
-
-	#856811 #864274
-	# cannot filter out only one flag, some combinations of these flags produce buggy executables
-	for i in abm avx avx2 bmi bmi2 fma fma4 popcnt; do
-		append-cflags $(test-flags-CC -mno-$i)
-		append-cxxflags $(test-flags-CXX -mno-$i)
-	done
-
-	# bug #908814
-	filter-lto
-
-	# bug #843437
-	cat >> LocalConfig.kmk <<-EOF || die
-		CXXFLAGS=${CXXFLAGS}
-		CFLAGS=${CFLAGS}
-	EOF
-
-	if use sdl; then
-		sed -i 's/sdl-config/sdl2-config/' configure || die
-		echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
-	fi
-
-	#443830
-	echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die
-
-	if tc-is-clang; then
-		# clang assembler chokes on comments starting with /
-		sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
-
-		# clang does not support this extension
-		eapply "${FILESDIR}"/${ORIGIN_PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
-	fi
-
-	# fix doc generation
-	echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die
-	# replace xhtml names with numeric equivalents
-	find doc/manual -name \*.xml -exec sed -i \
-		-e 's/&nbsp;/\&#160;/g' \
-		-e 's/&ndash;/\&#8211;/g' \
-		-e 's/&larr;/\&#8592;/g' \
-		-e 's/&rarr;/\&#8594;/g' \
-		-e 's/&harr;/\&#8596;/g' {} \+ || die
-
-	# fix help path #891879
-	echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die
-
-	# 489208
-	# Cannot patch the whole text, many translations.  Use sed instead to replace the command
-	find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \
-		's/&apos;[^&]*\(vboxdrv setup\|vboxconfig\)&apos;/\&apos;emerge -1 virtualbox-modules\&apos;/' {} \+ || die
-	sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \
-		src/VBox/Frontends/VirtualBox/src/main.cpp \
-		src/VBox/VMM/VMMR3/VM.cpp || die
-
-	# 890561
-	echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
-
-	if ! use nls && ! use gui; then
-		cat >> LocalConfig.kmk <<-EOF || die
-			VBOX_WITH_NLS :=
-			VBOX_WITH_MAIN_NLS :=
-			VBOX_WITH_PUEL_NLS :=
-			VBOX_WITH_VBOXMANAGE_NLS :=
-		EOF
-	fi
-}
-
-src_configure() {
-	tc-export AR CC CXX LD RANLIB
-	export HOST_CC="$(tc-getBUILD_CC)"
-
-	local myconf=(
-		--with-gcc="$(tc-getCC)"
-		--with-g++="$(tc-getCXX)"
-
-		--disable-kmods
-		--with-kvm
-
-		# this is required for kvm to work.
-		# also this prohibits installation with suid.
-		--disable-hardening
-
-		$(usev !alsa --disable-alsa)
-		$(usev !dbus --disable-dbus)
-		$(usev debug --build-debug)
-		$(usev !doc --disable-docs)
-		$(usev !java --disable-java)
-		$(usev !lvm --disable-devmapper)
-		$(usev !pulseaudio --disable-pulse)
-		$(usev !python --disable-python)
-		$(usev vboxwebsrv --enable-webservice)
-		$(usev vde --enable-vde)
-		$(usev vnc --enable-vnc)
-	)
-
-	if use gui || use sdl || use opengl; then
-		myconf+=(
-			$(usev !opengl --disable-opengl)
-			$(usev !gui --disable-qt)
-			$(usev !sdl --disable-sdl)
-		)
-	else
-		myconf+=(
-			--build-headless
-		)
-	fi
-
-	if use amd64 && ! has_multilib_profile; then
-		myconf+=( --disable-vmmraw )
-	fi
-
-	# not an autoconf script
-	edo ./configure "${myconf[@]}"
-
-	# Force usage of chosen Python implementation
-	# bug #856121, bug #785835
-	sed -i \
-		-e '/VBOX_WITH_PYTHON.*=/d' \
-		-e '/VBOX_PATH_PYTHON_INC.*=/d' \
-		-e '/VBOX_LIB_PYTHON.*=/d' \
-		AutoConfig.kmk || die
-
-	cat >> AutoConfig.kmk <<-EOF || die
-		VBOX_WITH_PYTHON=$(usev python 1)
-		VBOX_PATH_PYTHON_INC=$(python_get_includedir)
-		VBOX_LIB_PYTHON=$(python_get_library_path)
-	EOF
-
-	if use python; then
-		local mangled_python="${EPYTHON#python}"
-		mangled_python="${mangled_python/.}"
-
-		# Stub out the script which defines what the Makefile ends up
-		# building for. gen_python_deps.py gets called by the Makefile
-		# with some args and it spits out a bunch of paths for a hardcoded
-		# list of Pythons. We just override it with what we're actually using.
-		# This minimises the amount of patching we have to do for new Pythons.
-		cat > src/libs/xpcom18a4/python/gen_python_deps.py <<-EOF || die
-			print("VBOX_PYTHON${mangled_python}_INC=$(python_get_includedir)")
-			print("VBOX_PYTHON${mangled_python}_LIB=$(python_get_library_path)")
-			print("VBOX_PYTHONDEF_INC=$(python_get_includedir)")
-			print("VBOX_PYTHONDEF_LIB=$(python_get_library_path)")
-		EOF
-
-		chmod +x src/libs/xpcom18a4/python/gen_python_deps.py || die
-	fi
-}
-
-src_compile() {
-	source ./env.sh || die
-
-	# Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
-	MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
-	MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
-	MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
-
-	local myemakeargs=(
-		VBOX_BUILD_PUBLISHER=_Gentoo
-		VBOX_WITH_VBOXIMGMOUNT=1
-
-		KBUILD_VERBOSE=2
-
-		AS="$(tc-getCC)"
-		CC="$(tc-getCC)"
-		CXX="$(tc-getCXX)"
-
-		TOOL_GCC3_CC="$(tc-getCC)"
-		TOOL_GCC3_LD="$(tc-getCC)"
-		TOOL_GCC3_AS="$(tc-getCC)"
-		TOOL_GCC3_AR="$(tc-getAR)"
-		TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
-
-		TOOL_GXX3_CC="$(tc-getCC)"
-		TOOL_GXX3_CXX="$(tc-getCXX)"
-		TOOL_GXX3_LD="$(tc-getCXX)"
-		TOOL_GXX3_AS="$(tc-getCXX)"
-		TOOL_GXX3_AR="$(tc-getAR)"
-		TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
-
-		TOOL_GCC3_CFLAGS="${CFLAGS}"
-		TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
-		VBOX_GCC_OPT="${CXXFLAGS}"
-		VBOX_NM="$(tc-getNM)"
-
-		TOOL_YASM_AS=yasm
-	)
-
-	if use amd64 && has_multilib_profile; then
-		myemakeargs+=(
-			CC32="$(tc-getCC) -m32"
-			CXX32="$(tc-getCXX) -m32"
-
-			TOOL_GCC32_CC="$(tc-getCC) -m32"
-			TOOL_GCC32_CXX="$(tc-getCXX) -m32"
-			TOOL_GCC32_LD="$(tc-getCC) -m32"
-			TOOL_GCC32_AS="$(tc-getCC) -m32"
-			TOOL_GCC32_AR="$(tc-getAR)"
-			TOOL_GCC32_OBJCOPY="$(tc-getOBJCOPY)"
-
-			TOOL_GXX32_CC="$(tc-getCC) -m32"
-			TOOL_GXX32_CXX="$(tc-getCXX) -m32"
-			TOOL_GXX32_LD="$(tc-getCXX) -m32"
-			TOOL_GXX32_AS="$(tc-getCXX) -m32"
-			TOOL_GXX32_AR="$(tc-getAR)"
-			TOOL_GXX32_OBJCOPY="$(tc-getOBJCOPY)"
-		)
-	fi
-
-	MAKE="kmk" emake "${myemakeargs[@]}" all
-}
-
-src_install() {
-	cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
-
-	local vbox_inst_path="/usr/$(get_libdir)/${ORIGIN_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}/${ORIGIN_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}/${ORIGIN_PN}-ose-6-wrapper" "VBox"
-	fowners root:vboxusers ${vbox_inst_path}/VBox
-	fperms 0750 ${vbox_inst_path}/VBox
-
-	# Install binaries and libraries
-	insinto ${vbox_inst_path}
-	doins -r components
-
-	for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,VMMPreload,XPCOMIPCD} \
-		vboximg-mount vbox-img *so *r0; do
-		vbox_inst ${each}
-	done
-
-	# These binaries need to be suid root.
-	for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
-		vbox_inst ${each} 0750
-	done
-
-	# Install EFI Firmware files (bug #320757)
-	for each in VBoxEFI{32,64}.fd ; do
-		vbox_inst ${each} 0644
-	done
-
-	# VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
-	# VBoxXPCOMIPCD (bug #524202)
-	for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
-		pax-mark -m "${ED}"${vbox_inst_path}/${each}
-	done
-
-	# Symlink binaries to the shipped wrapper
-	for each in vbox{autostart,balloonctrl,bugreport,headless,manage} \
-		VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-	done
-	dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount
-	dosym ${vbox_inst_path}/vbox-img /usr/bin/vbox-img
-
-	if use pam; then
-		# VRDPAuth only works with this (bug #351949)
-		dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
-	fi
-
-	# set an env-variable for 3rd party tools
-	echo "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
-	# environment variables used during SDK binding installation
-	echo "VBOX_SDK_PATH=${vbox_inst_path}/sdk" >> "${T}/90virtualbox"
-	echo "VBOX_INSTALL_PATH=${vbox_inst_path}" >> "${T}/90virtualbox"
-	doenvd "${T}/90virtualbox"
-
-	if use sdl; then
-		vbox_inst VBoxSDL 0750
-		pax-mark -m "${ED}"${vbox_inst_path}/VBoxSDL
-
-		for each in vboxsdl VBoxSDL ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-		done
-	fi
-
-	if use gui; then
-		vbox_inst VirtualBox
-		vbox_inst VirtualBoxVM 0750
-		for each in VirtualBox{,VM} ; do
-			pax-mark -m "${ED}"${vbox_inst_path}/${each}
-		done
-
-		if use opengl; then
-			vbox_inst VBoxTestOGL
-			pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
-		fi
-
-		for each in virtualbox{,vm} VirtualBox{,VM} ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-		done
-
-		insinto /usr/share/${PN}
-		doins -r nls
-		doins -r UnattendedTemplates
-
-		newmenu ${ORIGIN_PN}.desktop ${PN}.desktop
-
-		pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
-		for size in 16 32 48 64 128 ; do
-			newicon -s ${size} ${ORIGIN_PN}-${size}px.png ${PN}.png
-		done
-		newicon ${ORIGIN_PN}-48px.png ${PN}.png
-		newicon -s scalable ${ORIGIN_PN}.svg ${PN}.png
-		popd &>/dev/null || die
-		pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
-		for size in 16 24 32 48 64 72 96 128 256 512 ; do
-			for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
-				icofile="${ORIGIN_PN}-${ico}-${size}px.png"
-				if [[ -f "${icofile}" ]]; then
-					newicon -s ${size} ${icofile} ${ORIGIN_PN}-${ico}.png
-				fi
-			done
-		done
-		popd &>/dev/null || die
-	fi
-
-	if use lvm; then
-		vbox_inst VBoxVolInfo 0750
-		dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
-	fi
-
-	if use sdk; then
-		insinto ${vbox_inst_path}
-		doins -r sdk
-
-		if use java; then
-			java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
-			java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
-		fi
-	fi
-
-	if use udev; then
-		local udevdir="$(get_udevdir)"
-		local udev_file="VBoxCreateUSBNode.sh"
-		local rules_file="10-virtualbox.rules"
-
-		insinto ${udevdir}
-		doins ${udev_file}
-		fowners root:vboxusers ${udevdir}/${udev_file}
-		fperms 0750 ${udevdir}/${udev_file}
-
-		insinto ${udevdir}/rules.d
-		sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \
-			> "${T}"/${rules_file} || die
-		doins "${T}"/${rules_file}
-	fi
-
-	if use vboxwebsrv; then
-		vbox_inst vboxwebsrv
-		dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
-		newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
-		newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
-	fi
-
-	# Remove dead symlinks (bug #715338)
-	find "${ED}"/usr/$(get_libdir)/${ORIGIN_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}"/${ORIGIN_PN}-help-${ORIGIN_PV}/UserManual.q{ch,hc}
-		docompress -x /usr/share/doc/${PF}
-	fi
-
-	if use python; then
-		local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.so"
-		if [[ ! -x "${python_path_ext}" ]]; then
-			eerror "Couldn't find ${python_path_ext}! Bindings were requested with USE=python"
-			eerror "but none were installed. This may happen if support for a Python target"
-			eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles."
-			die "Incomplete installation of Python bindings! File a bug with Gentoo!"
-		fi
-
-		# 378871
-		local installer_dir="${ED}/usr/$(get_libdir)/virtualbox/sdk/installer"
-		pushd "${installer_dir}" &> /dev/null || die
-		sed -e "s;%VBOX_INSTALL_PATH%;${vbox_inst_path};" \
-			-e "s;%VBOX_SDK_PATH%;${vbox_inst_path}/sdk;" \
-			-i vboxapi/__init__.py || die
-		# insert shebang, the files come without one
-		find vboxapi -name \*.py -exec sed -e "1 i\#! ${PYTHON}" -i {} \+ || die
-		python_domodule vboxapi
-		popd &> /dev/null || die
-		python_doscript vboxshell.py
-
-		# do not install the installer
-		rm -r "${installer_dir}" || die
-	fi
-
-	newtmpfiles "${FILESDIR}"/${ORIGIN_PN}-vboxusb_tmpfilesd virtualbox-vboxusb.conf
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-
-	if use udev; then
-		udev_reload
-		udevadm trigger --subsystem-match=usb
-	fi
-
-	tmpfiles_process virtualbox-vboxusb.conf
-
-	if use gui; then
-		elog "To launch VirtualBox just type: \"virtualbox\"."
-	fi
-
-	elog "You must be in the vboxusers group to use VirtualBox."
-	elog ""
-	elog "The latest user manual is available for download at:"
-	elog "https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/UserManual.pdf"
-	elog ""
-
-	optfeature "Advanced networking setups" net-misc/bridge-utils sys-apps/usermode-utilities
-	optfeature "USB2, USB3, PXE boot, and VRDP support" app-emulation/virtualbox-extpack-oracle
-	optfeature "Guest additions ISO" app-emulation/virtualbox-additions
-
-	if ! use udev; then
-		ewarn "Without USE=udev, USB devices will likely not work in ${ORIGIN_PN}."
-	fi
-}
-
-pkg_postrm() {
-	xdg_pkg_postrm
-
-	use udev && udev_reload
-}


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/
@ 2024-03-29  6:00 Viorel Munteanu
  0 siblings, 0 replies; 24+ messages in thread
From: Viorel Munteanu @ 2024-03-29  6:00 UTC (permalink / raw
  To: gentoo-commits

commit:     84d5e1475100aa4ba69b5d102e7beff104d3b5e6
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 29 05:56:36 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Fri Mar 29 05:56:36 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84d5e147

app-emulation/virtualbox-kvm: update Manifest

Closes: https://bugs.gentoo.org/927997
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox-kvm/Manifest | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/virtualbox-kvm/Manifest b/app-emulation/virtualbox-kvm/Manifest
index a8f7968d576d..edb795f0f5c8 100644
--- a/app-emulation/virtualbox-kvm/Manifest
+++ b/app-emulation/virtualbox-kvm/Manifest
@@ -1,4 +1,4 @@
 DIST VirtualBox-7.0.14.tar.bz2 175654864 BLAKE2B 99f4942b864ce481d69983af31393d763452c5b55697ab642b43c155f5fbc2a9963fbe1b7744baef620d0b351e1ac73c1ef978698b9a7e77897bb9cbc18dc17c SHA512 6a82933bbf51ff255d17cb61ae6ddfb791a2200e3dff705f181cd06c6031b48cf15faa5e8202a65daef0fb20b7fd9e33d40dbd0f9cc3f49af49fff04a1cb0a73
 DIST virtualbox-help-7.0.14.tar.xz 3944832 BLAKE2B 95079e4da8c960c41cee799142779a6c2587e0e8af7956ca551cb5a4c0f36f313189dfe08afba83a0c32886866a7f9903b5e370008d6b3ce6283fb2288866b06 SHA512 e2f1acdd7577a93047e220300b1996d2855ddef20053c01294f8295fde0840645c41b75632d71dd2fc276219084fe4105fd057623f39375542358796425a2d03
-DIST virtualbox-kvm-7.0.14_pre20240325.tar.gz 134910 BLAKE2B 1fc9e5ee97b062d7b56d4772b86a1e119c5534ef707a22bf16c84bfa3806c116166c8fed1318abd7ffcb352136d0529a3a8b9fe33aae9db3ae8de0d6f1b441f3 SHA512 d7a79b263a31700c76e4e76c5eb5b6473bb951753f3f463465f859c3626bd0da2d9d09db68d9b561f360c99f31c1fcfe5735fdcd7f7049711437c6251276f83f
+DIST virtualbox-kvm-7.0.14_pre20240325.tar.gz 134926 BLAKE2B 3e707b272219b2c5703d91d1f6a2f0a6c54fe29eeb6e91e5830949f7260e5b409e3425c38daea568725cb7fd10ddee234af6b72d747206e0a98ac1e33a10028c SHA512 e30291e1d7e2649057a9b38ea907f22f62b0367f33d88af10fdaaa49333890be2b719626103f9800836a3833368a018f5fc63a46577dd1d83178d7406bf8c494
 DIST virtualbox-patches-7.0.14.tar.bz2 6937 BLAKE2B da5f18efbba2a8f4701b3d29dc00784e4e80e18a18b029e5dce8c142eb4dc97637069bfc5081422064a7dc59dfacf503ebbdc3421caa96430dc53fa72988aa20 SHA512 57cc34b92e4626de5c445e34ae025da7ec0d752a60618c619a55c28bf7d6b1cc9dc81ea059b949b0f3e625568207e8084f9462faf487ca0daf2794e7f1feac36


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/
@ 2024-04-17 19:56 Viorel Munteanu
  0 siblings, 0 replies; 24+ messages in thread
From: Viorel Munteanu @ 2024-04-17 19:56 UTC (permalink / raw
  To: gentoo-commits

commit:     7db1a1df087abab6e8184813e8814ed098c48e2b
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 17 19:53:57 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Wed Apr 17 19:56:00 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7db1a1df

app-emulation/virtualbox-kvm: add 7.0.16_pre20240325

No new release from upstream yet, but I checked it against virtualbox
7.0.16 and it works.
Switch live to 7.0.16 too.

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox-kvm/Manifest                                 | 4 ++++
 ...albox-kvm-9999.ebuild => virtualbox-kvm-7.0.16_pre20240325.ebuild} | 2 +-
 app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild               | 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/app-emulation/virtualbox-kvm/Manifest b/app-emulation/virtualbox-kvm/Manifest
index edb795f0f5c8..d5721453e7b7 100644
--- a/app-emulation/virtualbox-kvm/Manifest
+++ b/app-emulation/virtualbox-kvm/Manifest
@@ -1,4 +1,8 @@
 DIST VirtualBox-7.0.14.tar.bz2 175654864 BLAKE2B 99f4942b864ce481d69983af31393d763452c5b55697ab642b43c155f5fbc2a9963fbe1b7744baef620d0b351e1ac73c1ef978698b9a7e77897bb9cbc18dc17c SHA512 6a82933bbf51ff255d17cb61ae6ddfb791a2200e3dff705f181cd06c6031b48cf15faa5e8202a65daef0fb20b7fd9e33d40dbd0f9cc3f49af49fff04a1cb0a73
+DIST VirtualBox-7.0.16.tar.bz2 170897951 BLAKE2B 6b436c38df632222621723db94677a0efef5de2ac1eacec73571bc658955f23fff347fa60c37ec78c58bf94b82b8f9a95fb26c07ef4becc7e9f535af069151f5 SHA512 1b8ba08bec144cbd1f2e9aa0929cdf60a0b99930f1dd80567094fba75097d87661aef3da2cc24f4abff6b6db8f186e251c5f693a2a93943cc39909d5f1e1bce5
 DIST virtualbox-help-7.0.14.tar.xz 3944832 BLAKE2B 95079e4da8c960c41cee799142779a6c2587e0e8af7956ca551cb5a4c0f36f313189dfe08afba83a0c32886866a7f9903b5e370008d6b3ce6283fb2288866b06 SHA512 e2f1acdd7577a93047e220300b1996d2855ddef20053c01294f8295fde0840645c41b75632d71dd2fc276219084fe4105fd057623f39375542358796425a2d03
+DIST virtualbox-help-7.0.16.tar.xz 3948696 BLAKE2B 5c5937313ea0e5cb4764b8a61fd1587e88a4afc965ef00862c5a265a15253929d35e0635231b6be5656f26f600bc4b70a2fa2ebc0f33b35d35c184b57e5acef8 SHA512 b9baca57118a82e3489c8445f0988671f16f75de60cc2d929d5e3b0c4c9e3ceacd796a72a81bba88d69eb4b4559835a13775c18d7782ae7dbe8ad202e247db0c
 DIST virtualbox-kvm-7.0.14_pre20240325.tar.gz 134926 BLAKE2B 3e707b272219b2c5703d91d1f6a2f0a6c54fe29eeb6e91e5830949f7260e5b409e3425c38daea568725cb7fd10ddee234af6b72d747206e0a98ac1e33a10028c SHA512 e30291e1d7e2649057a9b38ea907f22f62b0367f33d88af10fdaaa49333890be2b719626103f9800836a3833368a018f5fc63a46577dd1d83178d7406bf8c494
+DIST virtualbox-kvm-7.0.16_pre20240325.tar.gz 134926 BLAKE2B 3e707b272219b2c5703d91d1f6a2f0a6c54fe29eeb6e91e5830949f7260e5b409e3425c38daea568725cb7fd10ddee234af6b72d747206e0a98ac1e33a10028c SHA512 e30291e1d7e2649057a9b38ea907f22f62b0367f33d88af10fdaaa49333890be2b719626103f9800836a3833368a018f5fc63a46577dd1d83178d7406bf8c494
 DIST virtualbox-patches-7.0.14.tar.bz2 6937 BLAKE2B da5f18efbba2a8f4701b3d29dc00784e4e80e18a18b029e5dce8c142eb4dc97637069bfc5081422064a7dc59dfacf503ebbdc3421caa96430dc53fa72988aa20 SHA512 57cc34b92e4626de5c445e34ae025da7ec0d752a60618c619a55c28bf7d6b1cc9dc81ea059b949b0f3e625568207e8084f9462faf487ca0daf2794e7f1feac36
+DIST virtualbox-patches-7.0.16.tar.bz2 6808 BLAKE2B d15fa2ca306375142c3e25d4759d2790b2bb9eb69e333a8773ad500b29dd127b401943abf59ca59d01858a3ed5551fb3a6c93c4c893c8de971a714ce5306d577 SHA512 a488cbc6660fe8637c44cd79d87156609af089988239a7e76fea8a3c7e6319512c574bef2e942b354b14ce671a8e75ab8b2160abf7c40963795ee8a545ecd992

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.16_pre20240325.ebuild
similarity index 99%
copy from app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild
copy to app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.16_pre20240325.ebuild
index 34dd04078029..f501f05d7084 100644
--- a/app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild
+++ b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.16_pre20240325.ebuild
@@ -20,7 +20,7 @@ PYTHON_COMPAT=( python3_{10..11} )
 inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \
 	python-single-r1 tmpfiles toolchain-funcs udev xdg
 
-PATCHES_PV="7.0.14"
+PATCHES_PV="7.0.16"
 ORIGIN_PN="VirtualBox"
 ORIGIN_PV=${PATCHES_PV}
 

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild
index 34dd04078029..f501f05d7084 100644
--- a/app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild
+++ b/app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild
@@ -20,7 +20,7 @@ PYTHON_COMPAT=( python3_{10..11} )
 inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \
 	python-single-r1 tmpfiles toolchain-funcs udev xdg
 
-PATCHES_PV="7.0.14"
+PATCHES_PV="7.0.16"
 ORIGIN_PN="VirtualBox"
 ORIGIN_PV=${PATCHES_PV}
 


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/
@ 2024-05-02 11:12 Viorel Munteanu
  0 siblings, 0 replies; 24+ messages in thread
From: Viorel Munteanu @ 2024-05-02 11:12 UTC (permalink / raw
  To: gentoo-commits

commit:     6fb30c9deae89f3c37c3492f3b45b5e06bfff110
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Thu May  2 11:11:18 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Thu May  2 11:12:31 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6fb30c9d

app-emulation/virtualbox-kvm: add 7.0.14_pre20240502

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox-kvm/Manifest              |   1 +
 .../virtualbox-kvm-7.0.14_pre20240502.ebuild       | 767 +++++++++++++++++++++
 2 files changed, 768 insertions(+)

diff --git a/app-emulation/virtualbox-kvm/Manifest b/app-emulation/virtualbox-kvm/Manifest
index d5721453e7b7..f14b13f94f89 100644
--- a/app-emulation/virtualbox-kvm/Manifest
+++ b/app-emulation/virtualbox-kvm/Manifest
@@ -3,6 +3,7 @@ DIST VirtualBox-7.0.16.tar.bz2 170897951 BLAKE2B 6b436c38df632222621723db94677a0
 DIST virtualbox-help-7.0.14.tar.xz 3944832 BLAKE2B 95079e4da8c960c41cee799142779a6c2587e0e8af7956ca551cb5a4c0f36f313189dfe08afba83a0c32886866a7f9903b5e370008d6b3ce6283fb2288866b06 SHA512 e2f1acdd7577a93047e220300b1996d2855ddef20053c01294f8295fde0840645c41b75632d71dd2fc276219084fe4105fd057623f39375542358796425a2d03
 DIST virtualbox-help-7.0.16.tar.xz 3948696 BLAKE2B 5c5937313ea0e5cb4764b8a61fd1587e88a4afc965ef00862c5a265a15253929d35e0635231b6be5656f26f600bc4b70a2fa2ebc0f33b35d35c184b57e5acef8 SHA512 b9baca57118a82e3489c8445f0988671f16f75de60cc2d929d5e3b0c4c9e3ceacd796a72a81bba88d69eb4b4559835a13775c18d7782ae7dbe8ad202e247db0c
 DIST virtualbox-kvm-7.0.14_pre20240325.tar.gz 134926 BLAKE2B 3e707b272219b2c5703d91d1f6a2f0a6c54fe29eeb6e91e5830949f7260e5b409e3425c38daea568725cb7fd10ddee234af6b72d747206e0a98ac1e33a10028c SHA512 e30291e1d7e2649057a9b38ea907f22f62b0367f33d88af10fdaaa49333890be2b719626103f9800836a3833368a018f5fc63a46577dd1d83178d7406bf8c494
+DIST virtualbox-kvm-7.0.14_pre20240502.tar.gz 141218 BLAKE2B fd78db709a37fd5239e52a71a5690073631c9376a0a2d6ab9a885a5892ff272d432adeabf03c3317556a9d76cc6819cc5dcd44cd19bd18bd338bb1b84bda5dae SHA512 650bbe3a8c51d7373c25834be129888b624c2d99baebe4105c2a70b1a013cdb7527224778a78f6901b91dea6e22129354ba9269bcd365b9956df5c5b8a77869b
 DIST virtualbox-kvm-7.0.16_pre20240325.tar.gz 134926 BLAKE2B 3e707b272219b2c5703d91d1f6a2f0a6c54fe29eeb6e91e5830949f7260e5b409e3425c38daea568725cb7fd10ddee234af6b72d747206e0a98ac1e33a10028c SHA512 e30291e1d7e2649057a9b38ea907f22f62b0367f33d88af10fdaaa49333890be2b719626103f9800836a3833368a018f5fc63a46577dd1d83178d7406bf8c494
 DIST virtualbox-patches-7.0.14.tar.bz2 6937 BLAKE2B da5f18efbba2a8f4701b3d29dc00784e4e80e18a18b029e5dce8c142eb4dc97637069bfc5081422064a7dc59dfacf503ebbdc3421caa96430dc53fa72988aa20 SHA512 57cc34b92e4626de5c445e34ae025da7ec0d752a60618c619a55c28bf7d6b1cc9dc81ea059b949b0f3e625568207e8084f9462faf487ca0daf2794e7f1feac36
 DIST virtualbox-patches-7.0.16.tar.bz2 6808 BLAKE2B d15fa2ca306375142c3e25d4759d2790b2bb9eb69e333a8773ad500b29dd127b401943abf59ca59d01858a3ed5551fb3a6c93c4c893c8de971a714ce5306d577 SHA512 a488cbc6660fe8637c44cd79d87156609af089988239a7e76fea8a3c7e6319512c574bef2e942b354b14ce671a8e75ab8b2160abf7c40963795ee8a545ecd992

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240502.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240502.ebuild
new file mode 100644
index 000000000000..4c808e1dce9f
--- /dev/null
+++ b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240502.ebuild
@@ -0,0 +1,767 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# To add a new Python here:
+# 1. Patch src/libs/xpcom18a4/python/Makefile.kmk (copy the previous impl's logic)
+#    Do NOT skip this part. It'll end up silently not-building the Python extension
+#    or otherwise misbehaving if you do.
+#
+# 2. Then update PYTHON_COMPAT & set PYTHON_SINGLE_TARGET for testing w/ USE=python.
+#
+#  May need to look at other distros (e.g. Arch Linux) to find patches for newer
+#  Python versions as upstream tends to lag. Upstream may have patches on their
+#  trunk branch but not release branch.
+#
+#  See bug #785835, bug #856121.
+PYTHON_COMPAT=( python3_{10..11} )
+
+inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \
+	python-single-r1 tmpfiles toolchain-funcs udev xdg
+
+PATCHES_PV="7.0.14"
+ORIGIN_PN="VirtualBox"
+ORIGIN_PV=${PATCHES_PV}
+
+MY_PN=virtualbox
+MY_PV=${PV#*_pre}
+
+PATCHES_DIR="${WORKDIR}"/${PN}-${MY_PV}
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/ https://github.com/cyberus-technology/virtualbox-kvm"
+SRC_URI="https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2"
+if [[ ${PV} == *9999* ]]; then
+	inherit git-r3
+
+	ORIGIN_PV=${PATCHES_PV}
+	EGIT_REPO_URI="https://github.com/cyberus-technology/virtualbox-kvm"
+else
+	ORIGIN_PV=${PV%_pre*}
+	PATCHES_DIR="${WORKDIR}"/${PN}-dev-${MY_PV}
+	SRC_URI+=" https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz"
+fi
+MY_P=${ORIGIN_PN}-${ORIGIN_PV}
+SRC_URI+="
+	https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/${MY_P}.tar.bz2
+	gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${MY_PN}/${MY_PN}-help-${ORIGIN_PV}.tar.xz ) )
+"
+S="${WORKDIR}/${ORIGIN_PN}-${ORIGIN_PV}"
+
+LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
+SLOT="0"
+IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde vnc"
+
+unset WATCOM #856769
+
+COMMON_DEPEND="
+	${PYTHON_DEPS}
+	acct-group/vboxusers
+	dev-libs/libtpms
+	dev-libs/libxml2
+	dev-libs/openssl:0=
+	media-libs/libpng:0=
+	media-libs/libvpx:0=
+	net-misc/curl
+	sys-libs/zlib
+	dbus? ( sys-apps/dbus )
+	gui? (
+		dev-qt/qtcore:5
+		dev-qt/qtdbus:5
+		dev-qt/qtgui:5
+		dev-qt/qthelp:5
+		dev-qt/qtprintsupport:5
+		dev-qt/qtwidgets:5
+		dev-qt/qtx11extras:5
+		dev-qt/qtxml:5
+		x11-libs/libX11
+		x11-libs/libXt
+		opengl? ( dev-qt/qtopengl:5 )
+	)
+	lvm? ( sys-fs/lvm2 )
+	opengl? (
+		media-libs/libglvnd[X]
+		media-libs/vulkan-loader
+		x11-libs/libX11
+		x11-libs/libXt
+	)
+	pam? ( sys-libs/pam )
+	sdl? (
+		media-libs/libsdl2[X,video]
+		x11-libs/libX11
+		x11-libs/libXcursor
+		x11-libs/libXt
+	)
+	vboxwebsrv? ( net-libs/gsoap[-gnutls(-),debug?] )
+	vde? ( net-misc/vde )
+	vnc? ( >=net-libs/libvncserver-0.9.9 )
+"
+# We're stuck on JDK (and JRE, I guess?) 1.8 because of need for wsimport
+# with USE="vboxwebsrv java". Note that we have to put things in DEPEND,
+# not (only, anyway) BDEPEND, as the eclass magic to set the environment variables
+# based on *DEPEND doesn't work for BDEPEND at least right now.
+#
+# There's a comment in Config.kmk about it
+# ("With Java 11 wsimport was removed, usually part of a separate install now.")
+# but it needs more investigation.
+#
+# See bug #878299 to track this issue.
+DEPEND="
+	${COMMON_DEPEND}
+	>=dev-libs/libxslt-1.1.19
+	virtual/libcrypt:=
+	alsa? ( >=media-libs/alsa-lib-1.0.13 )
+	gui? (
+		x11-base/xorg-proto
+		x11-libs/libxcb:=
+		x11-libs/libXcursor
+		x11-libs/libXext
+		x11-libs/libXinerama
+		x11-libs/libXmu
+		x11-libs/libXrandr
+	)
+	java? ( virtual/jdk:1.8 )
+	opengl? (
+		x11-base/xorg-proto
+		x11-libs/libXcursor
+		x11-libs/libXinerama
+		x11-libs/libXmu
+		x11-libs/libXrandr
+		virtual/glu
+	)
+	sdl? ( x11-libs/libXinerama )
+	pulseaudio? ( media-libs/libpulse )
+	udev? ( >=virtual/udev-171 )
+"
+RDEPEND="
+	!app-emulation/virtualbox
+	${COMMON_DEPEND}
+	gui? ( x11-libs/libxcb:= )
+	java? ( virtual/jre:1.8 )
+"
+BDEPEND="
+	${PYTHON_DEPS}
+	>=app-arch/tar-1.34-r2
+	>=dev-lang/yasm-0.6.2
+	dev-libs/libIDL
+	dev-util/glslang
+	>=dev-build/kbuild-0.1.9998.3592
+	sys-apps/which
+	sys-devel/bin86
+	sys-libs/libcap
+	sys-power/iasl
+	virtual/pkgconfig
+	doc? (
+		app-text/docbook-sgml-dtd:4.4
+		app-text/docbook-xsl-ns-stylesheets
+		dev-texlive/texlive-basic
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-latexrecommended
+		dev-texlive/texlive-latexextra
+		dev-texlive/texlive-fontsrecommended
+		dev-texlive/texlive-fontsextra
+		dev-qt/qthelp:5
+	)
+	gui? ( dev-qt/linguist-tools:5 )
+	nls? ( dev-qt/linguist-tools:5 )
+	java? ( virtual/jdk:1.8 )
+"
+
+QA_FLAGS_IGNORED="
+	usr/lib64/virtualbox/VBoxDDR0.r0
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
+"
+
+QA_TEXTRELS="
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
+"
+
+QA_EXECSTACK="
+	usr/lib64/virtualbox/iPxeBaseBin
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/VBoxDDR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
+"
+
+QA_WX_LOAD="
+	usr/lib64/virtualbox/iPxeBaseBin
+"
+
+QA_PRESTRIPPED="
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/VBoxDDR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
+"
+
+REQUIRED_USE="
+	java? ( sdk )
+	python? ( sdk )
+	vboxwebsrv? ( java )
+	${PYTHON_REQUIRED_USE}
+"
+
+PATCHES=(
+	# Downloaded patchset
+	"${WORKDIR}"/virtualbox-patches-${PATCHES_PV}/patches
+	"${PATCHES_DIR}"/patches
+)
+
+pkg_pretend() {
+	if ! use gui; then
+		einfo "No USE=\"gui\" selected, this build will not include any Qt frontend."
+	fi
+
+	if ! use opengl; then
+		einfo "No USE=\"opengl\" selected, this build will lack"
+		einfo "the OpenGL feature."
+	fi
+	if ! use python; then
+		einfo "You have disabled the \"python\" USE flag. This will only"
+		einfo "disable the python bindings being installed."
+	fi
+	if ! use nls && use gui; then
+		einfo "USE=\"gui\" also selects USE=\"nls\".  This build"
+		einfo "will have NLS support."
+	fi
+
+	# 749273
+	local d=${ROOT}
+	for i in usr "$(get_libdir)"; do
+		d="${d}/$i"
+		if [[ "$(stat -L -c "%g %u" "${d}")" != "0 0" ]]; then
+			die "${d} should be owned by root, VirtualBox will not start otherwise"
+		fi
+	done
+}
+
+pkg_setup() {
+	java-pkg-opt-2_pkg_setup
+	python-single-r1_pkg_setup
+}
+
+src_unpack() {
+	[[ ${PV} == *9999* ]] && git-r3_src_unpack
+	default
+}
+
+src_prepare() {
+	default
+
+	# Only add nopie patch when we're on hardened
+	if gcc-specs-pie; then
+		eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch
+	fi
+
+	# Remove shipped binaries (kBuild, yasm) and tools, see bug #232775
+	rm -r kBuild/bin || die
+	# Remove everything in tools except kBuildUnits
+	find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || die
+
+	# Disable things unused or split into separate ebuilds
+	sed -e "s@MY_LIBDIR@$(get_libdir)@" \
+		"${FILESDIR}"/${MY_PN}-5-localconfig > LocalConfig.kmk || die
+
+	if ! use pch; then
+		# bug #753323
+		printf '\n%s\n' "VBOX_WITHOUT_PRECOMPILED_HEADERS=1" \
+			>> LocalConfig.kmk || die
+	fi
+
+	# bug #916002, #488176
+	tc-ld-force-bfd
+
+	# Respect LDFLAGS
+	sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
+		-i Config.kmk src/libs/xpcom18a4/Config.kmk || die
+
+	# Do not use hard-coded ld (related to bug #488176)
+	sed -e '/QUIET)ld /s@ld @$(LD) @' \
+		-i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
+
+	# Use PAM only when pam USE flag is enbaled (bug #376531)
+	if ! use pam; then
+		einfo "Disabling PAM removes the possibility to use the VRDP features."
+		sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
+		sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
+			src/VBox/HostServices/Makefile.kmk || die
+		echo -e "\nIPRT_WITHOUT_PAM=1" >> LocalConfig.kmk || die
+	fi
+
+	# add correct java path
+	if use java; then
+		sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
+			-i "${S}"/Config.kmk || die
+		java-pkg-opt-2_src_prepare
+	fi
+
+	#856811 #864274
+	# cannot filter out only one flag, some combinations of these flags produce buggy executables
+	for i in abm avx avx2 bmi bmi2 fma fma4 popcnt; do
+		append-cflags $(test-flags-CC -mno-$i)
+		append-cxxflags $(test-flags-CXX -mno-$i)
+	done
+
+	# bug #908814
+	filter-lto
+
+	# bug #843437
+	cat >> LocalConfig.kmk <<-EOF || die
+		CXXFLAGS=${CXXFLAGS}
+		CFLAGS=${CFLAGS}
+	EOF
+
+	if use sdl; then
+		sed -i 's/sdl-config/sdl2-config/' configure || die
+		echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
+	fi
+
+	#443830
+	echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die
+
+	if tc-is-clang; then
+		# clang assembler chokes on comments starting with /
+		sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
+
+		# clang does not support this extension
+		eapply "${FILESDIR}"/${MY_PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
+	fi
+
+	# fix doc generation
+	echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die
+	# replace xhtml names with numeric equivalents
+	find doc/manual -name \*.xml -exec sed -i \
+		-e 's/&nbsp;/\&#160;/g' \
+		-e 's/&ndash;/\&#8211;/g' \
+		-e 's/&larr;/\&#8592;/g' \
+		-e 's/&rarr;/\&#8594;/g' \
+		-e 's/&harr;/\&#8596;/g' {} \+ || die
+
+	# fix help path #891879
+	echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die
+
+	# 489208
+	# Cannot patch the whole text, many translations.  Use sed instead to replace the command
+	find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \
+		's/&apos;[^&]*\(vboxdrv setup\|vboxconfig\)&apos;/\&apos;emerge -1 virtualbox-modules\&apos;/' {} \+ || die
+	sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \
+		src/VBox/Frontends/VirtualBox/src/main.cpp \
+		src/VBox/VMM/VMMR3/VM.cpp || die
+
+	# 890561
+	echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
+
+	if ! use nls && ! use gui; then
+		cat >> LocalConfig.kmk <<-EOF || die
+			VBOX_WITH_NLS :=
+			VBOX_WITH_MAIN_NLS :=
+			VBOX_WITH_PUEL_NLS :=
+			VBOX_WITH_VBOXMANAGE_NLS :=
+		EOF
+	fi
+}
+
+src_configure() {
+	tc-export AR CC CXX LD RANLIB
+	export HOST_CC="$(tc-getBUILD_CC)"
+
+	local myconf=(
+		--with-gcc="$(tc-getCC)"
+		--with-g++="$(tc-getCXX)"
+
+		--disable-kmods
+		--with-kvm
+
+		# this is required for kvm to work.
+		# also this prohibits installation with suid.
+		--disable-hardening
+
+		$(usev !alsa --disable-alsa)
+		$(usev !dbus --disable-dbus)
+		$(usev debug --build-debug)
+		$(usev !doc --disable-docs)
+		$(usev !java --disable-java)
+		$(usev !lvm --disable-devmapper)
+		$(usev !pulseaudio --disable-pulse)
+		$(usev !python --disable-python)
+		$(usev vboxwebsrv --enable-webservice)
+		$(usev vde --enable-vde)
+		$(usev vnc --enable-vnc)
+	)
+
+	if use gui || use sdl || use opengl; then
+		myconf+=(
+			$(usev !opengl --disable-opengl)
+			$(usev !gui --disable-qt)
+			$(usev !sdl --disable-sdl)
+		)
+	else
+		myconf+=(
+			--build-headless
+		)
+	fi
+
+	if use amd64 && ! has_multilib_profile; then
+		myconf+=( --disable-vmmraw )
+	fi
+
+	# not an autoconf script
+	edo ./configure "${myconf[@]}"
+
+	# Force usage of chosen Python implementation
+	# bug #856121, bug #785835
+	sed -i \
+		-e '/VBOX_WITH_PYTHON.*=/d' \
+		-e '/VBOX_PATH_PYTHON_INC.*=/d' \
+		-e '/VBOX_LIB_PYTHON.*=/d' \
+		AutoConfig.kmk || die
+
+	cat >> AutoConfig.kmk <<-EOF || die
+		VBOX_WITH_PYTHON=$(usev python 1)
+		VBOX_PATH_PYTHON_INC=$(python_get_includedir)
+		VBOX_LIB_PYTHON=$(python_get_library_path)
+	EOF
+
+	if use python; then
+		local mangled_python="${EPYTHON#python}"
+		mangled_python="${mangled_python/.}"
+
+		# Stub out the script which defines what the Makefile ends up
+		# building for. gen_python_deps.py gets called by the Makefile
+		# with some args and it spits out a bunch of paths for a hardcoded
+		# list of Pythons. We just override it with what we're actually using.
+		# This minimises the amount of patching we have to do for new Pythons.
+		cat > src/libs/xpcom18a4/python/gen_python_deps.py <<-EOF || die
+			print("VBOX_PYTHON${mangled_python}_INC=$(python_get_includedir)")
+			print("VBOX_PYTHON${mangled_python}_LIB=$(python_get_library_path)")
+			print("VBOX_PYTHONDEF_INC=$(python_get_includedir)")
+			print("VBOX_PYTHONDEF_LIB=$(python_get_library_path)")
+		EOF
+
+		chmod +x src/libs/xpcom18a4/python/gen_python_deps.py || die
+	fi
+}
+
+src_compile() {
+	source ./env.sh || die
+
+	# Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
+	MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
+	MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
+	MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
+
+	local myemakeargs=(
+		VBOX_BUILD_PUBLISHER=_Gentoo
+		VBOX_WITH_VBOXIMGMOUNT=1
+
+		KBUILD_VERBOSE=2
+
+		AS="$(tc-getCC)"
+		CC="$(tc-getCC)"
+		CXX="$(tc-getCXX)"
+
+		TOOL_GCC3_CC="$(tc-getCC)"
+		TOOL_GCC3_LD="$(tc-getCC)"
+		TOOL_GCC3_AS="$(tc-getCC)"
+		TOOL_GCC3_AR="$(tc-getAR)"
+		TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
+
+		TOOL_GXX3_CC="$(tc-getCC)"
+		TOOL_GXX3_CXX="$(tc-getCXX)"
+		TOOL_GXX3_LD="$(tc-getCXX)"
+		TOOL_GXX3_AS="$(tc-getCXX)"
+		TOOL_GXX3_AR="$(tc-getAR)"
+		TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
+
+		TOOL_GCC3_CFLAGS="${CFLAGS}"
+		TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
+		VBOX_GCC_OPT="${CXXFLAGS}"
+		VBOX_NM="$(tc-getNM)"
+
+		TOOL_YASM_AS=yasm
+	)
+
+	if use amd64 && has_multilib_profile; then
+		myemakeargs+=(
+			CC32="$(tc-getCC) -m32"
+			CXX32="$(tc-getCXX) -m32"
+
+			TOOL_GCC32_CC="$(tc-getCC) -m32"
+			TOOL_GCC32_CXX="$(tc-getCXX) -m32"
+			TOOL_GCC32_LD="$(tc-getCC) -m32"
+			TOOL_GCC32_AS="$(tc-getCC) -m32"
+			TOOL_GCC32_AR="$(tc-getAR)"
+			TOOL_GCC32_OBJCOPY="$(tc-getOBJCOPY)"
+
+			TOOL_GXX32_CC="$(tc-getCC) -m32"
+			TOOL_GXX32_CXX="$(tc-getCXX) -m32"
+			TOOL_GXX32_LD="$(tc-getCXX) -m32"
+			TOOL_GXX32_AS="$(tc-getCXX) -m32"
+			TOOL_GXX32_AR="$(tc-getAR)"
+			TOOL_GXX32_OBJCOPY="$(tc-getOBJCOPY)"
+		)
+	fi
+
+	MAKE="kmk" emake "${myemakeargs[@]}" all
+}
+
+src_install() {
+	cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
+
+	local vbox_inst_path="/usr/$(get_libdir)/${MY_PN}" each size ico icofile
+
+	vbox_inst() {
+		local binary="${1}"
+		local perms="${2:-0750}"
+		local path="${3:-${vbox_inst_path}}"
+
+		[[ -n "${binary}" ]] || die "vbox_inst: No binary given!"
+		[[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
+
+		insinto ${path}
+		doins ${binary}
+		fowners root:vboxusers ${path}/${binary}
+		fperms ${perms} ${path}/${binary}
+	}
+
+	# Create configuration files
+	insinto /etc/vbox
+	newins "${FILESDIR}/${MY_PN}-4-config" vbox.cfg
+
+	# Set the correct libdir
+	sed \
+		-e "s@MY_LIBDIR@$(get_libdir)@" \
+		-i "${ED}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
+
+	# Install the wrapper script
+	exeinto ${vbox_inst_path}
+	newexe "${FILESDIR}/${MY_PN}-ose-6-wrapper" "VBox"
+	fowners root:vboxusers ${vbox_inst_path}/VBox
+	fperms 0750 ${vbox_inst_path}/VBox
+
+	# Install binaries and libraries
+	insinto ${vbox_inst_path}
+	doins -r components
+
+	for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,VMMPreload,XPCOMIPCD} \
+		vboximg-mount vbox-img *so *r0; do
+		vbox_inst ${each}
+	done
+
+	for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
+		vbox_inst ${each} 0750
+	done
+
+	# Install EFI Firmware files (bug #320757)
+	for each in VBoxEFI{32,64}.fd ; do
+		vbox_inst ${each} 0644
+	done
+
+	# VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
+	# VBoxXPCOMIPCD (bug #524202)
+	for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
+		pax-mark -m "${ED}"${vbox_inst_path}/${each}
+	done
+
+	# Symlink binaries to the shipped wrapper
+	for each in vbox{autostart,balloonctrl,bugreport,headless,manage} \
+		VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do
+			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+	done
+	dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount
+	dosym ${vbox_inst_path}/vbox-img /usr/bin/vbox-img
+
+	if use pam; then
+		# VRDPAuth only works with this (bug #351949)
+		dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
+	fi
+
+	# set an env-variable for 3rd party tools
+	echo "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
+	# environment variables used during SDK binding installation
+	echo "VBOX_SDK_PATH=${vbox_inst_path}/sdk" >> "${T}/90virtualbox"
+	echo "VBOX_INSTALL_PATH=${vbox_inst_path}" >> "${T}/90virtualbox"
+	doenvd "${T}/90virtualbox"
+
+	if use sdl; then
+		vbox_inst VBoxSDL 0750
+		pax-mark -m "${ED}"${vbox_inst_path}/VBoxSDL
+
+		for each in vboxsdl VBoxSDL ; do
+			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+		done
+	fi
+
+	if use gui; then
+		vbox_inst VirtualBox
+		vbox_inst VirtualBoxVM 0750
+		for each in VirtualBox{,VM} ; do
+			pax-mark -m "${ED}"${vbox_inst_path}/${each}
+		done
+
+		if use opengl; then
+			vbox_inst VBoxTestOGL
+			pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
+		fi
+
+		for each in virtualbox{,vm} VirtualBox{,VM} ; do
+			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+		done
+
+		insinto /usr/share/${PN}
+		doins -r nls
+		doins -r UnattendedTemplates
+
+		newmenu ${MY_PN}.desktop ${PN}.desktop
+
+		pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
+		for size in 16 32 48 64 128 ; do
+			newicon -s ${size} ${MY_PN}-${size}px.png ${PN}.png
+		done
+		newicon ${MY_PN}-48px.png ${PN}.png
+		newicon -s scalable ${MY_PN}.svg ${PN}.png
+		popd &>/dev/null || die
+		pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
+		for size in 16 24 32 48 64 72 96 128 256 512 ; do
+			for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
+				icofile="${MY_PN}-${ico}-${size}px.png"
+				if [[ -f "${icofile}" ]]; then
+					newicon -s ${size} ${icofile} ${MY_PN}-${ico}.png
+				fi
+			done
+		done
+		popd &>/dev/null || die
+	fi
+
+	if use lvm; then
+		vbox_inst VBoxVolInfo 0750
+		dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
+	fi
+
+	if use sdk; then
+		insinto ${vbox_inst_path}
+		doins -r sdk
+
+		if use java; then
+			java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
+			java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
+		fi
+	fi
+
+	if use udev; then
+		local udevdir="$(get_udevdir)"
+		local udev_file="VBoxCreateUSBNode.sh"
+		local rules_file="10-virtualbox.rules"
+
+		insinto ${udevdir}
+		doins ${udev_file}
+		fowners root:vboxusers ${udevdir}/${udev_file}
+		fperms 0750 ${udevdir}/${udev_file}
+
+		insinto ${udevdir}/rules.d
+		sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \
+			> "${T}"/${rules_file} || die
+		doins "${T}"/${rules_file}
+	fi
+
+	if use vboxwebsrv; then
+		vbox_inst vboxwebsrv
+		dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
+		newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
+		newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
+	fi
+
+	# Remove dead symlinks (bug #715338)
+	find "${ED}"/usr/$(get_libdir)/${MY_PN} -xtype l -delete || die
+
+	# Fix version string in extensions or else they don't get accepted
+	# by the virtualbox host process (see bug #438930)
+	find ExtensionPacks -type f -name "ExtPack.xml" -exec sed -i '/Version/s@_Gentoo@@' {} \+ || die
+
+	local extensions_dir="${vbox_inst_path}/ExtensionPacks"
+
+	if use vnc; then
+		insinto ${extensions_dir}
+		doins -r ExtensionPacks/VNC
+	fi
+
+	if use dtrace; then
+		insinto ${extensions_dir}
+		doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
+	fi
+
+	if use doc; then
+		dodoc UserManual.pdf UserManual.q{ch,hc}
+		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
+	elif use gui; then
+		dodoc "${WORKDIR}"/${MY_PN}-help-${ORIGIN_PV}/UserManual.q{ch,hc}
+		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
+	fi
+	dodoc ${PATCHES_DIR}/README.*
+
+	if use python; then
+		local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.so"
+		if [[ ! -x "${python_path_ext}" ]]; then
+			eerror "Couldn't find ${python_path_ext}! Bindings were requested with USE=python"
+			eerror "but none were installed. This may happen if support for a Python target"
+			eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles."
+			die "Incomplete installation of Python bindings! File a bug with Gentoo!"
+		fi
+
+		# 378871
+		local installer_dir="${ED}/usr/$(get_libdir)/virtualbox/sdk/installer"
+		pushd "${installer_dir}" &> /dev/null || die
+		sed -e "s;%VBOX_INSTALL_PATH%;${vbox_inst_path};" \
+			-e "s;%VBOX_SDK_PATH%;${vbox_inst_path}/sdk;" \
+			-i vboxapi/__init__.py || die
+		# insert shebang, the files come without one
+		find vboxapi -name \*.py -exec sed -e "1 i\#! ${PYTHON}" -i {} \+ || die
+		python_domodule vboxapi
+		popd &> /dev/null || die
+		python_doscript vboxshell.py
+
+		# do not install the installer
+		rm -r "${installer_dir}" || die
+	fi
+
+	newtmpfiles "${FILESDIR}"/${MY_PN}-vboxusb_tmpfilesd virtualbox-vboxusb.conf
+}
+
+pkg_postinst() {
+	xdg_pkg_postinst
+
+	if use udev; then
+		udev_reload
+		udevadm trigger --subsystem-match=usb
+	fi
+
+	tmpfiles_process virtualbox-vboxusb.conf
+
+	if use gui; then
+		elog "To launch VirtualBox just type: \"virtualbox\"."
+	fi
+
+	elog "You must be in the vboxusers group to use VirtualBox."
+	elog ""
+	elog "The latest user manual is available for download at:"
+	elog "https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/UserManual.pdf"
+	elog ""
+
+	optfeature "Advanced networking setups" net-misc/bridge-utils sys-apps/usermode-utilities
+	optfeature "USB2, USB3, PXE boot, and VRDP support" app-emulation/virtualbox-extpack-oracle
+	optfeature "Guest additions ISO" app-emulation/virtualbox-additions
+
+	if ! use udev; then
+		ewarn "Without USE=udev, USB devices will likely not work in ${MY_PN}."
+	fi
+}
+
+pkg_postrm() {
+	xdg_pkg_postrm
+
+	use udev && udev_reload
+}


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/
@ 2024-05-03 17:41 Viorel Munteanu
  0 siblings, 0 replies; 24+ messages in thread
From: Viorel Munteanu @ 2024-05-03 17:41 UTC (permalink / raw
  To: gentoo-commits

commit:     bd72c96119eee18493c5a3b716c6c940d37631ca
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Fri May  3 17:36:26 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Fri May  3 17:40:57 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd72c961

app-emulation/virtualbox-kvm: drop 7.0.16_pre20240325

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox-kvm/Manifest              |   1 -
 .../virtualbox-kvm-7.0.16_pre20240325.ebuild       | 768 ---------------------
 2 files changed, 769 deletions(-)

diff --git a/app-emulation/virtualbox-kvm/Manifest b/app-emulation/virtualbox-kvm/Manifest
index 79b5cc07546e..924a057190f7 100644
--- a/app-emulation/virtualbox-kvm/Manifest
+++ b/app-emulation/virtualbox-kvm/Manifest
@@ -6,7 +6,6 @@ DIST virtualbox-help-7.0.16.tar.xz 3948696 BLAKE2B 5c5937313ea0e5cb4764b8a61fd15
 DIST virtualbox-help-7.0.18.tar.xz 3948116 BLAKE2B 5715a7e609297387b5fccce0951c62e5969fd68adeecb869712e69f5e90daef97384bd3ff3c39de40903a1fabe7ac6d2f8ecdbb40de16abe955d40e49b962eec SHA512 ec0f915b7221bc40d02f5f1675eb0defb5506b2f2bd96c063a96a9346e1c82428ccdda8b3adac43238c451ae185ac31af4a186da17ffe091469e14e696388b3a
 DIST virtualbox-kvm-7.0.14_pre20240325.tar.gz 134926 BLAKE2B 3e707b272219b2c5703d91d1f6a2f0a6c54fe29eeb6e91e5830949f7260e5b409e3425c38daea568725cb7fd10ddee234af6b72d747206e0a98ac1e33a10028c SHA512 e30291e1d7e2649057a9b38ea907f22f62b0367f33d88af10fdaaa49333890be2b719626103f9800836a3833368a018f5fc63a46577dd1d83178d7406bf8c494
 DIST virtualbox-kvm-7.0.14_pre20240502.tar.gz 141218 BLAKE2B fd78db709a37fd5239e52a71a5690073631c9376a0a2d6ab9a885a5892ff272d432adeabf03c3317556a9d76cc6819cc5dcd44cd19bd18bd338bb1b84bda5dae SHA512 650bbe3a8c51d7373c25834be129888b624c2d99baebe4105c2a70b1a013cdb7527224778a78f6901b91dea6e22129354ba9269bcd365b9956df5c5b8a77869b
-DIST virtualbox-kvm-7.0.16_pre20240325.tar.gz 134926 BLAKE2B 3e707b272219b2c5703d91d1f6a2f0a6c54fe29eeb6e91e5830949f7260e5b409e3425c38daea568725cb7fd10ddee234af6b72d747206e0a98ac1e33a10028c SHA512 e30291e1d7e2649057a9b38ea907f22f62b0367f33d88af10fdaaa49333890be2b719626103f9800836a3833368a018f5fc63a46577dd1d83178d7406bf8c494
 DIST virtualbox-kvm-7.0.18_pre20240502.tar.gz 141218 BLAKE2B fd78db709a37fd5239e52a71a5690073631c9376a0a2d6ab9a885a5892ff272d432adeabf03c3317556a9d76cc6819cc5dcd44cd19bd18bd338bb1b84bda5dae SHA512 650bbe3a8c51d7373c25834be129888b624c2d99baebe4105c2a70b1a013cdb7527224778a78f6901b91dea6e22129354ba9269bcd365b9956df5c5b8a77869b
 DIST virtualbox-patches-7.0.14.tar.bz2 6937 BLAKE2B da5f18efbba2a8f4701b3d29dc00784e4e80e18a18b029e5dce8c142eb4dc97637069bfc5081422064a7dc59dfacf503ebbdc3421caa96430dc53fa72988aa20 SHA512 57cc34b92e4626de5c445e34ae025da7ec0d752a60618c619a55c28bf7d6b1cc9dc81ea059b949b0f3e625568207e8084f9462faf487ca0daf2794e7f1feac36
 DIST virtualbox-patches-7.0.16.tar.bz2 6808 BLAKE2B d15fa2ca306375142c3e25d4759d2790b2bb9eb69e333a8773ad500b29dd127b401943abf59ca59d01858a3ed5551fb3a6c93c4c893c8de971a714ce5306d577 SHA512 a488cbc6660fe8637c44cd79d87156609af089988239a7e76fea8a3c7e6319512c574bef2e942b354b14ce671a8e75ab8b2160abf7c40963795ee8a545ecd992

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.16_pre20240325.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.16_pre20240325.ebuild
deleted file mode 100644
index f501f05d7084..000000000000
--- a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.16_pre20240325.ebuild
+++ /dev/null
@@ -1,768 +0,0 @@
-# Copyright 2022-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# To add a new Python here:
-# 1. Patch src/libs/xpcom18a4/python/Makefile.kmk (copy the previous impl's logic)
-#    Do NOT skip this part. It'll end up silently not-building the Python extension
-#    or otherwise misbehaving if you do.
-#
-# 2. Then update PYTHON_COMPAT & set PYTHON_SINGLE_TARGET for testing w/ USE=python.
-#
-#  May need to look at other distros (e.g. Arch Linux) to find patches for newer
-#  Python versions as upstream tends to lag. Upstream may have patches on their
-#  trunk branch but not release branch.
-#
-#  See bug #785835, bug #856121.
-PYTHON_COMPAT=( python3_{10..11} )
-
-inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \
-	python-single-r1 tmpfiles toolchain-funcs udev xdg
-
-PATCHES_PV="7.0.16"
-ORIGIN_PN="VirtualBox"
-ORIGIN_PV=${PATCHES_PV}
-
-MY_PN=virtualbox
-MY_PV=${PV#*_pre}
-
-PATCHES_DIR="${WORKDIR}"/${PN}-${MY_PV}
-
-DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
-HOMEPAGE="https://www.virtualbox.org/ https://github.com/cyberus-technology/virtualbox-kvm"
-SRC_URI="https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2"
-if [[ ${PV} == *9999* ]]; then
-	inherit git-r3
-
-	ORIGIN_PV=${PATCHES_PV}
-	EGIT_REPO_URI="https://github.com/cyberus-technology/virtualbox-kvm"
-else
-	ORIGIN_PV=${PV%_pre*}
-	PATCHES_DIR="${WORKDIR}"/${PN}-dev-${MY_PV}
-	SRC_URI+=" https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz"
-fi
-MY_P=${ORIGIN_PN}-${ORIGIN_PV}
-SRC_URI+="
-	https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/${MY_P}.tar.bz2
-	gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${MY_PN}/${MY_PN}-help-${ORIGIN_PV}.tar.xz ) )
-"
-S="${WORKDIR}/${ORIGIN_PN}-${ORIGIN_PV}"
-
-LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
-SLOT="0"
-IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde vnc"
-
-unset WATCOM #856769
-
-COMMON_DEPEND="
-	${PYTHON_DEPS}
-	acct-group/vboxusers
-	dev-libs/libtpms
-	dev-libs/libxml2
-	dev-libs/openssl:0=
-	media-libs/libpng:0=
-	media-libs/libvpx:0=
-	net-misc/curl
-	sys-libs/zlib
-	dbus? ( sys-apps/dbus )
-	gui? (
-		dev-qt/qtcore:5
-		dev-qt/qtdbus:5
-		dev-qt/qtgui:5
-		dev-qt/qthelp:5
-		dev-qt/qtprintsupport:5
-		dev-qt/qtwidgets:5
-		dev-qt/qtx11extras:5
-		dev-qt/qtxml:5
-		x11-libs/libX11
-		x11-libs/libXt
-		opengl? ( dev-qt/qtopengl:5 )
-	)
-	lvm? ( sys-fs/lvm2 )
-	opengl? (
-		media-libs/libglvnd[X]
-		media-libs/vulkan-loader
-		x11-libs/libX11
-		x11-libs/libXt
-	)
-	pam? ( sys-libs/pam )
-	sdl? (
-		media-libs/libsdl2[X,video]
-		x11-libs/libX11
-		x11-libs/libXcursor
-		x11-libs/libXt
-	)
-	vboxwebsrv? ( net-libs/gsoap[-gnutls(-),debug?] )
-	vde? ( net-misc/vde )
-	vnc? ( >=net-libs/libvncserver-0.9.9 )
-"
-# We're stuck on JDK (and JRE, I guess?) 1.8 because of need for wsimport
-# with USE="vboxwebsrv java". Note that we have to put things in DEPEND,
-# not (only, anyway) BDEPEND, as the eclass magic to set the environment variables
-# based on *DEPEND doesn't work for BDEPEND at least right now.
-#
-# There's a comment in Config.kmk about it
-# ("With Java 11 wsimport was removed, usually part of a separate install now.")
-# but it needs more investigation.
-#
-# See bug #878299 to track this issue.
-DEPEND="
-	${COMMON_DEPEND}
-	>=dev-libs/libxslt-1.1.19
-	virtual/libcrypt:=
-	alsa? ( >=media-libs/alsa-lib-1.0.13 )
-	gui? (
-		x11-base/xorg-proto
-		x11-libs/libxcb:=
-		x11-libs/libXcursor
-		x11-libs/libXext
-		x11-libs/libXinerama
-		x11-libs/libXmu
-		x11-libs/libXrandr
-	)
-	java? ( virtual/jdk:1.8 )
-	opengl? (
-		x11-base/xorg-proto
-		x11-libs/libXcursor
-		x11-libs/libXinerama
-		x11-libs/libXmu
-		x11-libs/libXrandr
-		virtual/glu
-	)
-	sdl? ( x11-libs/libXinerama )
-	pulseaudio? ( media-libs/libpulse )
-	udev? ( >=virtual/udev-171 )
-"
-RDEPEND="
-	!app-emulation/virtualbox
-	${COMMON_DEPEND}
-	gui? ( x11-libs/libxcb:= )
-	java? ( virtual/jre:1.8 )
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	>=app-arch/tar-1.34-r2
-	>=dev-lang/yasm-0.6.2
-	dev-libs/libIDL
-	dev-util/glslang
-	>=dev-build/kbuild-0.1.9998.3592
-	sys-apps/which
-	sys-devel/bin86
-	sys-libs/libcap
-	sys-power/iasl
-	virtual/pkgconfig
-	doc? (
-		app-text/docbook-sgml-dtd:4.4
-		app-text/docbook-xsl-ns-stylesheets
-		dev-texlive/texlive-basic
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-latexrecommended
-		dev-texlive/texlive-latexextra
-		dev-texlive/texlive-fontsrecommended
-		dev-texlive/texlive-fontsextra
-		dev-qt/qthelp:5
-	)
-	gui? ( dev-qt/linguist-tools:5 )
-	nls? ( dev-qt/linguist-tools:5 )
-	java? ( virtual/jdk:1.8 )
-"
-
-QA_FLAGS_IGNORED="
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
-"
-
-QA_TEXTRELS="
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-"
-
-QA_EXECSTACK="
-	usr/lib64/virtualbox/iPxeBaseBin
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
-"
-
-QA_WX_LOAD="
-	usr/lib64/virtualbox/iPxeBaseBin
-"
-
-QA_PRESTRIPPED="
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-"
-
-REQUIRED_USE="
-	java? ( sdk )
-	python? ( sdk )
-	vboxwebsrv? ( java )
-	${PYTHON_REQUIRED_USE}
-"
-
-PATCHES=(
-	# Downloaded patchset
-	"${WORKDIR}"/virtualbox-patches-${PATCHES_PV}/patches
-	"${PATCHES_DIR}"/patches
-)
-
-pkg_pretend() {
-	if ! use gui; then
-		einfo "No USE=\"gui\" selected, this build will not include any Qt frontend."
-	fi
-
-	if ! use opengl; then
-		einfo "No USE=\"opengl\" selected, this build will lack"
-		einfo "the OpenGL feature."
-	fi
-	if ! use python; then
-		einfo "You have disabled the \"python\" USE flag. This will only"
-		einfo "disable the python bindings being installed."
-	fi
-	if ! use nls && use gui; then
-		einfo "USE=\"gui\" also selects USE=\"nls\".  This build"
-		einfo "will have NLS support."
-	fi
-
-	# 749273
-	local d=${ROOT}
-	for i in usr "$(get_libdir)"; do
-		d="${d}/$i"
-		if [[ "$(stat -L -c "%g %u" "${d}")" != "0 0" ]]; then
-			die "${d} should be owned by root, VirtualBox will not start otherwise"
-		fi
-	done
-}
-
-pkg_setup() {
-	java-pkg-opt-2_pkg_setup
-	python-single-r1_pkg_setup
-}
-
-src_unpack() {
-	[[ ${PV} == *9999* ]] && git-r3_src_unpack
-	default
-}
-
-src_prepare() {
-	default
-
-	# Only add nopie patch when we're on hardened
-	if gcc-specs-pie; then
-		eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch
-	fi
-
-	# Remove shipped binaries (kBuild, yasm) and tools, see bug #232775
-	rm -r kBuild/bin || die
-	# Remove everything in tools except kBuildUnits
-	find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || die
-
-	# Disable things unused or split into separate ebuilds
-	sed -e "s@MY_LIBDIR@$(get_libdir)@" \
-		"${FILESDIR}"/${MY_PN}-5-localconfig > LocalConfig.kmk || die
-
-	if ! use pch; then
-		# bug #753323
-		printf '\n%s\n' "VBOX_WITHOUT_PRECOMPILED_HEADERS=1" \
-			>> LocalConfig.kmk || die
-	fi
-
-	# bug #916002, #488176
-	tc-ld-force-bfd
-
-	# Respect LDFLAGS
-	sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
-		-i Config.kmk src/libs/xpcom18a4/Config.kmk || die
-
-	# Do not use hard-coded ld (related to bug #488176)
-	sed -e '/QUIET)ld /s@ld @$(LD) @' \
-		-i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
-
-	# Use PAM only when pam USE flag is enbaled (bug #376531)
-	if ! use pam; then
-		einfo "Disabling PAM removes the possibility to use the VRDP features."
-		sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
-		sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
-			src/VBox/HostServices/Makefile.kmk || die
-		echo -e "\nIPRT_WITHOUT_PAM=1" >> LocalConfig.kmk || die
-	fi
-
-	# add correct java path
-	if use java; then
-		sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
-			-i "${S}"/Config.kmk || die
-		java-pkg-opt-2_src_prepare
-	fi
-
-	#856811 #864274
-	# cannot filter out only one flag, some combinations of these flags produce buggy executables
-	for i in abm avx avx2 bmi bmi2 fma fma4 popcnt; do
-		append-cflags $(test-flags-CC -mno-$i)
-		append-cxxflags $(test-flags-CXX -mno-$i)
-	done
-
-	# bug #908814
-	filter-lto
-
-	# bug #843437
-	cat >> LocalConfig.kmk <<-EOF || die
-		CXXFLAGS=${CXXFLAGS}
-		CFLAGS=${CFLAGS}
-	EOF
-
-	if use sdl; then
-		sed -i 's/sdl-config/sdl2-config/' configure || die
-		echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
-	fi
-
-	#443830
-	echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die
-
-	if tc-is-clang; then
-		# clang assembler chokes on comments starting with /
-		sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
-
-		# clang does not support this extension
-		eapply "${FILESDIR}"/${MY_PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
-	fi
-
-	# fix doc generation
-	echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die
-	# replace xhtml names with numeric equivalents
-	find doc/manual -name \*.xml -exec sed -i \
-		-e 's/&nbsp;/\&#160;/g' \
-		-e 's/&ndash;/\&#8211;/g' \
-		-e 's/&larr;/\&#8592;/g' \
-		-e 's/&rarr;/\&#8594;/g' \
-		-e 's/&harr;/\&#8596;/g' {} \+ || die
-
-	# fix help path #891879
-	echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die
-
-	# 489208
-	# Cannot patch the whole text, many translations.  Use sed instead to replace the command
-	find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \
-		's/&apos;[^&]*\(vboxdrv setup\|vboxconfig\)&apos;/\&apos;emerge -1 virtualbox-modules\&apos;/' {} \+ || die
-	sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \
-		src/VBox/Frontends/VirtualBox/src/main.cpp \
-		src/VBox/VMM/VMMR3/VM.cpp || die
-
-	# 890561
-	echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
-
-	if ! use nls && ! use gui; then
-		cat >> LocalConfig.kmk <<-EOF || die
-			VBOX_WITH_NLS :=
-			VBOX_WITH_MAIN_NLS :=
-			VBOX_WITH_PUEL_NLS :=
-			VBOX_WITH_VBOXMANAGE_NLS :=
-		EOF
-	fi
-}
-
-src_configure() {
-	tc-export AR CC CXX LD RANLIB
-	export HOST_CC="$(tc-getBUILD_CC)"
-
-	local myconf=(
-		--with-gcc="$(tc-getCC)"
-		--with-g++="$(tc-getCXX)"
-
-		--disable-kmods
-		--with-kvm
-
-		# this is required for kvm to work.
-		# also this prohibits installation with suid.
-		--disable-hardening
-
-		$(usev !alsa --disable-alsa)
-		$(usev !dbus --disable-dbus)
-		$(usev debug --build-debug)
-		$(usev !doc --disable-docs)
-		$(usev !java --disable-java)
-		$(usev !lvm --disable-devmapper)
-		$(usev !pulseaudio --disable-pulse)
-		$(usev !python --disable-python)
-		$(usev vboxwebsrv --enable-webservice)
-		$(usev vde --enable-vde)
-		$(usev vnc --enable-vnc)
-	)
-
-	if use gui || use sdl || use opengl; then
-		myconf+=(
-			$(usev !opengl --disable-opengl)
-			$(usev !gui --disable-qt)
-			$(usev !sdl --disable-sdl)
-		)
-	else
-		myconf+=(
-			--build-headless
-		)
-	fi
-
-	if use amd64 && ! has_multilib_profile; then
-		myconf+=( --disable-vmmraw )
-	fi
-
-	# not an autoconf script
-	edo ./configure "${myconf[@]}"
-
-	# Force usage of chosen Python implementation
-	# bug #856121, bug #785835
-	sed -i \
-		-e '/VBOX_WITH_PYTHON.*=/d' \
-		-e '/VBOX_PATH_PYTHON_INC.*=/d' \
-		-e '/VBOX_LIB_PYTHON.*=/d' \
-		AutoConfig.kmk || die
-
-	cat >> AutoConfig.kmk <<-EOF || die
-		VBOX_WITH_PYTHON=$(usev python 1)
-		VBOX_PATH_PYTHON_INC=$(python_get_includedir)
-		VBOX_LIB_PYTHON=$(python_get_library_path)
-	EOF
-
-	if use python; then
-		local mangled_python="${EPYTHON#python}"
-		mangled_python="${mangled_python/.}"
-
-		# Stub out the script which defines what the Makefile ends up
-		# building for. gen_python_deps.py gets called by the Makefile
-		# with some args and it spits out a bunch of paths for a hardcoded
-		# list of Pythons. We just override it with what we're actually using.
-		# This minimises the amount of patching we have to do for new Pythons.
-		cat > src/libs/xpcom18a4/python/gen_python_deps.py <<-EOF || die
-			print("VBOX_PYTHON${mangled_python}_INC=$(python_get_includedir)")
-			print("VBOX_PYTHON${mangled_python}_LIB=$(python_get_library_path)")
-			print("VBOX_PYTHONDEF_INC=$(python_get_includedir)")
-			print("VBOX_PYTHONDEF_LIB=$(python_get_library_path)")
-		EOF
-
-		chmod +x src/libs/xpcom18a4/python/gen_python_deps.py || die
-	fi
-}
-
-src_compile() {
-	source ./env.sh || die
-
-	# Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
-	MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
-	MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
-	MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
-
-	local myemakeargs=(
-		VBOX_BUILD_PUBLISHER=_Gentoo
-		VBOX_WITH_VBOXIMGMOUNT=1
-
-		KBUILD_VERBOSE=2
-
-		AS="$(tc-getCC)"
-		CC="$(tc-getCC)"
-		CXX="$(tc-getCXX)"
-
-		TOOL_GCC3_CC="$(tc-getCC)"
-		TOOL_GCC3_LD="$(tc-getCC)"
-		TOOL_GCC3_AS="$(tc-getCC)"
-		TOOL_GCC3_AR="$(tc-getAR)"
-		TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
-
-		TOOL_GXX3_CC="$(tc-getCC)"
-		TOOL_GXX3_CXX="$(tc-getCXX)"
-		TOOL_GXX3_LD="$(tc-getCXX)"
-		TOOL_GXX3_AS="$(tc-getCXX)"
-		TOOL_GXX3_AR="$(tc-getAR)"
-		TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
-
-		TOOL_GCC3_CFLAGS="${CFLAGS}"
-		TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
-		VBOX_GCC_OPT="${CXXFLAGS}"
-		VBOX_NM="$(tc-getNM)"
-
-		TOOL_YASM_AS=yasm
-	)
-
-	if use amd64 && has_multilib_profile; then
-		myemakeargs+=(
-			CC32="$(tc-getCC) -m32"
-			CXX32="$(tc-getCXX) -m32"
-
-			TOOL_GCC32_CC="$(tc-getCC) -m32"
-			TOOL_GCC32_CXX="$(tc-getCXX) -m32"
-			TOOL_GCC32_LD="$(tc-getCC) -m32"
-			TOOL_GCC32_AS="$(tc-getCC) -m32"
-			TOOL_GCC32_AR="$(tc-getAR)"
-			TOOL_GCC32_OBJCOPY="$(tc-getOBJCOPY)"
-
-			TOOL_GXX32_CC="$(tc-getCC) -m32"
-			TOOL_GXX32_CXX="$(tc-getCXX) -m32"
-			TOOL_GXX32_LD="$(tc-getCXX) -m32"
-			TOOL_GXX32_AS="$(tc-getCXX) -m32"
-			TOOL_GXX32_AR="$(tc-getAR)"
-			TOOL_GXX32_OBJCOPY="$(tc-getOBJCOPY)"
-		)
-	fi
-
-	MAKE="kmk" emake "${myemakeargs[@]}" all
-}
-
-src_install() {
-	cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
-
-	local vbox_inst_path="/usr/$(get_libdir)/${MY_PN}" each size ico icofile
-
-	vbox_inst() {
-		local binary="${1}"
-		local perms="${2:-0750}"
-		local path="${3:-${vbox_inst_path}}"
-
-		[[ -n "${binary}" ]] || die "vbox_inst: No binary given!"
-		[[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
-
-		insinto ${path}
-		doins ${binary}
-		fowners root:vboxusers ${path}/${binary}
-		fperms ${perms} ${path}/${binary}
-	}
-
-	# Create configuration files
-	insinto /etc/vbox
-	newins "${FILESDIR}/${MY_PN}-4-config" vbox.cfg
-
-	# Set the correct libdir
-	sed \
-		-e "s@MY_LIBDIR@$(get_libdir)@" \
-		-i "${ED}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
-
-	# Install the wrapper script
-	exeinto ${vbox_inst_path}
-	newexe "${FILESDIR}/${MY_PN}-ose-6-wrapper" "VBox"
-	fowners root:vboxusers ${vbox_inst_path}/VBox
-	fperms 0750 ${vbox_inst_path}/VBox
-
-	# Install binaries and libraries
-	insinto ${vbox_inst_path}
-	doins -r components
-
-	for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,VMMPreload,XPCOMIPCD} \
-		vboximg-mount vbox-img *so *r0; do
-		vbox_inst ${each}
-	done
-
-	# These binaries need to be suid root.
-	for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
-		vbox_inst ${each} 0750
-	done
-
-	# Install EFI Firmware files (bug #320757)
-	for each in VBoxEFI{32,64}.fd ; do
-		vbox_inst ${each} 0644
-	done
-
-	# VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
-	# VBoxXPCOMIPCD (bug #524202)
-	for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
-		pax-mark -m "${ED}"${vbox_inst_path}/${each}
-	done
-
-	# Symlink binaries to the shipped wrapper
-	for each in vbox{autostart,balloonctrl,bugreport,headless,manage} \
-		VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-	done
-	dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount
-	dosym ${vbox_inst_path}/vbox-img /usr/bin/vbox-img
-
-	if use pam; then
-		# VRDPAuth only works with this (bug #351949)
-		dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
-	fi
-
-	# set an env-variable for 3rd party tools
-	echo "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
-	# environment variables used during SDK binding installation
-	echo "VBOX_SDK_PATH=${vbox_inst_path}/sdk" >> "${T}/90virtualbox"
-	echo "VBOX_INSTALL_PATH=${vbox_inst_path}" >> "${T}/90virtualbox"
-	doenvd "${T}/90virtualbox"
-
-	if use sdl; then
-		vbox_inst VBoxSDL 0750
-		pax-mark -m "${ED}"${vbox_inst_path}/VBoxSDL
-
-		for each in vboxsdl VBoxSDL ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-		done
-	fi
-
-	if use gui; then
-		vbox_inst VirtualBox
-		vbox_inst VirtualBoxVM 0750
-		for each in VirtualBox{,VM} ; do
-			pax-mark -m "${ED}"${vbox_inst_path}/${each}
-		done
-
-		if use opengl; then
-			vbox_inst VBoxTestOGL
-			pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
-		fi
-
-		for each in virtualbox{,vm} VirtualBox{,VM} ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-		done
-
-		insinto /usr/share/${PN}
-		doins -r nls
-		doins -r UnattendedTemplates
-
-		newmenu ${MY_PN}.desktop ${PN}.desktop
-
-		pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
-		for size in 16 32 48 64 128 ; do
-			newicon -s ${size} ${MY_PN}-${size}px.png ${PN}.png
-		done
-		newicon ${MY_PN}-48px.png ${PN}.png
-		newicon -s scalable ${MY_PN}.svg ${PN}.png
-		popd &>/dev/null || die
-		pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
-		for size in 16 24 32 48 64 72 96 128 256 512 ; do
-			for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
-				icofile="${MY_PN}-${ico}-${size}px.png"
-				if [[ -f "${icofile}" ]]; then
-					newicon -s ${size} ${icofile} ${MY_PN}-${ico}.png
-				fi
-			done
-		done
-		popd &>/dev/null || die
-	fi
-
-	if use lvm; then
-		vbox_inst VBoxVolInfo 0750
-		dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
-	fi
-
-	if use sdk; then
-		insinto ${vbox_inst_path}
-		doins -r sdk
-
-		if use java; then
-			java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
-			java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
-		fi
-	fi
-
-	if use udev; then
-		local udevdir="$(get_udevdir)"
-		local udev_file="VBoxCreateUSBNode.sh"
-		local rules_file="10-virtualbox.rules"
-
-		insinto ${udevdir}
-		doins ${udev_file}
-		fowners root:vboxusers ${udevdir}/${udev_file}
-		fperms 0750 ${udevdir}/${udev_file}
-
-		insinto ${udevdir}/rules.d
-		sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \
-			> "${T}"/${rules_file} || die
-		doins "${T}"/${rules_file}
-	fi
-
-	if use vboxwebsrv; then
-		vbox_inst vboxwebsrv
-		dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
-		newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
-		newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
-	fi
-
-	# Remove dead symlinks (bug #715338)
-	find "${ED}"/usr/$(get_libdir)/${MY_PN} -xtype l -delete || die
-
-	# Fix version string in extensions or else they don't get accepted
-	# by the virtualbox host process (see bug #438930)
-	find ExtensionPacks -type f -name "ExtPack.xml" -exec sed -i '/Version/s@_Gentoo@@' {} \+ || die
-
-	local extensions_dir="${vbox_inst_path}/ExtensionPacks"
-
-	if use vnc; then
-		insinto ${extensions_dir}
-		doins -r ExtensionPacks/VNC
-	fi
-
-	if use dtrace; then
-		insinto ${extensions_dir}
-		doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
-	fi
-
-	if use doc; then
-		dodoc UserManual.pdf UserManual.q{ch,hc}
-		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
-	elif use gui; then
-		dodoc "${WORKDIR}"/${MY_PN}-help-${ORIGIN_PV}/UserManual.q{ch,hc}
-		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
-	fi
-	dodoc ${PATCHES_DIR}/README.*
-
-	if use python; then
-		local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.so"
-		if [[ ! -x "${python_path_ext}" ]]; then
-			eerror "Couldn't find ${python_path_ext}! Bindings were requested with USE=python"
-			eerror "but none were installed. This may happen if support for a Python target"
-			eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles."
-			die "Incomplete installation of Python bindings! File a bug with Gentoo!"
-		fi
-
-		# 378871
-		local installer_dir="${ED}/usr/$(get_libdir)/virtualbox/sdk/installer"
-		pushd "${installer_dir}" &> /dev/null || die
-		sed -e "s;%VBOX_INSTALL_PATH%;${vbox_inst_path};" \
-			-e "s;%VBOX_SDK_PATH%;${vbox_inst_path}/sdk;" \
-			-i vboxapi/__init__.py || die
-		# insert shebang, the files come without one
-		find vboxapi -name \*.py -exec sed -e "1 i\#! ${PYTHON}" -i {} \+ || die
-		python_domodule vboxapi
-		popd &> /dev/null || die
-		python_doscript vboxshell.py
-
-		# do not install the installer
-		rm -r "${installer_dir}" || die
-	fi
-
-	newtmpfiles "${FILESDIR}"/${MY_PN}-vboxusb_tmpfilesd virtualbox-vboxusb.conf
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-
-	if use udev; then
-		udev_reload
-		udevadm trigger --subsystem-match=usb
-	fi
-
-	tmpfiles_process virtualbox-vboxusb.conf
-
-	if use gui; then
-		elog "To launch VirtualBox just type: \"virtualbox\"."
-	fi
-
-	elog "You must be in the vboxusers group to use VirtualBox."
-	elog ""
-	elog "The latest user manual is available for download at:"
-	elog "https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/UserManual.pdf"
-	elog ""
-
-	optfeature "Advanced networking setups" net-misc/bridge-utils sys-apps/usermode-utilities
-	optfeature "USB2, USB3, PXE boot, and VRDP support" app-emulation/virtualbox-extpack-oracle
-	optfeature "Guest additions ISO" app-emulation/virtualbox-additions
-
-	if ! use udev; then
-		ewarn "Without USE=udev, USB devices will likely not work in ${MY_PN}."
-	fi
-}
-
-pkg_postrm() {
-	xdg_pkg_postrm
-
-	use udev && udev_reload
-}


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/
@ 2024-05-03 17:41 Viorel Munteanu
  0 siblings, 0 replies; 24+ messages in thread
From: Viorel Munteanu @ 2024-05-03 17:41 UTC (permalink / raw
  To: gentoo-commits

commit:     d0f3c2cb49f7e8dc0607dab7031cdc91e7184057
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Fri May  3 17:36:17 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Fri May  3 17:40:57 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0f3c2cb

app-emulation/virtualbox-kvm: add 7.0.18_pre20240502

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox-kvm/Manifest              |   3 +
 .../virtualbox-kvm-7.0.18_pre20240502.ebuild       | 768 +++++++++++++++++++++
 2 files changed, 771 insertions(+)

diff --git a/app-emulation/virtualbox-kvm/Manifest b/app-emulation/virtualbox-kvm/Manifest
index f14b13f94f89..79b5cc07546e 100644
--- a/app-emulation/virtualbox-kvm/Manifest
+++ b/app-emulation/virtualbox-kvm/Manifest
@@ -1,9 +1,12 @@
 DIST VirtualBox-7.0.14.tar.bz2 175654864 BLAKE2B 99f4942b864ce481d69983af31393d763452c5b55697ab642b43c155f5fbc2a9963fbe1b7744baef620d0b351e1ac73c1ef978698b9a7e77897bb9cbc18dc17c SHA512 6a82933bbf51ff255d17cb61ae6ddfb791a2200e3dff705f181cd06c6031b48cf15faa5e8202a65daef0fb20b7fd9e33d40dbd0f9cc3f49af49fff04a1cb0a73
 DIST VirtualBox-7.0.16.tar.bz2 170897951 BLAKE2B 6b436c38df632222621723db94677a0efef5de2ac1eacec73571bc658955f23fff347fa60c37ec78c58bf94b82b8f9a95fb26c07ef4becc7e9f535af069151f5 SHA512 1b8ba08bec144cbd1f2e9aa0929cdf60a0b99930f1dd80567094fba75097d87661aef3da2cc24f4abff6b6db8f186e251c5f693a2a93943cc39909d5f1e1bce5
+DIST VirtualBox-7.0.18.tar.bz2 173295159 BLAKE2B 1371d54d648aafbad3814d55d495836ce7a6f9ca955aeb71e24c57a27ed8acae8c020b8094ca7386d341d5e7460b9b0823cc01e7e69dd3cdadaadee1bc608bd1 SHA512 e78a18fa808152cbdc1d407751acf3f57a8202bf238ad3432c4f0b0f97ab203e915a6cd11619e64f4aca5b907eb72be67bab146869af0e73414144addf0d76b4
 DIST virtualbox-help-7.0.14.tar.xz 3944832 BLAKE2B 95079e4da8c960c41cee799142779a6c2587e0e8af7956ca551cb5a4c0f36f313189dfe08afba83a0c32886866a7f9903b5e370008d6b3ce6283fb2288866b06 SHA512 e2f1acdd7577a93047e220300b1996d2855ddef20053c01294f8295fde0840645c41b75632d71dd2fc276219084fe4105fd057623f39375542358796425a2d03
 DIST virtualbox-help-7.0.16.tar.xz 3948696 BLAKE2B 5c5937313ea0e5cb4764b8a61fd1587e88a4afc965ef00862c5a265a15253929d35e0635231b6be5656f26f600bc4b70a2fa2ebc0f33b35d35c184b57e5acef8 SHA512 b9baca57118a82e3489c8445f0988671f16f75de60cc2d929d5e3b0c4c9e3ceacd796a72a81bba88d69eb4b4559835a13775c18d7782ae7dbe8ad202e247db0c
+DIST virtualbox-help-7.0.18.tar.xz 3948116 BLAKE2B 5715a7e609297387b5fccce0951c62e5969fd68adeecb869712e69f5e90daef97384bd3ff3c39de40903a1fabe7ac6d2f8ecdbb40de16abe955d40e49b962eec SHA512 ec0f915b7221bc40d02f5f1675eb0defb5506b2f2bd96c063a96a9346e1c82428ccdda8b3adac43238c451ae185ac31af4a186da17ffe091469e14e696388b3a
 DIST virtualbox-kvm-7.0.14_pre20240325.tar.gz 134926 BLAKE2B 3e707b272219b2c5703d91d1f6a2f0a6c54fe29eeb6e91e5830949f7260e5b409e3425c38daea568725cb7fd10ddee234af6b72d747206e0a98ac1e33a10028c SHA512 e30291e1d7e2649057a9b38ea907f22f62b0367f33d88af10fdaaa49333890be2b719626103f9800836a3833368a018f5fc63a46577dd1d83178d7406bf8c494
 DIST virtualbox-kvm-7.0.14_pre20240502.tar.gz 141218 BLAKE2B fd78db709a37fd5239e52a71a5690073631c9376a0a2d6ab9a885a5892ff272d432adeabf03c3317556a9d76cc6819cc5dcd44cd19bd18bd338bb1b84bda5dae SHA512 650bbe3a8c51d7373c25834be129888b624c2d99baebe4105c2a70b1a013cdb7527224778a78f6901b91dea6e22129354ba9269bcd365b9956df5c5b8a77869b
 DIST virtualbox-kvm-7.0.16_pre20240325.tar.gz 134926 BLAKE2B 3e707b272219b2c5703d91d1f6a2f0a6c54fe29eeb6e91e5830949f7260e5b409e3425c38daea568725cb7fd10ddee234af6b72d747206e0a98ac1e33a10028c SHA512 e30291e1d7e2649057a9b38ea907f22f62b0367f33d88af10fdaaa49333890be2b719626103f9800836a3833368a018f5fc63a46577dd1d83178d7406bf8c494
+DIST virtualbox-kvm-7.0.18_pre20240502.tar.gz 141218 BLAKE2B fd78db709a37fd5239e52a71a5690073631c9376a0a2d6ab9a885a5892ff272d432adeabf03c3317556a9d76cc6819cc5dcd44cd19bd18bd338bb1b84bda5dae SHA512 650bbe3a8c51d7373c25834be129888b624c2d99baebe4105c2a70b1a013cdb7527224778a78f6901b91dea6e22129354ba9269bcd365b9956df5c5b8a77869b
 DIST virtualbox-patches-7.0.14.tar.bz2 6937 BLAKE2B da5f18efbba2a8f4701b3d29dc00784e4e80e18a18b029e5dce8c142eb4dc97637069bfc5081422064a7dc59dfacf503ebbdc3421caa96430dc53fa72988aa20 SHA512 57cc34b92e4626de5c445e34ae025da7ec0d752a60618c619a55c28bf7d6b1cc9dc81ea059b949b0f3e625568207e8084f9462faf487ca0daf2794e7f1feac36
 DIST virtualbox-patches-7.0.16.tar.bz2 6808 BLAKE2B d15fa2ca306375142c3e25d4759d2790b2bb9eb69e333a8773ad500b29dd127b401943abf59ca59d01858a3ed5551fb3a6c93c4c893c8de971a714ce5306d577 SHA512 a488cbc6660fe8637c44cd79d87156609af089988239a7e76fea8a3c7e6319512c574bef2e942b354b14ce671a8e75ab8b2160abf7c40963795ee8a545ecd992

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.18_pre20240502.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.18_pre20240502.ebuild
new file mode 100644
index 000000000000..2b901786ab78
--- /dev/null
+++ b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.18_pre20240502.ebuild
@@ -0,0 +1,768 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# To add a new Python here:
+# 1. Patch src/libs/xpcom18a4/python/Makefile.kmk (copy the previous impl's logic)
+#    Do NOT skip this part. It'll end up silently not-building the Python extension
+#    or otherwise misbehaving if you do.
+#
+# 2. Then update PYTHON_COMPAT & set PYTHON_SINGLE_TARGET for testing w/ USE=python.
+#
+#  May need to look at other distros (e.g. Arch Linux) to find patches for newer
+#  Python versions as upstream tends to lag. Upstream may have patches on their
+#  trunk branch but not release branch.
+#
+#  See bug #785835, bug #856121.
+PYTHON_COMPAT=( python3_{10..11} )
+
+inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \
+	python-single-r1 tmpfiles toolchain-funcs udev xdg
+
+PATCHES_PV="7.0.16"
+ORIGIN_PN="VirtualBox"
+ORIGIN_PV=${PATCHES_PV}
+
+MY_PN=virtualbox
+MY_PV=${PV#*_pre}
+
+PATCHES_DIR="${WORKDIR}"/${PN}-${MY_PV}
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/ https://github.com/cyberus-technology/virtualbox-kvm"
+SRC_URI="https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2"
+if [[ ${PV} == *9999* ]]; then
+	inherit git-r3
+
+	ORIGIN_PV=${PATCHES_PV}
+	EGIT_REPO_URI="https://github.com/cyberus-technology/virtualbox-kvm"
+else
+	ORIGIN_PV=${PV%_pre*}
+	PATCHES_DIR="${WORKDIR}"/${PN}-dev-${MY_PV}
+	SRC_URI+=" https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz"
+fi
+MY_P=${ORIGIN_PN}-${ORIGIN_PV}
+SRC_URI+="
+	https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/${MY_P}.tar.bz2
+	gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${MY_PN}/${MY_PN}-help-${ORIGIN_PV}.tar.xz ) )
+"
+S="${WORKDIR}/${ORIGIN_PN}-${ORIGIN_PV}"
+
+LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
+SLOT="0"
+IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde vnc"
+
+unset WATCOM #856769
+
+COMMON_DEPEND="
+	${PYTHON_DEPS}
+	acct-group/vboxusers
+	dev-libs/libtpms
+	dev-libs/libxml2
+	dev-libs/openssl:0=
+	media-libs/libpng:0=
+	media-libs/libvpx:0=
+	net-misc/curl
+	sys-libs/zlib
+	dbus? ( sys-apps/dbus )
+	gui? (
+		dev-qt/qtcore:5
+		dev-qt/qtdbus:5
+		dev-qt/qtgui:5
+		dev-qt/qthelp:5
+		dev-qt/qtprintsupport:5
+		dev-qt/qtwidgets:5
+		dev-qt/qtx11extras:5
+		dev-qt/qtxml:5
+		x11-libs/libX11
+		x11-libs/libXt
+		opengl? ( dev-qt/qtopengl:5 )
+	)
+	lvm? ( sys-fs/lvm2 )
+	opengl? (
+		media-libs/libglvnd[X]
+		media-libs/vulkan-loader
+		x11-libs/libX11
+		x11-libs/libXt
+	)
+	pam? ( sys-libs/pam )
+	sdl? (
+		media-libs/libsdl2[X,video]
+		x11-libs/libX11
+		x11-libs/libXcursor
+		x11-libs/libXt
+	)
+	vboxwebsrv? ( net-libs/gsoap[-gnutls(-),debug?] )
+	vde? ( net-misc/vde )
+	vnc? ( >=net-libs/libvncserver-0.9.9 )
+"
+# We're stuck on JDK (and JRE, I guess?) 1.8 because of need for wsimport
+# with USE="vboxwebsrv java". Note that we have to put things in DEPEND,
+# not (only, anyway) BDEPEND, as the eclass magic to set the environment variables
+# based on *DEPEND doesn't work for BDEPEND at least right now.
+#
+# There's a comment in Config.kmk about it
+# ("With Java 11 wsimport was removed, usually part of a separate install now.")
+# but it needs more investigation.
+#
+# See bug #878299 to track this issue.
+DEPEND="
+	${COMMON_DEPEND}
+	>=dev-libs/libxslt-1.1.19
+	virtual/libcrypt:=
+	alsa? ( >=media-libs/alsa-lib-1.0.13 )
+	gui? (
+		x11-base/xorg-proto
+		x11-libs/libxcb:=
+		x11-libs/libXcursor
+		x11-libs/libXext
+		x11-libs/libXinerama
+		x11-libs/libXmu
+		x11-libs/libXrandr
+	)
+	java? ( virtual/jdk:1.8 )
+	opengl? (
+		x11-base/xorg-proto
+		x11-libs/libXcursor
+		x11-libs/libXinerama
+		x11-libs/libXmu
+		x11-libs/libXrandr
+		virtual/glu
+	)
+	sdl? ( x11-libs/libXinerama )
+	pulseaudio? ( media-libs/libpulse )
+	udev? ( >=virtual/udev-171 )
+"
+RDEPEND="
+	!app-emulation/virtualbox
+	${COMMON_DEPEND}
+	gui? ( x11-libs/libxcb:= )
+	java? ( virtual/jre:1.8 )
+"
+BDEPEND="
+	${PYTHON_DEPS}
+	>=app-arch/tar-1.34-r2
+	>=dev-lang/yasm-0.6.2
+	dev-libs/libIDL
+	dev-util/glslang
+	>=dev-build/kbuild-0.1.9998.3592
+	sys-apps/which
+	sys-devel/bin86
+	sys-libs/libcap
+	sys-power/iasl
+	virtual/pkgconfig
+	doc? (
+		app-text/docbook-sgml-dtd:4.4
+		app-text/docbook-xsl-ns-stylesheets
+		dev-texlive/texlive-basic
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-latexrecommended
+		dev-texlive/texlive-latexextra
+		dev-texlive/texlive-fontsrecommended
+		dev-texlive/texlive-fontsextra
+		dev-qt/qthelp:5
+	)
+	gui? ( dev-qt/linguist-tools:5 )
+	nls? ( dev-qt/linguist-tools:5 )
+	java? ( virtual/jdk:1.8 )
+"
+
+QA_FLAGS_IGNORED="
+	usr/lib64/virtualbox/VBoxDDR0.r0
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
+"
+
+QA_TEXTRELS="
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
+"
+
+QA_EXECSTACK="
+	usr/lib64/virtualbox/iPxeBaseBin
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/VBoxDDR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
+"
+
+QA_WX_LOAD="
+	usr/lib64/virtualbox/iPxeBaseBin
+"
+
+QA_PRESTRIPPED="
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/VBoxDDR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
+"
+
+REQUIRED_USE="
+	java? ( sdk )
+	python? ( sdk )
+	vboxwebsrv? ( java )
+	${PYTHON_REQUIRED_USE}
+"
+
+PATCHES=(
+	# Downloaded patchset
+	"${WORKDIR}"/virtualbox-patches-${PATCHES_PV}/patches
+	"${PATCHES_DIR}"/patches
+)
+
+pkg_pretend() {
+	if ! use gui; then
+		einfo "No USE=\"gui\" selected, this build will not include any Qt frontend."
+	fi
+
+	if ! use opengl; then
+		einfo "No USE=\"opengl\" selected, this build will lack"
+		einfo "the OpenGL feature."
+	fi
+	if ! use python; then
+		einfo "You have disabled the \"python\" USE flag. This will only"
+		einfo "disable the python bindings being installed."
+	fi
+	if ! use nls && use gui; then
+		einfo "USE=\"gui\" also selects USE=\"nls\".  This build"
+		einfo "will have NLS support."
+	fi
+
+	# 749273
+	local d=${ROOT}
+	for i in usr "$(get_libdir)"; do
+		d="${d}/$i"
+		if [[ "$(stat -L -c "%g %u" "${d}")" != "0 0" ]]; then
+			die "${d} should be owned by root, VirtualBox will not start otherwise"
+		fi
+	done
+}
+
+pkg_setup() {
+	java-pkg-opt-2_pkg_setup
+	python-single-r1_pkg_setup
+}
+
+src_unpack() {
+	[[ ${PV} == *9999* ]] && git-r3_src_unpack
+	default
+}
+
+src_prepare() {
+	default
+
+	# Only add nopie patch when we're on hardened
+	if gcc-specs-pie; then
+		eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch
+	fi
+
+	# Remove shipped binaries (kBuild, yasm) and tools, see bug #232775
+	rm -r kBuild/bin || die
+	# Remove everything in tools except kBuildUnits
+	find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || die
+
+	# Disable things unused or split into separate ebuilds
+	sed -e "s@MY_LIBDIR@$(get_libdir)@" \
+		"${FILESDIR}"/${MY_PN}-5-localconfig > LocalConfig.kmk || die
+
+	if ! use pch; then
+		# bug #753323
+		printf '\n%s\n' "VBOX_WITHOUT_PRECOMPILED_HEADERS=1" \
+			>> LocalConfig.kmk || die
+	fi
+
+	# bug #916002, #488176
+	tc-ld-force-bfd
+
+	# Respect LDFLAGS
+	sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
+		-i Config.kmk src/libs/xpcom18a4/Config.kmk || die
+
+	# Do not use hard-coded ld (related to bug #488176)
+	sed -e '/QUIET)ld /s@ld @$(LD) @' \
+		-i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
+
+	# Use PAM only when pam USE flag is enbaled (bug #376531)
+	if ! use pam; then
+		einfo "Disabling PAM removes the possibility to use the VRDP features."
+		sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
+		sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
+			src/VBox/HostServices/Makefile.kmk || die
+		echo -e "\nIPRT_WITHOUT_PAM=1" >> LocalConfig.kmk || die
+	fi
+
+	# add correct java path
+	if use java; then
+		sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
+			-i "${S}"/Config.kmk || die
+		java-pkg-opt-2_src_prepare
+	fi
+
+	#856811 #864274
+	# cannot filter out only one flag, some combinations of these flags produce buggy executables
+	for i in abm avx avx2 bmi bmi2 fma fma4 popcnt; do
+		append-cflags $(test-flags-CC -mno-$i)
+		append-cxxflags $(test-flags-CXX -mno-$i)
+	done
+
+	# bug #908814
+	filter-lto
+
+	# bug #843437
+	cat >> LocalConfig.kmk <<-EOF || die
+		CXXFLAGS=${CXXFLAGS}
+		CFLAGS=${CFLAGS}
+	EOF
+
+	if use sdl; then
+		sed -i 's/sdl-config/sdl2-config/' configure || die
+		echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
+	fi
+
+	#443830
+	echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die
+
+	if tc-is-clang; then
+		# clang assembler chokes on comments starting with /
+		sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
+
+		# clang does not support this extension
+		eapply "${FILESDIR}"/${MY_PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
+	fi
+
+	# fix doc generation
+	echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die
+	# replace xhtml names with numeric equivalents
+	find doc/manual -name \*.xml -exec sed -i \
+		-e 's/&nbsp;/\&#160;/g' \
+		-e 's/&ndash;/\&#8211;/g' \
+		-e 's/&larr;/\&#8592;/g' \
+		-e 's/&rarr;/\&#8594;/g' \
+		-e 's/&harr;/\&#8596;/g' {} \+ || die
+
+	# fix help path #891879
+	echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die
+
+	# 489208
+	# Cannot patch the whole text, many translations.  Use sed instead to replace the command
+	find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \
+		's/&apos;[^&]*\(vboxdrv setup\|vboxconfig\)&apos;/\&apos;emerge -1 virtualbox-modules\&apos;/' {} \+ || die
+	sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \
+		src/VBox/Frontends/VirtualBox/src/main.cpp \
+		src/VBox/VMM/VMMR3/VM.cpp || die
+
+	# 890561
+	echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
+
+	if ! use nls && ! use gui; then
+		cat >> LocalConfig.kmk <<-EOF || die
+			VBOX_WITH_NLS :=
+			VBOX_WITH_MAIN_NLS :=
+			VBOX_WITH_PUEL_NLS :=
+			VBOX_WITH_VBOXMANAGE_NLS :=
+		EOF
+	fi
+}
+
+src_configure() {
+	tc-export AR CC CXX LD RANLIB
+	export HOST_CC="$(tc-getBUILD_CC)"
+
+	local myconf=(
+		--with-gcc="$(tc-getCC)"
+		--with-g++="$(tc-getCXX)"
+
+		--disable-kmods
+		--with-kvm
+
+		# this is required for kvm to work.
+		# also this prohibits installation with suid.
+		--disable-hardening
+
+		$(usev !alsa --disable-alsa)
+		$(usev !dbus --disable-dbus)
+		$(usev debug --build-debug)
+		$(usev !doc --disable-docs)
+		$(usev !java --disable-java)
+		$(usev !lvm --disable-devmapper)
+		$(usev !pulseaudio --disable-pulse)
+		$(usev !python --disable-python)
+		$(usev vboxwebsrv --enable-webservice)
+		$(usev vde --enable-vde)
+		$(usev vnc --enable-vnc)
+	)
+
+	if use gui || use sdl || use opengl; then
+		myconf+=(
+			$(usev !opengl --disable-opengl)
+			$(usev !gui --disable-qt)
+			$(usev !sdl --disable-sdl)
+		)
+	else
+		myconf+=(
+			--build-headless
+		)
+	fi
+
+	if use amd64 && ! has_multilib_profile; then
+		myconf+=( --disable-vmmraw )
+	fi
+
+	# not an autoconf script
+	edo ./configure "${myconf[@]}"
+
+	# Force usage of chosen Python implementation
+	# bug #856121, bug #785835
+	sed -i \
+		-e '/VBOX_WITH_PYTHON.*=/d' \
+		-e '/VBOX_PATH_PYTHON_INC.*=/d' \
+		-e '/VBOX_LIB_PYTHON.*=/d' \
+		AutoConfig.kmk || die
+
+	cat >> AutoConfig.kmk <<-EOF || die
+		VBOX_WITH_PYTHON=$(usev python 1)
+		VBOX_PATH_PYTHON_INC=$(python_get_includedir)
+		VBOX_LIB_PYTHON=$(python_get_library_path)
+	EOF
+
+	if use python; then
+		local mangled_python="${EPYTHON#python}"
+		mangled_python="${mangled_python/.}"
+
+		# Stub out the script which defines what the Makefile ends up
+		# building for. gen_python_deps.py gets called by the Makefile
+		# with some args and it spits out a bunch of paths for a hardcoded
+		# list of Pythons. We just override it with what we're actually using.
+		# This minimises the amount of patching we have to do for new Pythons.
+		cat > src/libs/xpcom18a4/python/gen_python_deps.py <<-EOF || die
+			print("VBOX_PYTHON${mangled_python}_INC=$(python_get_includedir)")
+			print("VBOX_PYTHON${mangled_python}_LIB=$(python_get_library_path)")
+			print("VBOX_PYTHONDEF_INC=$(python_get_includedir)")
+			print("VBOX_PYTHONDEF_LIB=$(python_get_library_path)")
+		EOF
+
+		chmod +x src/libs/xpcom18a4/python/gen_python_deps.py || die
+	fi
+}
+
+src_compile() {
+	source ./env.sh || die
+
+	# Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
+	MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
+	MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
+	MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
+
+	local myemakeargs=(
+		VBOX_BUILD_PUBLISHER=_Gentoo
+		VBOX_WITH_VBOXIMGMOUNT=1
+
+		KBUILD_VERBOSE=2
+
+		AS="$(tc-getCC)"
+		CC="$(tc-getCC)"
+		CXX="$(tc-getCXX)"
+
+		TOOL_GCC3_CC="$(tc-getCC)"
+		TOOL_GCC3_LD="$(tc-getCC)"
+		TOOL_GCC3_AS="$(tc-getCC)"
+		TOOL_GCC3_AR="$(tc-getAR)"
+		TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
+
+		TOOL_GXX3_CC="$(tc-getCC)"
+		TOOL_GXX3_CXX="$(tc-getCXX)"
+		TOOL_GXX3_LD="$(tc-getCXX)"
+		TOOL_GXX3_AS="$(tc-getCXX)"
+		TOOL_GXX3_AR="$(tc-getAR)"
+		TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
+
+		TOOL_GCC3_CFLAGS="${CFLAGS}"
+		TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
+		VBOX_GCC_OPT="${CXXFLAGS}"
+		VBOX_NM="$(tc-getNM)"
+
+		TOOL_YASM_AS=yasm
+	)
+
+	if use amd64 && has_multilib_profile; then
+		myemakeargs+=(
+			CC32="$(tc-getCC) -m32"
+			CXX32="$(tc-getCXX) -m32"
+
+			TOOL_GCC32_CC="$(tc-getCC) -m32"
+			TOOL_GCC32_CXX="$(tc-getCXX) -m32"
+			TOOL_GCC32_LD="$(tc-getCC) -m32"
+			TOOL_GCC32_AS="$(tc-getCC) -m32"
+			TOOL_GCC32_AR="$(tc-getAR)"
+			TOOL_GCC32_OBJCOPY="$(tc-getOBJCOPY)"
+
+			TOOL_GXX32_CC="$(tc-getCC) -m32"
+			TOOL_GXX32_CXX="$(tc-getCXX) -m32"
+			TOOL_GXX32_LD="$(tc-getCXX) -m32"
+			TOOL_GXX32_AS="$(tc-getCXX) -m32"
+			TOOL_GXX32_AR="$(tc-getAR)"
+			TOOL_GXX32_OBJCOPY="$(tc-getOBJCOPY)"
+		)
+	fi
+
+	MAKE="kmk" emake "${myemakeargs[@]}" all
+}
+
+src_install() {
+	cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
+
+	local vbox_inst_path="/usr/$(get_libdir)/${MY_PN}" each size ico icofile
+
+	vbox_inst() {
+		local binary="${1}"
+		local perms="${2:-0750}"
+		local path="${3:-${vbox_inst_path}}"
+
+		[[ -n "${binary}" ]] || die "vbox_inst: No binary given!"
+		[[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
+
+		insinto ${path}
+		doins ${binary}
+		fowners root:vboxusers ${path}/${binary}
+		fperms ${perms} ${path}/${binary}
+	}
+
+	# Create configuration files
+	insinto /etc/vbox
+	newins "${FILESDIR}/${MY_PN}-4-config" vbox.cfg
+
+	# Set the correct libdir
+	sed \
+		-e "s@MY_LIBDIR@$(get_libdir)@" \
+		-i "${ED}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
+
+	# Install the wrapper script
+	exeinto ${vbox_inst_path}
+	newexe "${FILESDIR}/${MY_PN}-ose-6-wrapper" "VBox"
+	fowners root:vboxusers ${vbox_inst_path}/VBox
+	fperms 0750 ${vbox_inst_path}/VBox
+
+	# Install binaries and libraries
+	insinto ${vbox_inst_path}
+	doins -r components
+
+	for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,VMMPreload,XPCOMIPCD} \
+		vboximg-mount vbox-img *so *r0; do
+		vbox_inst ${each}
+	done
+
+	for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
+		vbox_inst ${each} 0750
+	done
+
+	# Install EFI Firmware files (bug #320757)
+	for each in VBoxEFI{32,64}.fd ; do
+		vbox_inst ${each} 0644
+	done
+
+	# VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
+	# VBoxXPCOMIPCD (bug #524202)
+	for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
+		pax-mark -m "${ED}"${vbox_inst_path}/${each}
+	done
+
+	# Symlink binaries to the shipped wrapper
+	for each in vbox{autostart,balloonctrl,bugreport,headless,manage} \
+		VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do
+			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+	done
+	dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount
+	dosym ${vbox_inst_path}/vbox-img /usr/bin/vbox-img
+
+	if use pam; then
+		# VRDPAuth only works with this (bug #351949)
+		dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
+	fi
+
+	# set an env-variable for 3rd party tools
+	echo "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
+	# environment variables used during SDK binding installation
+	echo "VBOX_SDK_PATH=${vbox_inst_path}/sdk" >> "${T}/90virtualbox"
+	echo "VBOX_INSTALL_PATH=${vbox_inst_path}" >> "${T}/90virtualbox"
+	doenvd "${T}/90virtualbox"
+
+	if use sdl; then
+		vbox_inst VBoxSDL 0750
+		pax-mark -m "${ED}"${vbox_inst_path}/VBoxSDL
+
+		for each in vboxsdl VBoxSDL ; do
+			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+		done
+	fi
+
+	if use gui; then
+		vbox_inst VirtualBox
+		vbox_inst VirtualBoxVM 0750
+		for each in VirtualBox{,VM} ; do
+			pax-mark -m "${ED}"${vbox_inst_path}/${each}
+		done
+
+		if use opengl; then
+			vbox_inst VBoxTestOGL
+			pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
+		fi
+
+		for each in virtualbox{,vm} VirtualBox{,VM} ; do
+			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+		done
+
+		insinto /usr/share/${PN}
+		doins -r nls
+		doins -r UnattendedTemplates
+
+		newmenu ${MY_PN}.desktop ${PN}.desktop
+
+		pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
+		for size in 16 32 48 64 128 ; do
+			newicon -s ${size} ${MY_PN}-${size}px.png ${PN}.png
+		done
+		newicon ${MY_PN}-48px.png ${PN}.png
+		newicon -s scalable ${MY_PN}.svg ${PN}.png
+		popd &>/dev/null || die
+		pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
+		for size in 16 24 32 48 64 72 96 128 256 512 ; do
+			for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
+				icofile="${MY_PN}-${ico}-${size}px.png"
+				if [[ -f "${icofile}" ]]; then
+					newicon -s ${size} ${icofile} ${MY_PN}-${ico}.png
+				fi
+			done
+		done
+		popd &>/dev/null || die
+	fi
+
+	if use lvm; then
+		vbox_inst VBoxVolInfo 0750
+		dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
+	fi
+
+	if use sdk; then
+		insinto ${vbox_inst_path}
+		doins -r sdk
+
+		if use java; then
+			java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
+			java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
+		fi
+	fi
+
+	if use udev; then
+		local udevdir="$(get_udevdir)"
+		local udev_file="VBoxCreateUSBNode.sh"
+		local rules_file="10-virtualbox.rules"
+
+		insinto ${udevdir}
+		doins ${udev_file}
+		fowners root:vboxusers ${udevdir}/${udev_file}
+		fperms 0750 ${udevdir}/${udev_file}
+
+		insinto ${udevdir}/rules.d
+		sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \
+			> "${T}"/${rules_file} || die
+		doins "${T}"/${rules_file}
+	fi
+
+	if use vboxwebsrv; then
+		vbox_inst vboxwebsrv
+		dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
+		newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
+		newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
+	fi
+
+	# Remove dead symlinks (bug #715338)
+	find "${ED}"/usr/$(get_libdir)/${MY_PN} -xtype l -delete || die
+
+	# Fix version string in extensions or else they don't get accepted
+	# by the virtualbox host process (see bug #438930)
+	find ExtensionPacks -type f -name "ExtPack.xml" -exec sed -i '/Version/s@_Gentoo@@' {} \+ || die
+
+	local extensions_dir="${vbox_inst_path}/ExtensionPacks"
+
+	if use vnc; then
+		insinto ${extensions_dir}
+		doins -r ExtensionPacks/VNC
+	fi
+
+	if use dtrace; then
+		insinto ${extensions_dir}
+		doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
+	fi
+
+	if use doc; then
+		dodoc UserManual.pdf UserManual.q{ch,hc}
+		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
+	elif use gui; then
+		dodoc "${WORKDIR}"/${MY_PN}-help-${ORIGIN_PV}/UserManual.q{ch,hc}
+		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
+	fi
+	dodoc ${PATCHES_DIR}/README.*
+
+	if use python; then
+		local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.so"
+		if [[ ! -x "${python_path_ext}" ]]; then
+			eerror "Couldn't find ${python_path_ext}! Bindings were requested with USE=python"
+			eerror "but none were installed. This may happen if support for a Python target"
+			eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles."
+			die "Incomplete installation of Python bindings! File a bug with Gentoo!"
+		fi
+
+		# 378871
+		local installer_dir="${ED}/usr/$(get_libdir)/virtualbox/sdk/installer"
+		pushd "${installer_dir}" &> /dev/null || die
+		sed -e "s;%VBOX_INSTALL_PATH%;${vbox_inst_path};" \
+			-e "s;%VBOX_SDK_PATH%;${vbox_inst_path}/sdk;" \
+			-i vboxapi/__init__.py || die
+		# insert shebang, the files come without one
+		find vboxapi -name \*.py -exec sed -e "1 i\#! ${PYTHON}" -i {} \+ || die
+		python_domodule vboxapi
+		popd &> /dev/null || die
+		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}"/${MY_PN}-vboxusb_tmpfilesd virtualbox-vboxusb.conf
+}
+
+pkg_postinst() {
+	xdg_pkg_postinst
+
+	if use udev; then
+		udev_reload
+		udevadm trigger --subsystem-match=usb
+	fi
+
+	tmpfiles_process virtualbox-vboxusb.conf
+
+	if use gui; then
+		elog "To launch VirtualBox just type: \"virtualbox\"."
+	fi
+
+	elog "You must be in the vboxusers group to use VirtualBox."
+	elog ""
+	elog "The latest user manual is available for download at:"
+	elog "https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/UserManual.pdf"
+	elog ""
+
+	optfeature "Advanced networking setups" net-misc/bridge-utils sys-apps/usermode-utilities
+	optfeature "USB2, USB3, PXE boot, and VRDP support" app-emulation/virtualbox-extpack-oracle
+	optfeature "Guest additions ISO" app-emulation/virtualbox-additions
+
+	if ! use udev; then
+		ewarn "Without USE=udev, USB devices will likely not work in ${MY_PN}."
+	fi
+}
+
+pkg_postrm() {
+	xdg_pkg_postrm
+
+	use udev && udev_reload
+}


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/
@ 2024-05-15 16:34 Viorel Munteanu
  0 siblings, 0 replies; 24+ messages in thread
From: Viorel Munteanu @ 2024-05-15 16:34 UTC (permalink / raw
  To: gentoo-commits

commit:     5026db96492ac54f8223d6f27d5598a03387cc1f
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Wed May 15 16:31:29 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Wed May 15 16:34:40 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5026db96

app-emulation/virtualbox-kvm: add 7.0.18_pre20240515

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox-kvm/Manifest              |   1 +
 .../virtualbox-kvm-7.0.18_pre20240515.ebuild       | 768 +++++++++++++++++++++
 2 files changed, 769 insertions(+)

diff --git a/app-emulation/virtualbox-kvm/Manifest b/app-emulation/virtualbox-kvm/Manifest
index 924a057190f7..b23b9295abd0 100644
--- a/app-emulation/virtualbox-kvm/Manifest
+++ b/app-emulation/virtualbox-kvm/Manifest
@@ -7,5 +7,6 @@ DIST virtualbox-help-7.0.18.tar.xz 3948116 BLAKE2B 5715a7e609297387b5fccce0951c6
 DIST virtualbox-kvm-7.0.14_pre20240325.tar.gz 134926 BLAKE2B 3e707b272219b2c5703d91d1f6a2f0a6c54fe29eeb6e91e5830949f7260e5b409e3425c38daea568725cb7fd10ddee234af6b72d747206e0a98ac1e33a10028c SHA512 e30291e1d7e2649057a9b38ea907f22f62b0367f33d88af10fdaaa49333890be2b719626103f9800836a3833368a018f5fc63a46577dd1d83178d7406bf8c494
 DIST virtualbox-kvm-7.0.14_pre20240502.tar.gz 141218 BLAKE2B fd78db709a37fd5239e52a71a5690073631c9376a0a2d6ab9a885a5892ff272d432adeabf03c3317556a9d76cc6819cc5dcd44cd19bd18bd338bb1b84bda5dae SHA512 650bbe3a8c51d7373c25834be129888b624c2d99baebe4105c2a70b1a013cdb7527224778a78f6901b91dea6e22129354ba9269bcd365b9956df5c5b8a77869b
 DIST virtualbox-kvm-7.0.18_pre20240502.tar.gz 141218 BLAKE2B fd78db709a37fd5239e52a71a5690073631c9376a0a2d6ab9a885a5892ff272d432adeabf03c3317556a9d76cc6819cc5dcd44cd19bd18bd338bb1b84bda5dae SHA512 650bbe3a8c51d7373c25834be129888b624c2d99baebe4105c2a70b1a013cdb7527224778a78f6901b91dea6e22129354ba9269bcd365b9956df5c5b8a77869b
+DIST virtualbox-kvm-7.0.18_pre20240515.tar.gz 114604 BLAKE2B 6db426693022c09bce2d562ee2b8f5ef83eec45b2481e45bc62fe1993b5cd93d83c26c248427515a3f7bd5c3e244d79b2b03bfafd7eaf6256796e3384f1c06d9 SHA512 63e07ce15330714508848b489361650b74970c97e964beef7d4ff5f23c2ad53d3f37860c5297ceae4dfc9d198df94d9531882bb1e870e34ec69494882a4db882
 DIST virtualbox-patches-7.0.14.tar.bz2 6937 BLAKE2B da5f18efbba2a8f4701b3d29dc00784e4e80e18a18b029e5dce8c142eb4dc97637069bfc5081422064a7dc59dfacf503ebbdc3421caa96430dc53fa72988aa20 SHA512 57cc34b92e4626de5c445e34ae025da7ec0d752a60618c619a55c28bf7d6b1cc9dc81ea059b949b0f3e625568207e8084f9462faf487ca0daf2794e7f1feac36
 DIST virtualbox-patches-7.0.16.tar.bz2 6808 BLAKE2B d15fa2ca306375142c3e25d4759d2790b2bb9eb69e333a8773ad500b29dd127b401943abf59ca59d01858a3ed5551fb3a6c93c4c893c8de971a714ce5306d577 SHA512 a488cbc6660fe8637c44cd79d87156609af089988239a7e76fea8a3c7e6319512c574bef2e942b354b14ce671a8e75ab8b2160abf7c40963795ee8a545ecd992

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.18_pre20240515.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.18_pre20240515.ebuild
new file mode 100644
index 000000000000..2b901786ab78
--- /dev/null
+++ b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.18_pre20240515.ebuild
@@ -0,0 +1,768 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# To add a new Python here:
+# 1. Patch src/libs/xpcom18a4/python/Makefile.kmk (copy the previous impl's logic)
+#    Do NOT skip this part. It'll end up silently not-building the Python extension
+#    or otherwise misbehaving if you do.
+#
+# 2. Then update PYTHON_COMPAT & set PYTHON_SINGLE_TARGET for testing w/ USE=python.
+#
+#  May need to look at other distros (e.g. Arch Linux) to find patches for newer
+#  Python versions as upstream tends to lag. Upstream may have patches on their
+#  trunk branch but not release branch.
+#
+#  See bug #785835, bug #856121.
+PYTHON_COMPAT=( python3_{10..11} )
+
+inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \
+	python-single-r1 tmpfiles toolchain-funcs udev xdg
+
+PATCHES_PV="7.0.16"
+ORIGIN_PN="VirtualBox"
+ORIGIN_PV=${PATCHES_PV}
+
+MY_PN=virtualbox
+MY_PV=${PV#*_pre}
+
+PATCHES_DIR="${WORKDIR}"/${PN}-${MY_PV}
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/ https://github.com/cyberus-technology/virtualbox-kvm"
+SRC_URI="https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2"
+if [[ ${PV} == *9999* ]]; then
+	inherit git-r3
+
+	ORIGIN_PV=${PATCHES_PV}
+	EGIT_REPO_URI="https://github.com/cyberus-technology/virtualbox-kvm"
+else
+	ORIGIN_PV=${PV%_pre*}
+	PATCHES_DIR="${WORKDIR}"/${PN}-dev-${MY_PV}
+	SRC_URI+=" https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz"
+fi
+MY_P=${ORIGIN_PN}-${ORIGIN_PV}
+SRC_URI+="
+	https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/${MY_P}.tar.bz2
+	gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${MY_PN}/${MY_PN}-help-${ORIGIN_PV}.tar.xz ) )
+"
+S="${WORKDIR}/${ORIGIN_PN}-${ORIGIN_PV}"
+
+LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
+SLOT="0"
+IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde vnc"
+
+unset WATCOM #856769
+
+COMMON_DEPEND="
+	${PYTHON_DEPS}
+	acct-group/vboxusers
+	dev-libs/libtpms
+	dev-libs/libxml2
+	dev-libs/openssl:0=
+	media-libs/libpng:0=
+	media-libs/libvpx:0=
+	net-misc/curl
+	sys-libs/zlib
+	dbus? ( sys-apps/dbus )
+	gui? (
+		dev-qt/qtcore:5
+		dev-qt/qtdbus:5
+		dev-qt/qtgui:5
+		dev-qt/qthelp:5
+		dev-qt/qtprintsupport:5
+		dev-qt/qtwidgets:5
+		dev-qt/qtx11extras:5
+		dev-qt/qtxml:5
+		x11-libs/libX11
+		x11-libs/libXt
+		opengl? ( dev-qt/qtopengl:5 )
+	)
+	lvm? ( sys-fs/lvm2 )
+	opengl? (
+		media-libs/libglvnd[X]
+		media-libs/vulkan-loader
+		x11-libs/libX11
+		x11-libs/libXt
+	)
+	pam? ( sys-libs/pam )
+	sdl? (
+		media-libs/libsdl2[X,video]
+		x11-libs/libX11
+		x11-libs/libXcursor
+		x11-libs/libXt
+	)
+	vboxwebsrv? ( net-libs/gsoap[-gnutls(-),debug?] )
+	vde? ( net-misc/vde )
+	vnc? ( >=net-libs/libvncserver-0.9.9 )
+"
+# We're stuck on JDK (and JRE, I guess?) 1.8 because of need for wsimport
+# with USE="vboxwebsrv java". Note that we have to put things in DEPEND,
+# not (only, anyway) BDEPEND, as the eclass magic to set the environment variables
+# based on *DEPEND doesn't work for BDEPEND at least right now.
+#
+# There's a comment in Config.kmk about it
+# ("With Java 11 wsimport was removed, usually part of a separate install now.")
+# but it needs more investigation.
+#
+# See bug #878299 to track this issue.
+DEPEND="
+	${COMMON_DEPEND}
+	>=dev-libs/libxslt-1.1.19
+	virtual/libcrypt:=
+	alsa? ( >=media-libs/alsa-lib-1.0.13 )
+	gui? (
+		x11-base/xorg-proto
+		x11-libs/libxcb:=
+		x11-libs/libXcursor
+		x11-libs/libXext
+		x11-libs/libXinerama
+		x11-libs/libXmu
+		x11-libs/libXrandr
+	)
+	java? ( virtual/jdk:1.8 )
+	opengl? (
+		x11-base/xorg-proto
+		x11-libs/libXcursor
+		x11-libs/libXinerama
+		x11-libs/libXmu
+		x11-libs/libXrandr
+		virtual/glu
+	)
+	sdl? ( x11-libs/libXinerama )
+	pulseaudio? ( media-libs/libpulse )
+	udev? ( >=virtual/udev-171 )
+"
+RDEPEND="
+	!app-emulation/virtualbox
+	${COMMON_DEPEND}
+	gui? ( x11-libs/libxcb:= )
+	java? ( virtual/jre:1.8 )
+"
+BDEPEND="
+	${PYTHON_DEPS}
+	>=app-arch/tar-1.34-r2
+	>=dev-lang/yasm-0.6.2
+	dev-libs/libIDL
+	dev-util/glslang
+	>=dev-build/kbuild-0.1.9998.3592
+	sys-apps/which
+	sys-devel/bin86
+	sys-libs/libcap
+	sys-power/iasl
+	virtual/pkgconfig
+	doc? (
+		app-text/docbook-sgml-dtd:4.4
+		app-text/docbook-xsl-ns-stylesheets
+		dev-texlive/texlive-basic
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-latexrecommended
+		dev-texlive/texlive-latexextra
+		dev-texlive/texlive-fontsrecommended
+		dev-texlive/texlive-fontsextra
+		dev-qt/qthelp:5
+	)
+	gui? ( dev-qt/linguist-tools:5 )
+	nls? ( dev-qt/linguist-tools:5 )
+	java? ( virtual/jdk:1.8 )
+"
+
+QA_FLAGS_IGNORED="
+	usr/lib64/virtualbox/VBoxDDR0.r0
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
+"
+
+QA_TEXTRELS="
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
+"
+
+QA_EXECSTACK="
+	usr/lib64/virtualbox/iPxeBaseBin
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/VBoxDDR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
+"
+
+QA_WX_LOAD="
+	usr/lib64/virtualbox/iPxeBaseBin
+"
+
+QA_PRESTRIPPED="
+	usr/lib64/virtualbox/VMMR0.r0
+	usr/lib64/virtualbox/VBoxDDR0.r0
+	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
+"
+
+REQUIRED_USE="
+	java? ( sdk )
+	python? ( sdk )
+	vboxwebsrv? ( java )
+	${PYTHON_REQUIRED_USE}
+"
+
+PATCHES=(
+	# Downloaded patchset
+	"${WORKDIR}"/virtualbox-patches-${PATCHES_PV}/patches
+	"${PATCHES_DIR}"/patches
+)
+
+pkg_pretend() {
+	if ! use gui; then
+		einfo "No USE=\"gui\" selected, this build will not include any Qt frontend."
+	fi
+
+	if ! use opengl; then
+		einfo "No USE=\"opengl\" selected, this build will lack"
+		einfo "the OpenGL feature."
+	fi
+	if ! use python; then
+		einfo "You have disabled the \"python\" USE flag. This will only"
+		einfo "disable the python bindings being installed."
+	fi
+	if ! use nls && use gui; then
+		einfo "USE=\"gui\" also selects USE=\"nls\".  This build"
+		einfo "will have NLS support."
+	fi
+
+	# 749273
+	local d=${ROOT}
+	for i in usr "$(get_libdir)"; do
+		d="${d}/$i"
+		if [[ "$(stat -L -c "%g %u" "${d}")" != "0 0" ]]; then
+			die "${d} should be owned by root, VirtualBox will not start otherwise"
+		fi
+	done
+}
+
+pkg_setup() {
+	java-pkg-opt-2_pkg_setup
+	python-single-r1_pkg_setup
+}
+
+src_unpack() {
+	[[ ${PV} == *9999* ]] && git-r3_src_unpack
+	default
+}
+
+src_prepare() {
+	default
+
+	# Only add nopie patch when we're on hardened
+	if gcc-specs-pie; then
+		eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch
+	fi
+
+	# Remove shipped binaries (kBuild, yasm) and tools, see bug #232775
+	rm -r kBuild/bin || die
+	# Remove everything in tools except kBuildUnits
+	find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || die
+
+	# Disable things unused or split into separate ebuilds
+	sed -e "s@MY_LIBDIR@$(get_libdir)@" \
+		"${FILESDIR}"/${MY_PN}-5-localconfig > LocalConfig.kmk || die
+
+	if ! use pch; then
+		# bug #753323
+		printf '\n%s\n' "VBOX_WITHOUT_PRECOMPILED_HEADERS=1" \
+			>> LocalConfig.kmk || die
+	fi
+
+	# bug #916002, #488176
+	tc-ld-force-bfd
+
+	# Respect LDFLAGS
+	sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
+		-i Config.kmk src/libs/xpcom18a4/Config.kmk || die
+
+	# Do not use hard-coded ld (related to bug #488176)
+	sed -e '/QUIET)ld /s@ld @$(LD) @' \
+		-i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
+
+	# Use PAM only when pam USE flag is enbaled (bug #376531)
+	if ! use pam; then
+		einfo "Disabling PAM removes the possibility to use the VRDP features."
+		sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
+		sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
+			src/VBox/HostServices/Makefile.kmk || die
+		echo -e "\nIPRT_WITHOUT_PAM=1" >> LocalConfig.kmk || die
+	fi
+
+	# add correct java path
+	if use java; then
+		sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
+			-i "${S}"/Config.kmk || die
+		java-pkg-opt-2_src_prepare
+	fi
+
+	#856811 #864274
+	# cannot filter out only one flag, some combinations of these flags produce buggy executables
+	for i in abm avx avx2 bmi bmi2 fma fma4 popcnt; do
+		append-cflags $(test-flags-CC -mno-$i)
+		append-cxxflags $(test-flags-CXX -mno-$i)
+	done
+
+	# bug #908814
+	filter-lto
+
+	# bug #843437
+	cat >> LocalConfig.kmk <<-EOF || die
+		CXXFLAGS=${CXXFLAGS}
+		CFLAGS=${CFLAGS}
+	EOF
+
+	if use sdl; then
+		sed -i 's/sdl-config/sdl2-config/' configure || die
+		echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
+	fi
+
+	#443830
+	echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die
+
+	if tc-is-clang; then
+		# clang assembler chokes on comments starting with /
+		sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
+
+		# clang does not support this extension
+		eapply "${FILESDIR}"/${MY_PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
+	fi
+
+	# fix doc generation
+	echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die
+	# replace xhtml names with numeric equivalents
+	find doc/manual -name \*.xml -exec sed -i \
+		-e 's/&nbsp;/\&#160;/g' \
+		-e 's/&ndash;/\&#8211;/g' \
+		-e 's/&larr;/\&#8592;/g' \
+		-e 's/&rarr;/\&#8594;/g' \
+		-e 's/&harr;/\&#8596;/g' {} \+ || die
+
+	# fix help path #891879
+	echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die
+
+	# 489208
+	# Cannot patch the whole text, many translations.  Use sed instead to replace the command
+	find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \
+		's/&apos;[^&]*\(vboxdrv setup\|vboxconfig\)&apos;/\&apos;emerge -1 virtualbox-modules\&apos;/' {} \+ || die
+	sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \
+		src/VBox/Frontends/VirtualBox/src/main.cpp \
+		src/VBox/VMM/VMMR3/VM.cpp || die
+
+	# 890561
+	echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
+
+	if ! use nls && ! use gui; then
+		cat >> LocalConfig.kmk <<-EOF || die
+			VBOX_WITH_NLS :=
+			VBOX_WITH_MAIN_NLS :=
+			VBOX_WITH_PUEL_NLS :=
+			VBOX_WITH_VBOXMANAGE_NLS :=
+		EOF
+	fi
+}
+
+src_configure() {
+	tc-export AR CC CXX LD RANLIB
+	export HOST_CC="$(tc-getBUILD_CC)"
+
+	local myconf=(
+		--with-gcc="$(tc-getCC)"
+		--with-g++="$(tc-getCXX)"
+
+		--disable-kmods
+		--with-kvm
+
+		# this is required for kvm to work.
+		# also this prohibits installation with suid.
+		--disable-hardening
+
+		$(usev !alsa --disable-alsa)
+		$(usev !dbus --disable-dbus)
+		$(usev debug --build-debug)
+		$(usev !doc --disable-docs)
+		$(usev !java --disable-java)
+		$(usev !lvm --disable-devmapper)
+		$(usev !pulseaudio --disable-pulse)
+		$(usev !python --disable-python)
+		$(usev vboxwebsrv --enable-webservice)
+		$(usev vde --enable-vde)
+		$(usev vnc --enable-vnc)
+	)
+
+	if use gui || use sdl || use opengl; then
+		myconf+=(
+			$(usev !opengl --disable-opengl)
+			$(usev !gui --disable-qt)
+			$(usev !sdl --disable-sdl)
+		)
+	else
+		myconf+=(
+			--build-headless
+		)
+	fi
+
+	if use amd64 && ! has_multilib_profile; then
+		myconf+=( --disable-vmmraw )
+	fi
+
+	# not an autoconf script
+	edo ./configure "${myconf[@]}"
+
+	# Force usage of chosen Python implementation
+	# bug #856121, bug #785835
+	sed -i \
+		-e '/VBOX_WITH_PYTHON.*=/d' \
+		-e '/VBOX_PATH_PYTHON_INC.*=/d' \
+		-e '/VBOX_LIB_PYTHON.*=/d' \
+		AutoConfig.kmk || die
+
+	cat >> AutoConfig.kmk <<-EOF || die
+		VBOX_WITH_PYTHON=$(usev python 1)
+		VBOX_PATH_PYTHON_INC=$(python_get_includedir)
+		VBOX_LIB_PYTHON=$(python_get_library_path)
+	EOF
+
+	if use python; then
+		local mangled_python="${EPYTHON#python}"
+		mangled_python="${mangled_python/.}"
+
+		# Stub out the script which defines what the Makefile ends up
+		# building for. gen_python_deps.py gets called by the Makefile
+		# with some args and it spits out a bunch of paths for a hardcoded
+		# list of Pythons. We just override it with what we're actually using.
+		# This minimises the amount of patching we have to do for new Pythons.
+		cat > src/libs/xpcom18a4/python/gen_python_deps.py <<-EOF || die
+			print("VBOX_PYTHON${mangled_python}_INC=$(python_get_includedir)")
+			print("VBOX_PYTHON${mangled_python}_LIB=$(python_get_library_path)")
+			print("VBOX_PYTHONDEF_INC=$(python_get_includedir)")
+			print("VBOX_PYTHONDEF_LIB=$(python_get_library_path)")
+		EOF
+
+		chmod +x src/libs/xpcom18a4/python/gen_python_deps.py || die
+	fi
+}
+
+src_compile() {
+	source ./env.sh || die
+
+	# Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
+	MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
+	MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
+	MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
+
+	local myemakeargs=(
+		VBOX_BUILD_PUBLISHER=_Gentoo
+		VBOX_WITH_VBOXIMGMOUNT=1
+
+		KBUILD_VERBOSE=2
+
+		AS="$(tc-getCC)"
+		CC="$(tc-getCC)"
+		CXX="$(tc-getCXX)"
+
+		TOOL_GCC3_CC="$(tc-getCC)"
+		TOOL_GCC3_LD="$(tc-getCC)"
+		TOOL_GCC3_AS="$(tc-getCC)"
+		TOOL_GCC3_AR="$(tc-getAR)"
+		TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
+
+		TOOL_GXX3_CC="$(tc-getCC)"
+		TOOL_GXX3_CXX="$(tc-getCXX)"
+		TOOL_GXX3_LD="$(tc-getCXX)"
+		TOOL_GXX3_AS="$(tc-getCXX)"
+		TOOL_GXX3_AR="$(tc-getAR)"
+		TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
+
+		TOOL_GCC3_CFLAGS="${CFLAGS}"
+		TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
+		VBOX_GCC_OPT="${CXXFLAGS}"
+		VBOX_NM="$(tc-getNM)"
+
+		TOOL_YASM_AS=yasm
+	)
+
+	if use amd64 && has_multilib_profile; then
+		myemakeargs+=(
+			CC32="$(tc-getCC) -m32"
+			CXX32="$(tc-getCXX) -m32"
+
+			TOOL_GCC32_CC="$(tc-getCC) -m32"
+			TOOL_GCC32_CXX="$(tc-getCXX) -m32"
+			TOOL_GCC32_LD="$(tc-getCC) -m32"
+			TOOL_GCC32_AS="$(tc-getCC) -m32"
+			TOOL_GCC32_AR="$(tc-getAR)"
+			TOOL_GCC32_OBJCOPY="$(tc-getOBJCOPY)"
+
+			TOOL_GXX32_CC="$(tc-getCC) -m32"
+			TOOL_GXX32_CXX="$(tc-getCXX) -m32"
+			TOOL_GXX32_LD="$(tc-getCXX) -m32"
+			TOOL_GXX32_AS="$(tc-getCXX) -m32"
+			TOOL_GXX32_AR="$(tc-getAR)"
+			TOOL_GXX32_OBJCOPY="$(tc-getOBJCOPY)"
+		)
+	fi
+
+	MAKE="kmk" emake "${myemakeargs[@]}" all
+}
+
+src_install() {
+	cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
+
+	local vbox_inst_path="/usr/$(get_libdir)/${MY_PN}" each size ico icofile
+
+	vbox_inst() {
+		local binary="${1}"
+		local perms="${2:-0750}"
+		local path="${3:-${vbox_inst_path}}"
+
+		[[ -n "${binary}" ]] || die "vbox_inst: No binary given!"
+		[[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
+
+		insinto ${path}
+		doins ${binary}
+		fowners root:vboxusers ${path}/${binary}
+		fperms ${perms} ${path}/${binary}
+	}
+
+	# Create configuration files
+	insinto /etc/vbox
+	newins "${FILESDIR}/${MY_PN}-4-config" vbox.cfg
+
+	# Set the correct libdir
+	sed \
+		-e "s@MY_LIBDIR@$(get_libdir)@" \
+		-i "${ED}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
+
+	# Install the wrapper script
+	exeinto ${vbox_inst_path}
+	newexe "${FILESDIR}/${MY_PN}-ose-6-wrapper" "VBox"
+	fowners root:vboxusers ${vbox_inst_path}/VBox
+	fperms 0750 ${vbox_inst_path}/VBox
+
+	# Install binaries and libraries
+	insinto ${vbox_inst_path}
+	doins -r components
+
+	for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,VMMPreload,XPCOMIPCD} \
+		vboximg-mount vbox-img *so *r0; do
+		vbox_inst ${each}
+	done
+
+	for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
+		vbox_inst ${each} 0750
+	done
+
+	# Install EFI Firmware files (bug #320757)
+	for each in VBoxEFI{32,64}.fd ; do
+		vbox_inst ${each} 0644
+	done
+
+	# VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
+	# VBoxXPCOMIPCD (bug #524202)
+	for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
+		pax-mark -m "${ED}"${vbox_inst_path}/${each}
+	done
+
+	# Symlink binaries to the shipped wrapper
+	for each in vbox{autostart,balloonctrl,bugreport,headless,manage} \
+		VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do
+			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+	done
+	dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount
+	dosym ${vbox_inst_path}/vbox-img /usr/bin/vbox-img
+
+	if use pam; then
+		# VRDPAuth only works with this (bug #351949)
+		dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
+	fi
+
+	# set an env-variable for 3rd party tools
+	echo "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
+	# environment variables used during SDK binding installation
+	echo "VBOX_SDK_PATH=${vbox_inst_path}/sdk" >> "${T}/90virtualbox"
+	echo "VBOX_INSTALL_PATH=${vbox_inst_path}" >> "${T}/90virtualbox"
+	doenvd "${T}/90virtualbox"
+
+	if use sdl; then
+		vbox_inst VBoxSDL 0750
+		pax-mark -m "${ED}"${vbox_inst_path}/VBoxSDL
+
+		for each in vboxsdl VBoxSDL ; do
+			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+		done
+	fi
+
+	if use gui; then
+		vbox_inst VirtualBox
+		vbox_inst VirtualBoxVM 0750
+		for each in VirtualBox{,VM} ; do
+			pax-mark -m "${ED}"${vbox_inst_path}/${each}
+		done
+
+		if use opengl; then
+			vbox_inst VBoxTestOGL
+			pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
+		fi
+
+		for each in virtualbox{,vm} VirtualBox{,VM} ; do
+			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+		done
+
+		insinto /usr/share/${PN}
+		doins -r nls
+		doins -r UnattendedTemplates
+
+		newmenu ${MY_PN}.desktop ${PN}.desktop
+
+		pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
+		for size in 16 32 48 64 128 ; do
+			newicon -s ${size} ${MY_PN}-${size}px.png ${PN}.png
+		done
+		newicon ${MY_PN}-48px.png ${PN}.png
+		newicon -s scalable ${MY_PN}.svg ${PN}.png
+		popd &>/dev/null || die
+		pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
+		for size in 16 24 32 48 64 72 96 128 256 512 ; do
+			for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
+				icofile="${MY_PN}-${ico}-${size}px.png"
+				if [[ -f "${icofile}" ]]; then
+					newicon -s ${size} ${icofile} ${MY_PN}-${ico}.png
+				fi
+			done
+		done
+		popd &>/dev/null || die
+	fi
+
+	if use lvm; then
+		vbox_inst VBoxVolInfo 0750
+		dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
+	fi
+
+	if use sdk; then
+		insinto ${vbox_inst_path}
+		doins -r sdk
+
+		if use java; then
+			java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
+			java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
+		fi
+	fi
+
+	if use udev; then
+		local udevdir="$(get_udevdir)"
+		local udev_file="VBoxCreateUSBNode.sh"
+		local rules_file="10-virtualbox.rules"
+
+		insinto ${udevdir}
+		doins ${udev_file}
+		fowners root:vboxusers ${udevdir}/${udev_file}
+		fperms 0750 ${udevdir}/${udev_file}
+
+		insinto ${udevdir}/rules.d
+		sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \
+			> "${T}"/${rules_file} || die
+		doins "${T}"/${rules_file}
+	fi
+
+	if use vboxwebsrv; then
+		vbox_inst vboxwebsrv
+		dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
+		newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
+		newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
+	fi
+
+	# Remove dead symlinks (bug #715338)
+	find "${ED}"/usr/$(get_libdir)/${MY_PN} -xtype l -delete || die
+
+	# Fix version string in extensions or else they don't get accepted
+	# by the virtualbox host process (see bug #438930)
+	find ExtensionPacks -type f -name "ExtPack.xml" -exec sed -i '/Version/s@_Gentoo@@' {} \+ || die
+
+	local extensions_dir="${vbox_inst_path}/ExtensionPacks"
+
+	if use vnc; then
+		insinto ${extensions_dir}
+		doins -r ExtensionPacks/VNC
+	fi
+
+	if use dtrace; then
+		insinto ${extensions_dir}
+		doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
+	fi
+
+	if use doc; then
+		dodoc UserManual.pdf UserManual.q{ch,hc}
+		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
+	elif use gui; then
+		dodoc "${WORKDIR}"/${MY_PN}-help-${ORIGIN_PV}/UserManual.q{ch,hc}
+		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
+	fi
+	dodoc ${PATCHES_DIR}/README.*
+
+	if use python; then
+		local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.so"
+		if [[ ! -x "${python_path_ext}" ]]; then
+			eerror "Couldn't find ${python_path_ext}! Bindings were requested with USE=python"
+			eerror "but none were installed. This may happen if support for a Python target"
+			eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles."
+			die "Incomplete installation of Python bindings! File a bug with Gentoo!"
+		fi
+
+		# 378871
+		local installer_dir="${ED}/usr/$(get_libdir)/virtualbox/sdk/installer"
+		pushd "${installer_dir}" &> /dev/null || die
+		sed -e "s;%VBOX_INSTALL_PATH%;${vbox_inst_path};" \
+			-e "s;%VBOX_SDK_PATH%;${vbox_inst_path}/sdk;" \
+			-i vboxapi/__init__.py || die
+		# insert shebang, the files come without one
+		find vboxapi -name \*.py -exec sed -e "1 i\#! ${PYTHON}" -i {} \+ || die
+		python_domodule vboxapi
+		popd &> /dev/null || die
+		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}"/${MY_PN}-vboxusb_tmpfilesd virtualbox-vboxusb.conf
+}
+
+pkg_postinst() {
+	xdg_pkg_postinst
+
+	if use udev; then
+		udev_reload
+		udevadm trigger --subsystem-match=usb
+	fi
+
+	tmpfiles_process virtualbox-vboxusb.conf
+
+	if use gui; then
+		elog "To launch VirtualBox just type: \"virtualbox\"."
+	fi
+
+	elog "You must be in the vboxusers group to use VirtualBox."
+	elog ""
+	elog "The latest user manual is available for download at:"
+	elog "https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/UserManual.pdf"
+	elog ""
+
+	optfeature "Advanced networking setups" net-misc/bridge-utils sys-apps/usermode-utilities
+	optfeature "USB2, USB3, PXE boot, and VRDP support" app-emulation/virtualbox-extpack-oracle
+	optfeature "Guest additions ISO" app-emulation/virtualbox-additions
+
+	if ! use udev; then
+		ewarn "Without USE=udev, USB devices will likely not work in ${MY_PN}."
+	fi
+}
+
+pkg_postrm() {
+	xdg_pkg_postrm
+
+	use udev && udev_reload
+}


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/
@ 2024-05-15 16:34 Viorel Munteanu
  0 siblings, 0 replies; 24+ messages in thread
From: Viorel Munteanu @ 2024-05-15 16:34 UTC (permalink / raw
  To: gentoo-commits

commit:     3e806533a32f745425632695c8ca57bf5f142ec1
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Wed May 15 16:33:58 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Wed May 15 16:34:40 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e806533

app-emulation/virtualbox-kvm: drop 7.0.14_pre20240325

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox-kvm/Manifest              |   1 -
 .../virtualbox-kvm-7.0.14_pre20240325.ebuild       | 768 ---------------------
 2 files changed, 769 deletions(-)

diff --git a/app-emulation/virtualbox-kvm/Manifest b/app-emulation/virtualbox-kvm/Manifest
index f2c77bebe9f8..36f960878a6f 100644
--- a/app-emulation/virtualbox-kvm/Manifest
+++ b/app-emulation/virtualbox-kvm/Manifest
@@ -4,7 +4,6 @@ DIST VirtualBox-7.0.18.tar.bz2 173295159 BLAKE2B 1371d54d648aafbad3814d55d495836
 DIST virtualbox-help-7.0.14.tar.xz 3944832 BLAKE2B 95079e4da8c960c41cee799142779a6c2587e0e8af7956ca551cb5a4c0f36f313189dfe08afba83a0c32886866a7f9903b5e370008d6b3ce6283fb2288866b06 SHA512 e2f1acdd7577a93047e220300b1996d2855ddef20053c01294f8295fde0840645c41b75632d71dd2fc276219084fe4105fd057623f39375542358796425a2d03
 DIST virtualbox-help-7.0.16.tar.xz 3948696 BLAKE2B 5c5937313ea0e5cb4764b8a61fd1587e88a4afc965ef00862c5a265a15253929d35e0635231b6be5656f26f600bc4b70a2fa2ebc0f33b35d35c184b57e5acef8 SHA512 b9baca57118a82e3489c8445f0988671f16f75de60cc2d929d5e3b0c4c9e3ceacd796a72a81bba88d69eb4b4559835a13775c18d7782ae7dbe8ad202e247db0c
 DIST virtualbox-help-7.0.18.tar.xz 3948116 BLAKE2B 5715a7e609297387b5fccce0951c62e5969fd68adeecb869712e69f5e90daef97384bd3ff3c39de40903a1fabe7ac6d2f8ecdbb40de16abe955d40e49b962eec SHA512 ec0f915b7221bc40d02f5f1675eb0defb5506b2f2bd96c063a96a9346e1c82428ccdda8b3adac43238c451ae185ac31af4a186da17ffe091469e14e696388b3a
-DIST virtualbox-kvm-7.0.14_pre20240325.tar.gz 134926 BLAKE2B 3e707b272219b2c5703d91d1f6a2f0a6c54fe29eeb6e91e5830949f7260e5b409e3425c38daea568725cb7fd10ddee234af6b72d747206e0a98ac1e33a10028c SHA512 e30291e1d7e2649057a9b38ea907f22f62b0367f33d88af10fdaaa49333890be2b719626103f9800836a3833368a018f5fc63a46577dd1d83178d7406bf8c494
 DIST virtualbox-kvm-7.0.14_pre20240502.tar.gz 141218 BLAKE2B fd78db709a37fd5239e52a71a5690073631c9376a0a2d6ab9a885a5892ff272d432adeabf03c3317556a9d76cc6819cc5dcd44cd19bd18bd338bb1b84bda5dae SHA512 650bbe3a8c51d7373c25834be129888b624c2d99baebe4105c2a70b1a013cdb7527224778a78f6901b91dea6e22129354ba9269bcd365b9956df5c5b8a77869b
 DIST virtualbox-kvm-7.0.18_pre20240515.tar.gz 114604 BLAKE2B 6db426693022c09bce2d562ee2b8f5ef83eec45b2481e45bc62fe1993b5cd93d83c26c248427515a3f7bd5c3e244d79b2b03bfafd7eaf6256796e3384f1c06d9 SHA512 63e07ce15330714508848b489361650b74970c97e964beef7d4ff5f23c2ad53d3f37860c5297ceae4dfc9d198df94d9531882bb1e870e34ec69494882a4db882
 DIST virtualbox-patches-7.0.14.tar.bz2 6937 BLAKE2B da5f18efbba2a8f4701b3d29dc00784e4e80e18a18b029e5dce8c142eb4dc97637069bfc5081422064a7dc59dfacf503ebbdc3421caa96430dc53fa72988aa20 SHA512 57cc34b92e4626de5c445e34ae025da7ec0d752a60618c619a55c28bf7d6b1cc9dc81ea059b949b0f3e625568207e8084f9462faf487ca0daf2794e7f1feac36

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240325.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240325.ebuild
deleted file mode 100644
index 34dd04078029..000000000000
--- a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240325.ebuild
+++ /dev/null
@@ -1,768 +0,0 @@
-# Copyright 2022-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# To add a new Python here:
-# 1. Patch src/libs/xpcom18a4/python/Makefile.kmk (copy the previous impl's logic)
-#    Do NOT skip this part. It'll end up silently not-building the Python extension
-#    or otherwise misbehaving if you do.
-#
-# 2. Then update PYTHON_COMPAT & set PYTHON_SINGLE_TARGET for testing w/ USE=python.
-#
-#  May need to look at other distros (e.g. Arch Linux) to find patches for newer
-#  Python versions as upstream tends to lag. Upstream may have patches on their
-#  trunk branch but not release branch.
-#
-#  See bug #785835, bug #856121.
-PYTHON_COMPAT=( python3_{10..11} )
-
-inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \
-	python-single-r1 tmpfiles toolchain-funcs udev xdg
-
-PATCHES_PV="7.0.14"
-ORIGIN_PN="VirtualBox"
-ORIGIN_PV=${PATCHES_PV}
-
-MY_PN=virtualbox
-MY_PV=${PV#*_pre}
-
-PATCHES_DIR="${WORKDIR}"/${PN}-${MY_PV}
-
-DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
-HOMEPAGE="https://www.virtualbox.org/ https://github.com/cyberus-technology/virtualbox-kvm"
-SRC_URI="https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2"
-if [[ ${PV} == *9999* ]]; then
-	inherit git-r3
-
-	ORIGIN_PV=${PATCHES_PV}
-	EGIT_REPO_URI="https://github.com/cyberus-technology/virtualbox-kvm"
-else
-	ORIGIN_PV=${PV%_pre*}
-	PATCHES_DIR="${WORKDIR}"/${PN}-dev-${MY_PV}
-	SRC_URI+=" https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz"
-fi
-MY_P=${ORIGIN_PN}-${ORIGIN_PV}
-SRC_URI+="
-	https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/${MY_P}.tar.bz2
-	gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${MY_PN}/${MY_PN}-help-${ORIGIN_PV}.tar.xz ) )
-"
-S="${WORKDIR}/${ORIGIN_PN}-${ORIGIN_PV}"
-
-LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
-SLOT="0"
-IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde vnc"
-
-unset WATCOM #856769
-
-COMMON_DEPEND="
-	${PYTHON_DEPS}
-	acct-group/vboxusers
-	dev-libs/libtpms
-	dev-libs/libxml2
-	dev-libs/openssl:0=
-	media-libs/libpng:0=
-	media-libs/libvpx:0=
-	net-misc/curl
-	sys-libs/zlib
-	dbus? ( sys-apps/dbus )
-	gui? (
-		dev-qt/qtcore:5
-		dev-qt/qtdbus:5
-		dev-qt/qtgui:5
-		dev-qt/qthelp:5
-		dev-qt/qtprintsupport:5
-		dev-qt/qtwidgets:5
-		dev-qt/qtx11extras:5
-		dev-qt/qtxml:5
-		x11-libs/libX11
-		x11-libs/libXt
-		opengl? ( dev-qt/qtopengl:5 )
-	)
-	lvm? ( sys-fs/lvm2 )
-	opengl? (
-		media-libs/libglvnd[X]
-		media-libs/vulkan-loader
-		x11-libs/libX11
-		x11-libs/libXt
-	)
-	pam? ( sys-libs/pam )
-	sdl? (
-		media-libs/libsdl2[X,video]
-		x11-libs/libX11
-		x11-libs/libXcursor
-		x11-libs/libXt
-	)
-	vboxwebsrv? ( net-libs/gsoap[-gnutls(-),debug?] )
-	vde? ( net-misc/vde )
-	vnc? ( >=net-libs/libvncserver-0.9.9 )
-"
-# We're stuck on JDK (and JRE, I guess?) 1.8 because of need for wsimport
-# with USE="vboxwebsrv java". Note that we have to put things in DEPEND,
-# not (only, anyway) BDEPEND, as the eclass magic to set the environment variables
-# based on *DEPEND doesn't work for BDEPEND at least right now.
-#
-# There's a comment in Config.kmk about it
-# ("With Java 11 wsimport was removed, usually part of a separate install now.")
-# but it needs more investigation.
-#
-# See bug #878299 to track this issue.
-DEPEND="
-	${COMMON_DEPEND}
-	>=dev-libs/libxslt-1.1.19
-	virtual/libcrypt:=
-	alsa? ( >=media-libs/alsa-lib-1.0.13 )
-	gui? (
-		x11-base/xorg-proto
-		x11-libs/libxcb:=
-		x11-libs/libXcursor
-		x11-libs/libXext
-		x11-libs/libXinerama
-		x11-libs/libXmu
-		x11-libs/libXrandr
-	)
-	java? ( virtual/jdk:1.8 )
-	opengl? (
-		x11-base/xorg-proto
-		x11-libs/libXcursor
-		x11-libs/libXinerama
-		x11-libs/libXmu
-		x11-libs/libXrandr
-		virtual/glu
-	)
-	sdl? ( x11-libs/libXinerama )
-	pulseaudio? ( media-libs/libpulse )
-	udev? ( >=virtual/udev-171 )
-"
-RDEPEND="
-	!app-emulation/virtualbox
-	${COMMON_DEPEND}
-	gui? ( x11-libs/libxcb:= )
-	java? ( virtual/jre:1.8 )
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	>=app-arch/tar-1.34-r2
-	>=dev-lang/yasm-0.6.2
-	dev-libs/libIDL
-	dev-util/glslang
-	>=dev-build/kbuild-0.1.9998.3592
-	sys-apps/which
-	sys-devel/bin86
-	sys-libs/libcap
-	sys-power/iasl
-	virtual/pkgconfig
-	doc? (
-		app-text/docbook-sgml-dtd:4.4
-		app-text/docbook-xsl-ns-stylesheets
-		dev-texlive/texlive-basic
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-latexrecommended
-		dev-texlive/texlive-latexextra
-		dev-texlive/texlive-fontsrecommended
-		dev-texlive/texlive-fontsextra
-		dev-qt/qthelp:5
-	)
-	gui? ( dev-qt/linguist-tools:5 )
-	nls? ( dev-qt/linguist-tools:5 )
-	java? ( virtual/jdk:1.8 )
-"
-
-QA_FLAGS_IGNORED="
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
-"
-
-QA_TEXTRELS="
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-"
-
-QA_EXECSTACK="
-	usr/lib64/virtualbox/iPxeBaseBin
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
-"
-
-QA_WX_LOAD="
-	usr/lib64/virtualbox/iPxeBaseBin
-"
-
-QA_PRESTRIPPED="
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-"
-
-REQUIRED_USE="
-	java? ( sdk )
-	python? ( sdk )
-	vboxwebsrv? ( java )
-	${PYTHON_REQUIRED_USE}
-"
-
-PATCHES=(
-	# Downloaded patchset
-	"${WORKDIR}"/virtualbox-patches-${PATCHES_PV}/patches
-	"${PATCHES_DIR}"/patches
-)
-
-pkg_pretend() {
-	if ! use gui; then
-		einfo "No USE=\"gui\" selected, this build will not include any Qt frontend."
-	fi
-
-	if ! use opengl; then
-		einfo "No USE=\"opengl\" selected, this build will lack"
-		einfo "the OpenGL feature."
-	fi
-	if ! use python; then
-		einfo "You have disabled the \"python\" USE flag. This will only"
-		einfo "disable the python bindings being installed."
-	fi
-	if ! use nls && use gui; then
-		einfo "USE=\"gui\" also selects USE=\"nls\".  This build"
-		einfo "will have NLS support."
-	fi
-
-	# 749273
-	local d=${ROOT}
-	for i in usr "$(get_libdir)"; do
-		d="${d}/$i"
-		if [[ "$(stat -L -c "%g %u" "${d}")" != "0 0" ]]; then
-			die "${d} should be owned by root, VirtualBox will not start otherwise"
-		fi
-	done
-}
-
-pkg_setup() {
-	java-pkg-opt-2_pkg_setup
-	python-single-r1_pkg_setup
-}
-
-src_unpack() {
-	[[ ${PV} == *9999* ]] && git-r3_src_unpack
-	default
-}
-
-src_prepare() {
-	default
-
-	# Only add nopie patch when we're on hardened
-	if gcc-specs-pie; then
-		eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch
-	fi
-
-	# Remove shipped binaries (kBuild, yasm) and tools, see bug #232775
-	rm -r kBuild/bin || die
-	# Remove everything in tools except kBuildUnits
-	find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || die
-
-	# Disable things unused or split into separate ebuilds
-	sed -e "s@MY_LIBDIR@$(get_libdir)@" \
-		"${FILESDIR}"/${MY_PN}-5-localconfig > LocalConfig.kmk || die
-
-	if ! use pch; then
-		# bug #753323
-		printf '\n%s\n' "VBOX_WITHOUT_PRECOMPILED_HEADERS=1" \
-			>> LocalConfig.kmk || die
-	fi
-
-	# bug #916002, #488176
-	tc-ld-force-bfd
-
-	# Respect LDFLAGS
-	sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
-		-i Config.kmk src/libs/xpcom18a4/Config.kmk || die
-
-	# Do not use hard-coded ld (related to bug #488176)
-	sed -e '/QUIET)ld /s@ld @$(LD) @' \
-		-i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
-
-	# Use PAM only when pam USE flag is enbaled (bug #376531)
-	if ! use pam; then
-		einfo "Disabling PAM removes the possibility to use the VRDP features."
-		sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
-		sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
-			src/VBox/HostServices/Makefile.kmk || die
-		echo -e "\nIPRT_WITHOUT_PAM=1" >> LocalConfig.kmk || die
-	fi
-
-	# add correct java path
-	if use java; then
-		sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
-			-i "${S}"/Config.kmk || die
-		java-pkg-opt-2_src_prepare
-	fi
-
-	#856811 #864274
-	# cannot filter out only one flag, some combinations of these flags produce buggy executables
-	for i in abm avx avx2 bmi bmi2 fma fma4 popcnt; do
-		append-cflags $(test-flags-CC -mno-$i)
-		append-cxxflags $(test-flags-CXX -mno-$i)
-	done
-
-	# bug #908814
-	filter-lto
-
-	# bug #843437
-	cat >> LocalConfig.kmk <<-EOF || die
-		CXXFLAGS=${CXXFLAGS}
-		CFLAGS=${CFLAGS}
-	EOF
-
-	if use sdl; then
-		sed -i 's/sdl-config/sdl2-config/' configure || die
-		echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
-	fi
-
-	#443830
-	echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die
-
-	if tc-is-clang; then
-		# clang assembler chokes on comments starting with /
-		sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
-
-		# clang does not support this extension
-		eapply "${FILESDIR}"/${MY_PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
-	fi
-
-	# fix doc generation
-	echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die
-	# replace xhtml names with numeric equivalents
-	find doc/manual -name \*.xml -exec sed -i \
-		-e 's/&nbsp;/\&#160;/g' \
-		-e 's/&ndash;/\&#8211;/g' \
-		-e 's/&larr;/\&#8592;/g' \
-		-e 's/&rarr;/\&#8594;/g' \
-		-e 's/&harr;/\&#8596;/g' {} \+ || die
-
-	# fix help path #891879
-	echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die
-
-	# 489208
-	# Cannot patch the whole text, many translations.  Use sed instead to replace the command
-	find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \
-		's/&apos;[^&]*\(vboxdrv setup\|vboxconfig\)&apos;/\&apos;emerge -1 virtualbox-modules\&apos;/' {} \+ || die
-	sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \
-		src/VBox/Frontends/VirtualBox/src/main.cpp \
-		src/VBox/VMM/VMMR3/VM.cpp || die
-
-	# 890561
-	echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
-
-	if ! use nls && ! use gui; then
-		cat >> LocalConfig.kmk <<-EOF || die
-			VBOX_WITH_NLS :=
-			VBOX_WITH_MAIN_NLS :=
-			VBOX_WITH_PUEL_NLS :=
-			VBOX_WITH_VBOXMANAGE_NLS :=
-		EOF
-	fi
-}
-
-src_configure() {
-	tc-export AR CC CXX LD RANLIB
-	export HOST_CC="$(tc-getBUILD_CC)"
-
-	local myconf=(
-		--with-gcc="$(tc-getCC)"
-		--with-g++="$(tc-getCXX)"
-
-		--disable-kmods
-		--with-kvm
-
-		# this is required for kvm to work.
-		# also this prohibits installation with suid.
-		--disable-hardening
-
-		$(usev !alsa --disable-alsa)
-		$(usev !dbus --disable-dbus)
-		$(usev debug --build-debug)
-		$(usev !doc --disable-docs)
-		$(usev !java --disable-java)
-		$(usev !lvm --disable-devmapper)
-		$(usev !pulseaudio --disable-pulse)
-		$(usev !python --disable-python)
-		$(usev vboxwebsrv --enable-webservice)
-		$(usev vde --enable-vde)
-		$(usev vnc --enable-vnc)
-	)
-
-	if use gui || use sdl || use opengl; then
-		myconf+=(
-			$(usev !opengl --disable-opengl)
-			$(usev !gui --disable-qt)
-			$(usev !sdl --disable-sdl)
-		)
-	else
-		myconf+=(
-			--build-headless
-		)
-	fi
-
-	if use amd64 && ! has_multilib_profile; then
-		myconf+=( --disable-vmmraw )
-	fi
-
-	# not an autoconf script
-	edo ./configure "${myconf[@]}"
-
-	# Force usage of chosen Python implementation
-	# bug #856121, bug #785835
-	sed -i \
-		-e '/VBOX_WITH_PYTHON.*=/d' \
-		-e '/VBOX_PATH_PYTHON_INC.*=/d' \
-		-e '/VBOX_LIB_PYTHON.*=/d' \
-		AutoConfig.kmk || die
-
-	cat >> AutoConfig.kmk <<-EOF || die
-		VBOX_WITH_PYTHON=$(usev python 1)
-		VBOX_PATH_PYTHON_INC=$(python_get_includedir)
-		VBOX_LIB_PYTHON=$(python_get_library_path)
-	EOF
-
-	if use python; then
-		local mangled_python="${EPYTHON#python}"
-		mangled_python="${mangled_python/.}"
-
-		# Stub out the script which defines what the Makefile ends up
-		# building for. gen_python_deps.py gets called by the Makefile
-		# with some args and it spits out a bunch of paths for a hardcoded
-		# list of Pythons. We just override it with what we're actually using.
-		# This minimises the amount of patching we have to do for new Pythons.
-		cat > src/libs/xpcom18a4/python/gen_python_deps.py <<-EOF || die
-			print("VBOX_PYTHON${mangled_python}_INC=$(python_get_includedir)")
-			print("VBOX_PYTHON${mangled_python}_LIB=$(python_get_library_path)")
-			print("VBOX_PYTHONDEF_INC=$(python_get_includedir)")
-			print("VBOX_PYTHONDEF_LIB=$(python_get_library_path)")
-		EOF
-
-		chmod +x src/libs/xpcom18a4/python/gen_python_deps.py || die
-	fi
-}
-
-src_compile() {
-	source ./env.sh || die
-
-	# Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
-	MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
-	MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
-	MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
-
-	local myemakeargs=(
-		VBOX_BUILD_PUBLISHER=_Gentoo
-		VBOX_WITH_VBOXIMGMOUNT=1
-
-		KBUILD_VERBOSE=2
-
-		AS="$(tc-getCC)"
-		CC="$(tc-getCC)"
-		CXX="$(tc-getCXX)"
-
-		TOOL_GCC3_CC="$(tc-getCC)"
-		TOOL_GCC3_LD="$(tc-getCC)"
-		TOOL_GCC3_AS="$(tc-getCC)"
-		TOOL_GCC3_AR="$(tc-getAR)"
-		TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
-
-		TOOL_GXX3_CC="$(tc-getCC)"
-		TOOL_GXX3_CXX="$(tc-getCXX)"
-		TOOL_GXX3_LD="$(tc-getCXX)"
-		TOOL_GXX3_AS="$(tc-getCXX)"
-		TOOL_GXX3_AR="$(tc-getAR)"
-		TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
-
-		TOOL_GCC3_CFLAGS="${CFLAGS}"
-		TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
-		VBOX_GCC_OPT="${CXXFLAGS}"
-		VBOX_NM="$(tc-getNM)"
-
-		TOOL_YASM_AS=yasm
-	)
-
-	if use amd64 && has_multilib_profile; then
-		myemakeargs+=(
-			CC32="$(tc-getCC) -m32"
-			CXX32="$(tc-getCXX) -m32"
-
-			TOOL_GCC32_CC="$(tc-getCC) -m32"
-			TOOL_GCC32_CXX="$(tc-getCXX) -m32"
-			TOOL_GCC32_LD="$(tc-getCC) -m32"
-			TOOL_GCC32_AS="$(tc-getCC) -m32"
-			TOOL_GCC32_AR="$(tc-getAR)"
-			TOOL_GCC32_OBJCOPY="$(tc-getOBJCOPY)"
-
-			TOOL_GXX32_CC="$(tc-getCC) -m32"
-			TOOL_GXX32_CXX="$(tc-getCXX) -m32"
-			TOOL_GXX32_LD="$(tc-getCXX) -m32"
-			TOOL_GXX32_AS="$(tc-getCXX) -m32"
-			TOOL_GXX32_AR="$(tc-getAR)"
-			TOOL_GXX32_OBJCOPY="$(tc-getOBJCOPY)"
-		)
-	fi
-
-	MAKE="kmk" emake "${myemakeargs[@]}" all
-}
-
-src_install() {
-	cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
-
-	local vbox_inst_path="/usr/$(get_libdir)/${MY_PN}" each size ico icofile
-
-	vbox_inst() {
-		local binary="${1}"
-		local perms="${2:-0750}"
-		local path="${3:-${vbox_inst_path}}"
-
-		[[ -n "${binary}" ]] || die "vbox_inst: No binary given!"
-		[[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
-
-		insinto ${path}
-		doins ${binary}
-		fowners root:vboxusers ${path}/${binary}
-		fperms ${perms} ${path}/${binary}
-	}
-
-	# Create configuration files
-	insinto /etc/vbox
-	newins "${FILESDIR}/${MY_PN}-4-config" vbox.cfg
-
-	# Set the correct libdir
-	sed \
-		-e "s@MY_LIBDIR@$(get_libdir)@" \
-		-i "${ED}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
-
-	# Install the wrapper script
-	exeinto ${vbox_inst_path}
-	newexe "${FILESDIR}/${MY_PN}-ose-6-wrapper" "VBox"
-	fowners root:vboxusers ${vbox_inst_path}/VBox
-	fperms 0750 ${vbox_inst_path}/VBox
-
-	# Install binaries and libraries
-	insinto ${vbox_inst_path}
-	doins -r components
-
-	for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,VMMPreload,XPCOMIPCD} \
-		vboximg-mount vbox-img *so *r0; do
-		vbox_inst ${each}
-	done
-
-	# These binaries need to be suid root.
-	for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
-		vbox_inst ${each} 0750
-	done
-
-	# Install EFI Firmware files (bug #320757)
-	for each in VBoxEFI{32,64}.fd ; do
-		vbox_inst ${each} 0644
-	done
-
-	# VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
-	# VBoxXPCOMIPCD (bug #524202)
-	for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
-		pax-mark -m "${ED}"${vbox_inst_path}/${each}
-	done
-
-	# Symlink binaries to the shipped wrapper
-	for each in vbox{autostart,balloonctrl,bugreport,headless,manage} \
-		VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-	done
-	dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount
-	dosym ${vbox_inst_path}/vbox-img /usr/bin/vbox-img
-
-	if use pam; then
-		# VRDPAuth only works with this (bug #351949)
-		dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
-	fi
-
-	# set an env-variable for 3rd party tools
-	echo "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
-	# environment variables used during SDK binding installation
-	echo "VBOX_SDK_PATH=${vbox_inst_path}/sdk" >> "${T}/90virtualbox"
-	echo "VBOX_INSTALL_PATH=${vbox_inst_path}" >> "${T}/90virtualbox"
-	doenvd "${T}/90virtualbox"
-
-	if use sdl; then
-		vbox_inst VBoxSDL 0750
-		pax-mark -m "${ED}"${vbox_inst_path}/VBoxSDL
-
-		for each in vboxsdl VBoxSDL ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-		done
-	fi
-
-	if use gui; then
-		vbox_inst VirtualBox
-		vbox_inst VirtualBoxVM 0750
-		for each in VirtualBox{,VM} ; do
-			pax-mark -m "${ED}"${vbox_inst_path}/${each}
-		done
-
-		if use opengl; then
-			vbox_inst VBoxTestOGL
-			pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
-		fi
-
-		for each in virtualbox{,vm} VirtualBox{,VM} ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-		done
-
-		insinto /usr/share/${PN}
-		doins -r nls
-		doins -r UnattendedTemplates
-
-		newmenu ${MY_PN}.desktop ${PN}.desktop
-
-		pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
-		for size in 16 32 48 64 128 ; do
-			newicon -s ${size} ${MY_PN}-${size}px.png ${PN}.png
-		done
-		newicon ${MY_PN}-48px.png ${PN}.png
-		newicon -s scalable ${MY_PN}.svg ${PN}.png
-		popd &>/dev/null || die
-		pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
-		for size in 16 24 32 48 64 72 96 128 256 512 ; do
-			for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
-				icofile="${MY_PN}-${ico}-${size}px.png"
-				if [[ -f "${icofile}" ]]; then
-					newicon -s ${size} ${icofile} ${MY_PN}-${ico}.png
-				fi
-			done
-		done
-		popd &>/dev/null || die
-	fi
-
-	if use lvm; then
-		vbox_inst VBoxVolInfo 0750
-		dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
-	fi
-
-	if use sdk; then
-		insinto ${vbox_inst_path}
-		doins -r sdk
-
-		if use java; then
-			java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
-			java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
-		fi
-	fi
-
-	if use udev; then
-		local udevdir="$(get_udevdir)"
-		local udev_file="VBoxCreateUSBNode.sh"
-		local rules_file="10-virtualbox.rules"
-
-		insinto ${udevdir}
-		doins ${udev_file}
-		fowners root:vboxusers ${udevdir}/${udev_file}
-		fperms 0750 ${udevdir}/${udev_file}
-
-		insinto ${udevdir}/rules.d
-		sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \
-			> "${T}"/${rules_file} || die
-		doins "${T}"/${rules_file}
-	fi
-
-	if use vboxwebsrv; then
-		vbox_inst vboxwebsrv
-		dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
-		newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
-		newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
-	fi
-
-	# Remove dead symlinks (bug #715338)
-	find "${ED}"/usr/$(get_libdir)/${MY_PN} -xtype l -delete || die
-
-	# Fix version string in extensions or else they don't get accepted
-	# by the virtualbox host process (see bug #438930)
-	find ExtensionPacks -type f -name "ExtPack.xml" -exec sed -i '/Version/s@_Gentoo@@' {} \+ || die
-
-	local extensions_dir="${vbox_inst_path}/ExtensionPacks"
-
-	if use vnc; then
-		insinto ${extensions_dir}
-		doins -r ExtensionPacks/VNC
-	fi
-
-	if use dtrace; then
-		insinto ${extensions_dir}
-		doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
-	fi
-
-	if use doc; then
-		dodoc UserManual.pdf UserManual.q{ch,hc}
-		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
-	elif use gui; then
-		dodoc "${WORKDIR}"/${MY_PN}-help-${ORIGIN_PV}/UserManual.q{ch,hc}
-		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
-	fi
-	dodoc ${PATCHES_DIR}/README.*
-
-	if use python; then
-		local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.so"
-		if [[ ! -x "${python_path_ext}" ]]; then
-			eerror "Couldn't find ${python_path_ext}! Bindings were requested with USE=python"
-			eerror "but none were installed. This may happen if support for a Python target"
-			eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles."
-			die "Incomplete installation of Python bindings! File a bug with Gentoo!"
-		fi
-
-		# 378871
-		local installer_dir="${ED}/usr/$(get_libdir)/virtualbox/sdk/installer"
-		pushd "${installer_dir}" &> /dev/null || die
-		sed -e "s;%VBOX_INSTALL_PATH%;${vbox_inst_path};" \
-			-e "s;%VBOX_SDK_PATH%;${vbox_inst_path}/sdk;" \
-			-i vboxapi/__init__.py || die
-		# insert shebang, the files come without one
-		find vboxapi -name \*.py -exec sed -e "1 i\#! ${PYTHON}" -i {} \+ || die
-		python_domodule vboxapi
-		popd &> /dev/null || die
-		python_doscript vboxshell.py
-
-		# do not install the installer
-		rm -r "${installer_dir}" || die
-	fi
-
-	newtmpfiles "${FILESDIR}"/${MY_PN}-vboxusb_tmpfilesd virtualbox-vboxusb.conf
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-
-	if use udev; then
-		udev_reload
-		udevadm trigger --subsystem-match=usb
-	fi
-
-	tmpfiles_process virtualbox-vboxusb.conf
-
-	if use gui; then
-		elog "To launch VirtualBox just type: \"virtualbox\"."
-	fi
-
-	elog "You must be in the vboxusers group to use VirtualBox."
-	elog ""
-	elog "The latest user manual is available for download at:"
-	elog "https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/UserManual.pdf"
-	elog ""
-
-	optfeature "Advanced networking setups" net-misc/bridge-utils sys-apps/usermode-utilities
-	optfeature "USB2, USB3, PXE boot, and VRDP support" app-emulation/virtualbox-extpack-oracle
-	optfeature "Guest additions ISO" app-emulation/virtualbox-additions
-
-	if ! use udev; then
-		ewarn "Without USE=udev, USB devices will likely not work in ${MY_PN}."
-	fi
-}
-
-pkg_postrm() {
-	xdg_pkg_postrm
-
-	use udev && udev_reload
-}


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/
@ 2024-05-15 16:34 Viorel Munteanu
  0 siblings, 0 replies; 24+ messages in thread
From: Viorel Munteanu @ 2024-05-15 16:34 UTC (permalink / raw
  To: gentoo-commits

commit:     9c0be794a3761af5ea20902981d359d276489c4e
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Wed May 15 16:33:45 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Wed May 15 16:34:40 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c0be794

app-emulation/virtualbox-kvm: drop 7.0.18_pre20240502

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox-kvm/Manifest              |   1 -
 .../virtualbox-kvm-7.0.18_pre20240502.ebuild       | 768 ---------------------
 2 files changed, 769 deletions(-)

diff --git a/app-emulation/virtualbox-kvm/Manifest b/app-emulation/virtualbox-kvm/Manifest
index b23b9295abd0..f2c77bebe9f8 100644
--- a/app-emulation/virtualbox-kvm/Manifest
+++ b/app-emulation/virtualbox-kvm/Manifest
@@ -6,7 +6,6 @@ DIST virtualbox-help-7.0.16.tar.xz 3948696 BLAKE2B 5c5937313ea0e5cb4764b8a61fd15
 DIST virtualbox-help-7.0.18.tar.xz 3948116 BLAKE2B 5715a7e609297387b5fccce0951c62e5969fd68adeecb869712e69f5e90daef97384bd3ff3c39de40903a1fabe7ac6d2f8ecdbb40de16abe955d40e49b962eec SHA512 ec0f915b7221bc40d02f5f1675eb0defb5506b2f2bd96c063a96a9346e1c82428ccdda8b3adac43238c451ae185ac31af4a186da17ffe091469e14e696388b3a
 DIST virtualbox-kvm-7.0.14_pre20240325.tar.gz 134926 BLAKE2B 3e707b272219b2c5703d91d1f6a2f0a6c54fe29eeb6e91e5830949f7260e5b409e3425c38daea568725cb7fd10ddee234af6b72d747206e0a98ac1e33a10028c SHA512 e30291e1d7e2649057a9b38ea907f22f62b0367f33d88af10fdaaa49333890be2b719626103f9800836a3833368a018f5fc63a46577dd1d83178d7406bf8c494
 DIST virtualbox-kvm-7.0.14_pre20240502.tar.gz 141218 BLAKE2B fd78db709a37fd5239e52a71a5690073631c9376a0a2d6ab9a885a5892ff272d432adeabf03c3317556a9d76cc6819cc5dcd44cd19bd18bd338bb1b84bda5dae SHA512 650bbe3a8c51d7373c25834be129888b624c2d99baebe4105c2a70b1a013cdb7527224778a78f6901b91dea6e22129354ba9269bcd365b9956df5c5b8a77869b
-DIST virtualbox-kvm-7.0.18_pre20240502.tar.gz 141218 BLAKE2B fd78db709a37fd5239e52a71a5690073631c9376a0a2d6ab9a885a5892ff272d432adeabf03c3317556a9d76cc6819cc5dcd44cd19bd18bd338bb1b84bda5dae SHA512 650bbe3a8c51d7373c25834be129888b624c2d99baebe4105c2a70b1a013cdb7527224778a78f6901b91dea6e22129354ba9269bcd365b9956df5c5b8a77869b
 DIST virtualbox-kvm-7.0.18_pre20240515.tar.gz 114604 BLAKE2B 6db426693022c09bce2d562ee2b8f5ef83eec45b2481e45bc62fe1993b5cd93d83c26c248427515a3f7bd5c3e244d79b2b03bfafd7eaf6256796e3384f1c06d9 SHA512 63e07ce15330714508848b489361650b74970c97e964beef7d4ff5f23c2ad53d3f37860c5297ceae4dfc9d198df94d9531882bb1e870e34ec69494882a4db882
 DIST virtualbox-patches-7.0.14.tar.bz2 6937 BLAKE2B da5f18efbba2a8f4701b3d29dc00784e4e80e18a18b029e5dce8c142eb4dc97637069bfc5081422064a7dc59dfacf503ebbdc3421caa96430dc53fa72988aa20 SHA512 57cc34b92e4626de5c445e34ae025da7ec0d752a60618c619a55c28bf7d6b1cc9dc81ea059b949b0f3e625568207e8084f9462faf487ca0daf2794e7f1feac36
 DIST virtualbox-patches-7.0.16.tar.bz2 6808 BLAKE2B d15fa2ca306375142c3e25d4759d2790b2bb9eb69e333a8773ad500b29dd127b401943abf59ca59d01858a3ed5551fb3a6c93c4c893c8de971a714ce5306d577 SHA512 a488cbc6660fe8637c44cd79d87156609af089988239a7e76fea8a3c7e6319512c574bef2e942b354b14ce671a8e75ab8b2160abf7c40963795ee8a545ecd992

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.18_pre20240502.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.18_pre20240502.ebuild
deleted file mode 100644
index 2b901786ab78..000000000000
--- a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.18_pre20240502.ebuild
+++ /dev/null
@@ -1,768 +0,0 @@
-# Copyright 2022-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# To add a new Python here:
-# 1. Patch src/libs/xpcom18a4/python/Makefile.kmk (copy the previous impl's logic)
-#    Do NOT skip this part. It'll end up silently not-building the Python extension
-#    or otherwise misbehaving if you do.
-#
-# 2. Then update PYTHON_COMPAT & set PYTHON_SINGLE_TARGET for testing w/ USE=python.
-#
-#  May need to look at other distros (e.g. Arch Linux) to find patches for newer
-#  Python versions as upstream tends to lag. Upstream may have patches on their
-#  trunk branch but not release branch.
-#
-#  See bug #785835, bug #856121.
-PYTHON_COMPAT=( python3_{10..11} )
-
-inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \
-	python-single-r1 tmpfiles toolchain-funcs udev xdg
-
-PATCHES_PV="7.0.16"
-ORIGIN_PN="VirtualBox"
-ORIGIN_PV=${PATCHES_PV}
-
-MY_PN=virtualbox
-MY_PV=${PV#*_pre}
-
-PATCHES_DIR="${WORKDIR}"/${PN}-${MY_PV}
-
-DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
-HOMEPAGE="https://www.virtualbox.org/ https://github.com/cyberus-technology/virtualbox-kvm"
-SRC_URI="https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2"
-if [[ ${PV} == *9999* ]]; then
-	inherit git-r3
-
-	ORIGIN_PV=${PATCHES_PV}
-	EGIT_REPO_URI="https://github.com/cyberus-technology/virtualbox-kvm"
-else
-	ORIGIN_PV=${PV%_pre*}
-	PATCHES_DIR="${WORKDIR}"/${PN}-dev-${MY_PV}
-	SRC_URI+=" https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz"
-fi
-MY_P=${ORIGIN_PN}-${ORIGIN_PV}
-SRC_URI+="
-	https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/${MY_P}.tar.bz2
-	gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${MY_PN}/${MY_PN}-help-${ORIGIN_PV}.tar.xz ) )
-"
-S="${WORKDIR}/${ORIGIN_PN}-${ORIGIN_PV}"
-
-LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
-SLOT="0"
-IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde vnc"
-
-unset WATCOM #856769
-
-COMMON_DEPEND="
-	${PYTHON_DEPS}
-	acct-group/vboxusers
-	dev-libs/libtpms
-	dev-libs/libxml2
-	dev-libs/openssl:0=
-	media-libs/libpng:0=
-	media-libs/libvpx:0=
-	net-misc/curl
-	sys-libs/zlib
-	dbus? ( sys-apps/dbus )
-	gui? (
-		dev-qt/qtcore:5
-		dev-qt/qtdbus:5
-		dev-qt/qtgui:5
-		dev-qt/qthelp:5
-		dev-qt/qtprintsupport:5
-		dev-qt/qtwidgets:5
-		dev-qt/qtx11extras:5
-		dev-qt/qtxml:5
-		x11-libs/libX11
-		x11-libs/libXt
-		opengl? ( dev-qt/qtopengl:5 )
-	)
-	lvm? ( sys-fs/lvm2 )
-	opengl? (
-		media-libs/libglvnd[X]
-		media-libs/vulkan-loader
-		x11-libs/libX11
-		x11-libs/libXt
-	)
-	pam? ( sys-libs/pam )
-	sdl? (
-		media-libs/libsdl2[X,video]
-		x11-libs/libX11
-		x11-libs/libXcursor
-		x11-libs/libXt
-	)
-	vboxwebsrv? ( net-libs/gsoap[-gnutls(-),debug?] )
-	vde? ( net-misc/vde )
-	vnc? ( >=net-libs/libvncserver-0.9.9 )
-"
-# We're stuck on JDK (and JRE, I guess?) 1.8 because of need for wsimport
-# with USE="vboxwebsrv java". Note that we have to put things in DEPEND,
-# not (only, anyway) BDEPEND, as the eclass magic to set the environment variables
-# based on *DEPEND doesn't work for BDEPEND at least right now.
-#
-# There's a comment in Config.kmk about it
-# ("With Java 11 wsimport was removed, usually part of a separate install now.")
-# but it needs more investigation.
-#
-# See bug #878299 to track this issue.
-DEPEND="
-	${COMMON_DEPEND}
-	>=dev-libs/libxslt-1.1.19
-	virtual/libcrypt:=
-	alsa? ( >=media-libs/alsa-lib-1.0.13 )
-	gui? (
-		x11-base/xorg-proto
-		x11-libs/libxcb:=
-		x11-libs/libXcursor
-		x11-libs/libXext
-		x11-libs/libXinerama
-		x11-libs/libXmu
-		x11-libs/libXrandr
-	)
-	java? ( virtual/jdk:1.8 )
-	opengl? (
-		x11-base/xorg-proto
-		x11-libs/libXcursor
-		x11-libs/libXinerama
-		x11-libs/libXmu
-		x11-libs/libXrandr
-		virtual/glu
-	)
-	sdl? ( x11-libs/libXinerama )
-	pulseaudio? ( media-libs/libpulse )
-	udev? ( >=virtual/udev-171 )
-"
-RDEPEND="
-	!app-emulation/virtualbox
-	${COMMON_DEPEND}
-	gui? ( x11-libs/libxcb:= )
-	java? ( virtual/jre:1.8 )
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	>=app-arch/tar-1.34-r2
-	>=dev-lang/yasm-0.6.2
-	dev-libs/libIDL
-	dev-util/glslang
-	>=dev-build/kbuild-0.1.9998.3592
-	sys-apps/which
-	sys-devel/bin86
-	sys-libs/libcap
-	sys-power/iasl
-	virtual/pkgconfig
-	doc? (
-		app-text/docbook-sgml-dtd:4.4
-		app-text/docbook-xsl-ns-stylesheets
-		dev-texlive/texlive-basic
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-latexrecommended
-		dev-texlive/texlive-latexextra
-		dev-texlive/texlive-fontsrecommended
-		dev-texlive/texlive-fontsextra
-		dev-qt/qthelp:5
-	)
-	gui? ( dev-qt/linguist-tools:5 )
-	nls? ( dev-qt/linguist-tools:5 )
-	java? ( virtual/jdk:1.8 )
-"
-
-QA_FLAGS_IGNORED="
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
-"
-
-QA_TEXTRELS="
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-"
-
-QA_EXECSTACK="
-	usr/lib64/virtualbox/iPxeBaseBin
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
-"
-
-QA_WX_LOAD="
-	usr/lib64/virtualbox/iPxeBaseBin
-"
-
-QA_PRESTRIPPED="
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-"
-
-REQUIRED_USE="
-	java? ( sdk )
-	python? ( sdk )
-	vboxwebsrv? ( java )
-	${PYTHON_REQUIRED_USE}
-"
-
-PATCHES=(
-	# Downloaded patchset
-	"${WORKDIR}"/virtualbox-patches-${PATCHES_PV}/patches
-	"${PATCHES_DIR}"/patches
-)
-
-pkg_pretend() {
-	if ! use gui; then
-		einfo "No USE=\"gui\" selected, this build will not include any Qt frontend."
-	fi
-
-	if ! use opengl; then
-		einfo "No USE=\"opengl\" selected, this build will lack"
-		einfo "the OpenGL feature."
-	fi
-	if ! use python; then
-		einfo "You have disabled the \"python\" USE flag. This will only"
-		einfo "disable the python bindings being installed."
-	fi
-	if ! use nls && use gui; then
-		einfo "USE=\"gui\" also selects USE=\"nls\".  This build"
-		einfo "will have NLS support."
-	fi
-
-	# 749273
-	local d=${ROOT}
-	for i in usr "$(get_libdir)"; do
-		d="${d}/$i"
-		if [[ "$(stat -L -c "%g %u" "${d}")" != "0 0" ]]; then
-			die "${d} should be owned by root, VirtualBox will not start otherwise"
-		fi
-	done
-}
-
-pkg_setup() {
-	java-pkg-opt-2_pkg_setup
-	python-single-r1_pkg_setup
-}
-
-src_unpack() {
-	[[ ${PV} == *9999* ]] && git-r3_src_unpack
-	default
-}
-
-src_prepare() {
-	default
-
-	# Only add nopie patch when we're on hardened
-	if gcc-specs-pie; then
-		eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch
-	fi
-
-	# Remove shipped binaries (kBuild, yasm) and tools, see bug #232775
-	rm -r kBuild/bin || die
-	# Remove everything in tools except kBuildUnits
-	find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || die
-
-	# Disable things unused or split into separate ebuilds
-	sed -e "s@MY_LIBDIR@$(get_libdir)@" \
-		"${FILESDIR}"/${MY_PN}-5-localconfig > LocalConfig.kmk || die
-
-	if ! use pch; then
-		# bug #753323
-		printf '\n%s\n' "VBOX_WITHOUT_PRECOMPILED_HEADERS=1" \
-			>> LocalConfig.kmk || die
-	fi
-
-	# bug #916002, #488176
-	tc-ld-force-bfd
-
-	# Respect LDFLAGS
-	sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
-		-i Config.kmk src/libs/xpcom18a4/Config.kmk || die
-
-	# Do not use hard-coded ld (related to bug #488176)
-	sed -e '/QUIET)ld /s@ld @$(LD) @' \
-		-i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
-
-	# Use PAM only when pam USE flag is enbaled (bug #376531)
-	if ! use pam; then
-		einfo "Disabling PAM removes the possibility to use the VRDP features."
-		sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
-		sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
-			src/VBox/HostServices/Makefile.kmk || die
-		echo -e "\nIPRT_WITHOUT_PAM=1" >> LocalConfig.kmk || die
-	fi
-
-	# add correct java path
-	if use java; then
-		sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
-			-i "${S}"/Config.kmk || die
-		java-pkg-opt-2_src_prepare
-	fi
-
-	#856811 #864274
-	# cannot filter out only one flag, some combinations of these flags produce buggy executables
-	for i in abm avx avx2 bmi bmi2 fma fma4 popcnt; do
-		append-cflags $(test-flags-CC -mno-$i)
-		append-cxxflags $(test-flags-CXX -mno-$i)
-	done
-
-	# bug #908814
-	filter-lto
-
-	# bug #843437
-	cat >> LocalConfig.kmk <<-EOF || die
-		CXXFLAGS=${CXXFLAGS}
-		CFLAGS=${CFLAGS}
-	EOF
-
-	if use sdl; then
-		sed -i 's/sdl-config/sdl2-config/' configure || die
-		echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
-	fi
-
-	#443830
-	echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die
-
-	if tc-is-clang; then
-		# clang assembler chokes on comments starting with /
-		sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
-
-		# clang does not support this extension
-		eapply "${FILESDIR}"/${MY_PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
-	fi
-
-	# fix doc generation
-	echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die
-	# replace xhtml names with numeric equivalents
-	find doc/manual -name \*.xml -exec sed -i \
-		-e 's/&nbsp;/\&#160;/g' \
-		-e 's/&ndash;/\&#8211;/g' \
-		-e 's/&larr;/\&#8592;/g' \
-		-e 's/&rarr;/\&#8594;/g' \
-		-e 's/&harr;/\&#8596;/g' {} \+ || die
-
-	# fix help path #891879
-	echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die
-
-	# 489208
-	# Cannot patch the whole text, many translations.  Use sed instead to replace the command
-	find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \
-		's/&apos;[^&]*\(vboxdrv setup\|vboxconfig\)&apos;/\&apos;emerge -1 virtualbox-modules\&apos;/' {} \+ || die
-	sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \
-		src/VBox/Frontends/VirtualBox/src/main.cpp \
-		src/VBox/VMM/VMMR3/VM.cpp || die
-
-	# 890561
-	echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
-
-	if ! use nls && ! use gui; then
-		cat >> LocalConfig.kmk <<-EOF || die
-			VBOX_WITH_NLS :=
-			VBOX_WITH_MAIN_NLS :=
-			VBOX_WITH_PUEL_NLS :=
-			VBOX_WITH_VBOXMANAGE_NLS :=
-		EOF
-	fi
-}
-
-src_configure() {
-	tc-export AR CC CXX LD RANLIB
-	export HOST_CC="$(tc-getBUILD_CC)"
-
-	local myconf=(
-		--with-gcc="$(tc-getCC)"
-		--with-g++="$(tc-getCXX)"
-
-		--disable-kmods
-		--with-kvm
-
-		# this is required for kvm to work.
-		# also this prohibits installation with suid.
-		--disable-hardening
-
-		$(usev !alsa --disable-alsa)
-		$(usev !dbus --disable-dbus)
-		$(usev debug --build-debug)
-		$(usev !doc --disable-docs)
-		$(usev !java --disable-java)
-		$(usev !lvm --disable-devmapper)
-		$(usev !pulseaudio --disable-pulse)
-		$(usev !python --disable-python)
-		$(usev vboxwebsrv --enable-webservice)
-		$(usev vde --enable-vde)
-		$(usev vnc --enable-vnc)
-	)
-
-	if use gui || use sdl || use opengl; then
-		myconf+=(
-			$(usev !opengl --disable-opengl)
-			$(usev !gui --disable-qt)
-			$(usev !sdl --disable-sdl)
-		)
-	else
-		myconf+=(
-			--build-headless
-		)
-	fi
-
-	if use amd64 && ! has_multilib_profile; then
-		myconf+=( --disable-vmmraw )
-	fi
-
-	# not an autoconf script
-	edo ./configure "${myconf[@]}"
-
-	# Force usage of chosen Python implementation
-	# bug #856121, bug #785835
-	sed -i \
-		-e '/VBOX_WITH_PYTHON.*=/d' \
-		-e '/VBOX_PATH_PYTHON_INC.*=/d' \
-		-e '/VBOX_LIB_PYTHON.*=/d' \
-		AutoConfig.kmk || die
-
-	cat >> AutoConfig.kmk <<-EOF || die
-		VBOX_WITH_PYTHON=$(usev python 1)
-		VBOX_PATH_PYTHON_INC=$(python_get_includedir)
-		VBOX_LIB_PYTHON=$(python_get_library_path)
-	EOF
-
-	if use python; then
-		local mangled_python="${EPYTHON#python}"
-		mangled_python="${mangled_python/.}"
-
-		# Stub out the script which defines what the Makefile ends up
-		# building for. gen_python_deps.py gets called by the Makefile
-		# with some args and it spits out a bunch of paths for a hardcoded
-		# list of Pythons. We just override it with what we're actually using.
-		# This minimises the amount of patching we have to do for new Pythons.
-		cat > src/libs/xpcom18a4/python/gen_python_deps.py <<-EOF || die
-			print("VBOX_PYTHON${mangled_python}_INC=$(python_get_includedir)")
-			print("VBOX_PYTHON${mangled_python}_LIB=$(python_get_library_path)")
-			print("VBOX_PYTHONDEF_INC=$(python_get_includedir)")
-			print("VBOX_PYTHONDEF_LIB=$(python_get_library_path)")
-		EOF
-
-		chmod +x src/libs/xpcom18a4/python/gen_python_deps.py || die
-	fi
-}
-
-src_compile() {
-	source ./env.sh || die
-
-	# Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
-	MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
-	MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
-	MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
-
-	local myemakeargs=(
-		VBOX_BUILD_PUBLISHER=_Gentoo
-		VBOX_WITH_VBOXIMGMOUNT=1
-
-		KBUILD_VERBOSE=2
-
-		AS="$(tc-getCC)"
-		CC="$(tc-getCC)"
-		CXX="$(tc-getCXX)"
-
-		TOOL_GCC3_CC="$(tc-getCC)"
-		TOOL_GCC3_LD="$(tc-getCC)"
-		TOOL_GCC3_AS="$(tc-getCC)"
-		TOOL_GCC3_AR="$(tc-getAR)"
-		TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
-
-		TOOL_GXX3_CC="$(tc-getCC)"
-		TOOL_GXX3_CXX="$(tc-getCXX)"
-		TOOL_GXX3_LD="$(tc-getCXX)"
-		TOOL_GXX3_AS="$(tc-getCXX)"
-		TOOL_GXX3_AR="$(tc-getAR)"
-		TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
-
-		TOOL_GCC3_CFLAGS="${CFLAGS}"
-		TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
-		VBOX_GCC_OPT="${CXXFLAGS}"
-		VBOX_NM="$(tc-getNM)"
-
-		TOOL_YASM_AS=yasm
-	)
-
-	if use amd64 && has_multilib_profile; then
-		myemakeargs+=(
-			CC32="$(tc-getCC) -m32"
-			CXX32="$(tc-getCXX) -m32"
-
-			TOOL_GCC32_CC="$(tc-getCC) -m32"
-			TOOL_GCC32_CXX="$(tc-getCXX) -m32"
-			TOOL_GCC32_LD="$(tc-getCC) -m32"
-			TOOL_GCC32_AS="$(tc-getCC) -m32"
-			TOOL_GCC32_AR="$(tc-getAR)"
-			TOOL_GCC32_OBJCOPY="$(tc-getOBJCOPY)"
-
-			TOOL_GXX32_CC="$(tc-getCC) -m32"
-			TOOL_GXX32_CXX="$(tc-getCXX) -m32"
-			TOOL_GXX32_LD="$(tc-getCXX) -m32"
-			TOOL_GXX32_AS="$(tc-getCXX) -m32"
-			TOOL_GXX32_AR="$(tc-getAR)"
-			TOOL_GXX32_OBJCOPY="$(tc-getOBJCOPY)"
-		)
-	fi
-
-	MAKE="kmk" emake "${myemakeargs[@]}" all
-}
-
-src_install() {
-	cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
-
-	local vbox_inst_path="/usr/$(get_libdir)/${MY_PN}" each size ico icofile
-
-	vbox_inst() {
-		local binary="${1}"
-		local perms="${2:-0750}"
-		local path="${3:-${vbox_inst_path}}"
-
-		[[ -n "${binary}" ]] || die "vbox_inst: No binary given!"
-		[[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
-
-		insinto ${path}
-		doins ${binary}
-		fowners root:vboxusers ${path}/${binary}
-		fperms ${perms} ${path}/${binary}
-	}
-
-	# Create configuration files
-	insinto /etc/vbox
-	newins "${FILESDIR}/${MY_PN}-4-config" vbox.cfg
-
-	# Set the correct libdir
-	sed \
-		-e "s@MY_LIBDIR@$(get_libdir)@" \
-		-i "${ED}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
-
-	# Install the wrapper script
-	exeinto ${vbox_inst_path}
-	newexe "${FILESDIR}/${MY_PN}-ose-6-wrapper" "VBox"
-	fowners root:vboxusers ${vbox_inst_path}/VBox
-	fperms 0750 ${vbox_inst_path}/VBox
-
-	# Install binaries and libraries
-	insinto ${vbox_inst_path}
-	doins -r components
-
-	for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,VMMPreload,XPCOMIPCD} \
-		vboximg-mount vbox-img *so *r0; do
-		vbox_inst ${each}
-	done
-
-	for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
-		vbox_inst ${each} 0750
-	done
-
-	# Install EFI Firmware files (bug #320757)
-	for each in VBoxEFI{32,64}.fd ; do
-		vbox_inst ${each} 0644
-	done
-
-	# VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
-	# VBoxXPCOMIPCD (bug #524202)
-	for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
-		pax-mark -m "${ED}"${vbox_inst_path}/${each}
-	done
-
-	# Symlink binaries to the shipped wrapper
-	for each in vbox{autostart,balloonctrl,bugreport,headless,manage} \
-		VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-	done
-	dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount
-	dosym ${vbox_inst_path}/vbox-img /usr/bin/vbox-img
-
-	if use pam; then
-		# VRDPAuth only works with this (bug #351949)
-		dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
-	fi
-
-	# set an env-variable for 3rd party tools
-	echo "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
-	# environment variables used during SDK binding installation
-	echo "VBOX_SDK_PATH=${vbox_inst_path}/sdk" >> "${T}/90virtualbox"
-	echo "VBOX_INSTALL_PATH=${vbox_inst_path}" >> "${T}/90virtualbox"
-	doenvd "${T}/90virtualbox"
-
-	if use sdl; then
-		vbox_inst VBoxSDL 0750
-		pax-mark -m "${ED}"${vbox_inst_path}/VBoxSDL
-
-		for each in vboxsdl VBoxSDL ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-		done
-	fi
-
-	if use gui; then
-		vbox_inst VirtualBox
-		vbox_inst VirtualBoxVM 0750
-		for each in VirtualBox{,VM} ; do
-			pax-mark -m "${ED}"${vbox_inst_path}/${each}
-		done
-
-		if use opengl; then
-			vbox_inst VBoxTestOGL
-			pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
-		fi
-
-		for each in virtualbox{,vm} VirtualBox{,VM} ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-		done
-
-		insinto /usr/share/${PN}
-		doins -r nls
-		doins -r UnattendedTemplates
-
-		newmenu ${MY_PN}.desktop ${PN}.desktop
-
-		pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
-		for size in 16 32 48 64 128 ; do
-			newicon -s ${size} ${MY_PN}-${size}px.png ${PN}.png
-		done
-		newicon ${MY_PN}-48px.png ${PN}.png
-		newicon -s scalable ${MY_PN}.svg ${PN}.png
-		popd &>/dev/null || die
-		pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
-		for size in 16 24 32 48 64 72 96 128 256 512 ; do
-			for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
-				icofile="${MY_PN}-${ico}-${size}px.png"
-				if [[ -f "${icofile}" ]]; then
-					newicon -s ${size} ${icofile} ${MY_PN}-${ico}.png
-				fi
-			done
-		done
-		popd &>/dev/null || die
-	fi
-
-	if use lvm; then
-		vbox_inst VBoxVolInfo 0750
-		dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
-	fi
-
-	if use sdk; then
-		insinto ${vbox_inst_path}
-		doins -r sdk
-
-		if use java; then
-			java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
-			java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
-		fi
-	fi
-
-	if use udev; then
-		local udevdir="$(get_udevdir)"
-		local udev_file="VBoxCreateUSBNode.sh"
-		local rules_file="10-virtualbox.rules"
-
-		insinto ${udevdir}
-		doins ${udev_file}
-		fowners root:vboxusers ${udevdir}/${udev_file}
-		fperms 0750 ${udevdir}/${udev_file}
-
-		insinto ${udevdir}/rules.d
-		sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \
-			> "${T}"/${rules_file} || die
-		doins "${T}"/${rules_file}
-	fi
-
-	if use vboxwebsrv; then
-		vbox_inst vboxwebsrv
-		dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
-		newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
-		newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
-	fi
-
-	# Remove dead symlinks (bug #715338)
-	find "${ED}"/usr/$(get_libdir)/${MY_PN} -xtype l -delete || die
-
-	# Fix version string in extensions or else they don't get accepted
-	# by the virtualbox host process (see bug #438930)
-	find ExtensionPacks -type f -name "ExtPack.xml" -exec sed -i '/Version/s@_Gentoo@@' {} \+ || die
-
-	local extensions_dir="${vbox_inst_path}/ExtensionPacks"
-
-	if use vnc; then
-		insinto ${extensions_dir}
-		doins -r ExtensionPacks/VNC
-	fi
-
-	if use dtrace; then
-		insinto ${extensions_dir}
-		doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
-	fi
-
-	if use doc; then
-		dodoc UserManual.pdf UserManual.q{ch,hc}
-		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
-	elif use gui; then
-		dodoc "${WORKDIR}"/${MY_PN}-help-${ORIGIN_PV}/UserManual.q{ch,hc}
-		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
-	fi
-	dodoc ${PATCHES_DIR}/README.*
-
-	if use python; then
-		local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.so"
-		if [[ ! -x "${python_path_ext}" ]]; then
-			eerror "Couldn't find ${python_path_ext}! Bindings were requested with USE=python"
-			eerror "but none were installed. This may happen if support for a Python target"
-			eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles."
-			die "Incomplete installation of Python bindings! File a bug with Gentoo!"
-		fi
-
-		# 378871
-		local installer_dir="${ED}/usr/$(get_libdir)/virtualbox/sdk/installer"
-		pushd "${installer_dir}" &> /dev/null || die
-		sed -e "s;%VBOX_INSTALL_PATH%;${vbox_inst_path};" \
-			-e "s;%VBOX_SDK_PATH%;${vbox_inst_path}/sdk;" \
-			-i vboxapi/__init__.py || die
-		# insert shebang, the files come without one
-		find vboxapi -name \*.py -exec sed -e "1 i\#! ${PYTHON}" -i {} \+ || die
-		python_domodule vboxapi
-		popd &> /dev/null || die
-		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}"/${MY_PN}-vboxusb_tmpfilesd virtualbox-vboxusb.conf
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-
-	if use udev; then
-		udev_reload
-		udevadm trigger --subsystem-match=usb
-	fi
-
-	tmpfiles_process virtualbox-vboxusb.conf
-
-	if use gui; then
-		elog "To launch VirtualBox just type: \"virtualbox\"."
-	fi
-
-	elog "You must be in the vboxusers group to use VirtualBox."
-	elog ""
-	elog "The latest user manual is available for download at:"
-	elog "https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/UserManual.pdf"
-	elog ""
-
-	optfeature "Advanced networking setups" net-misc/bridge-utils sys-apps/usermode-utilities
-	optfeature "USB2, USB3, PXE boot, and VRDP support" app-emulation/virtualbox-extpack-oracle
-	optfeature "Guest additions ISO" app-emulation/virtualbox-additions
-
-	if ! use udev; then
-		ewarn "Without USE=udev, USB devices will likely not work in ${MY_PN}."
-	fi
-}
-
-pkg_postrm() {
-	xdg_pkg_postrm
-
-	use udev && udev_reload
-}


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/
@ 2024-06-05  4:53 Viorel Munteanu
  0 siblings, 0 replies; 24+ messages in thread
From: Viorel Munteanu @ 2024-06-05  4:53 UTC (permalink / raw
  To: gentoo-commits

commit:     fe493990b440fa54a333282e33eb61fd6d69539b
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  5 04:51:34 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Wed Jun  5 04:52:56 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe493990

app-emulation/virtualbox-kvm: drop 7.0.14_pre20240502

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox-kvm/Manifest              |   4 -
 .../virtualbox-kvm-7.0.14_pre20240502.ebuild       | 767 ---------------------
 2 files changed, 771 deletions(-)

diff --git a/app-emulation/virtualbox-kvm/Manifest b/app-emulation/virtualbox-kvm/Manifest
index 36f960878a6f..71a5a6e444d0 100644
--- a/app-emulation/virtualbox-kvm/Manifest
+++ b/app-emulation/virtualbox-kvm/Manifest
@@ -1,10 +1,6 @@
-DIST VirtualBox-7.0.14.tar.bz2 175654864 BLAKE2B 99f4942b864ce481d69983af31393d763452c5b55697ab642b43c155f5fbc2a9963fbe1b7744baef620d0b351e1ac73c1ef978698b9a7e77897bb9cbc18dc17c SHA512 6a82933bbf51ff255d17cb61ae6ddfb791a2200e3dff705f181cd06c6031b48cf15faa5e8202a65daef0fb20b7fd9e33d40dbd0f9cc3f49af49fff04a1cb0a73
 DIST VirtualBox-7.0.16.tar.bz2 170897951 BLAKE2B 6b436c38df632222621723db94677a0efef5de2ac1eacec73571bc658955f23fff347fa60c37ec78c58bf94b82b8f9a95fb26c07ef4becc7e9f535af069151f5 SHA512 1b8ba08bec144cbd1f2e9aa0929cdf60a0b99930f1dd80567094fba75097d87661aef3da2cc24f4abff6b6db8f186e251c5f693a2a93943cc39909d5f1e1bce5
 DIST VirtualBox-7.0.18.tar.bz2 173295159 BLAKE2B 1371d54d648aafbad3814d55d495836ce7a6f9ca955aeb71e24c57a27ed8acae8c020b8094ca7386d341d5e7460b9b0823cc01e7e69dd3cdadaadee1bc608bd1 SHA512 e78a18fa808152cbdc1d407751acf3f57a8202bf238ad3432c4f0b0f97ab203e915a6cd11619e64f4aca5b907eb72be67bab146869af0e73414144addf0d76b4
-DIST virtualbox-help-7.0.14.tar.xz 3944832 BLAKE2B 95079e4da8c960c41cee799142779a6c2587e0e8af7956ca551cb5a4c0f36f313189dfe08afba83a0c32886866a7f9903b5e370008d6b3ce6283fb2288866b06 SHA512 e2f1acdd7577a93047e220300b1996d2855ddef20053c01294f8295fde0840645c41b75632d71dd2fc276219084fe4105fd057623f39375542358796425a2d03
 DIST virtualbox-help-7.0.16.tar.xz 3948696 BLAKE2B 5c5937313ea0e5cb4764b8a61fd1587e88a4afc965ef00862c5a265a15253929d35e0635231b6be5656f26f600bc4b70a2fa2ebc0f33b35d35c184b57e5acef8 SHA512 b9baca57118a82e3489c8445f0988671f16f75de60cc2d929d5e3b0c4c9e3ceacd796a72a81bba88d69eb4b4559835a13775c18d7782ae7dbe8ad202e247db0c
 DIST virtualbox-help-7.0.18.tar.xz 3948116 BLAKE2B 5715a7e609297387b5fccce0951c62e5969fd68adeecb869712e69f5e90daef97384bd3ff3c39de40903a1fabe7ac6d2f8ecdbb40de16abe955d40e49b962eec SHA512 ec0f915b7221bc40d02f5f1675eb0defb5506b2f2bd96c063a96a9346e1c82428ccdda8b3adac43238c451ae185ac31af4a186da17ffe091469e14e696388b3a
-DIST virtualbox-kvm-7.0.14_pre20240502.tar.gz 141218 BLAKE2B fd78db709a37fd5239e52a71a5690073631c9376a0a2d6ab9a885a5892ff272d432adeabf03c3317556a9d76cc6819cc5dcd44cd19bd18bd338bb1b84bda5dae SHA512 650bbe3a8c51d7373c25834be129888b624c2d99baebe4105c2a70b1a013cdb7527224778a78f6901b91dea6e22129354ba9269bcd365b9956df5c5b8a77869b
 DIST virtualbox-kvm-7.0.18_pre20240515.tar.gz 114604 BLAKE2B 6db426693022c09bce2d562ee2b8f5ef83eec45b2481e45bc62fe1993b5cd93d83c26c248427515a3f7bd5c3e244d79b2b03bfafd7eaf6256796e3384f1c06d9 SHA512 63e07ce15330714508848b489361650b74970c97e964beef7d4ff5f23c2ad53d3f37860c5297ceae4dfc9d198df94d9531882bb1e870e34ec69494882a4db882
-DIST virtualbox-patches-7.0.14.tar.bz2 6937 BLAKE2B da5f18efbba2a8f4701b3d29dc00784e4e80e18a18b029e5dce8c142eb4dc97637069bfc5081422064a7dc59dfacf503ebbdc3421caa96430dc53fa72988aa20 SHA512 57cc34b92e4626de5c445e34ae025da7ec0d752a60618c619a55c28bf7d6b1cc9dc81ea059b949b0f3e625568207e8084f9462faf487ca0daf2794e7f1feac36
 DIST virtualbox-patches-7.0.16.tar.bz2 6808 BLAKE2B d15fa2ca306375142c3e25d4759d2790b2bb9eb69e333a8773ad500b29dd127b401943abf59ca59d01858a3ed5551fb3a6c93c4c893c8de971a714ce5306d577 SHA512 a488cbc6660fe8637c44cd79d87156609af089988239a7e76fea8a3c7e6319512c574bef2e942b354b14ce671a8e75ab8b2160abf7c40963795ee8a545ecd992

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240502.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240502.ebuild
deleted file mode 100644
index 4c808e1dce9f..000000000000
--- a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.14_pre20240502.ebuild
+++ /dev/null
@@ -1,767 +0,0 @@
-# Copyright 2022-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# To add a new Python here:
-# 1. Patch src/libs/xpcom18a4/python/Makefile.kmk (copy the previous impl's logic)
-#    Do NOT skip this part. It'll end up silently not-building the Python extension
-#    or otherwise misbehaving if you do.
-#
-# 2. Then update PYTHON_COMPAT & set PYTHON_SINGLE_TARGET for testing w/ USE=python.
-#
-#  May need to look at other distros (e.g. Arch Linux) to find patches for newer
-#  Python versions as upstream tends to lag. Upstream may have patches on their
-#  trunk branch but not release branch.
-#
-#  See bug #785835, bug #856121.
-PYTHON_COMPAT=( python3_{10..11} )
-
-inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \
-	python-single-r1 tmpfiles toolchain-funcs udev xdg
-
-PATCHES_PV="7.0.14"
-ORIGIN_PN="VirtualBox"
-ORIGIN_PV=${PATCHES_PV}
-
-MY_PN=virtualbox
-MY_PV=${PV#*_pre}
-
-PATCHES_DIR="${WORKDIR}"/${PN}-${MY_PV}
-
-DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
-HOMEPAGE="https://www.virtualbox.org/ https://github.com/cyberus-technology/virtualbox-kvm"
-SRC_URI="https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2"
-if [[ ${PV} == *9999* ]]; then
-	inherit git-r3
-
-	ORIGIN_PV=${PATCHES_PV}
-	EGIT_REPO_URI="https://github.com/cyberus-technology/virtualbox-kvm"
-else
-	ORIGIN_PV=${PV%_pre*}
-	PATCHES_DIR="${WORKDIR}"/${PN}-dev-${MY_PV}
-	SRC_URI+=" https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz"
-fi
-MY_P=${ORIGIN_PN}-${ORIGIN_PV}
-SRC_URI+="
-	https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/${MY_P}.tar.bz2
-	gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${MY_PN}/${MY_PN}-help-${ORIGIN_PV}.tar.xz ) )
-"
-S="${WORKDIR}/${ORIGIN_PN}-${ORIGIN_PV}"
-
-LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
-SLOT="0"
-IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde vnc"
-
-unset WATCOM #856769
-
-COMMON_DEPEND="
-	${PYTHON_DEPS}
-	acct-group/vboxusers
-	dev-libs/libtpms
-	dev-libs/libxml2
-	dev-libs/openssl:0=
-	media-libs/libpng:0=
-	media-libs/libvpx:0=
-	net-misc/curl
-	sys-libs/zlib
-	dbus? ( sys-apps/dbus )
-	gui? (
-		dev-qt/qtcore:5
-		dev-qt/qtdbus:5
-		dev-qt/qtgui:5
-		dev-qt/qthelp:5
-		dev-qt/qtprintsupport:5
-		dev-qt/qtwidgets:5
-		dev-qt/qtx11extras:5
-		dev-qt/qtxml:5
-		x11-libs/libX11
-		x11-libs/libXt
-		opengl? ( dev-qt/qtopengl:5 )
-	)
-	lvm? ( sys-fs/lvm2 )
-	opengl? (
-		media-libs/libglvnd[X]
-		media-libs/vulkan-loader
-		x11-libs/libX11
-		x11-libs/libXt
-	)
-	pam? ( sys-libs/pam )
-	sdl? (
-		media-libs/libsdl2[X,video]
-		x11-libs/libX11
-		x11-libs/libXcursor
-		x11-libs/libXt
-	)
-	vboxwebsrv? ( net-libs/gsoap[-gnutls(-),debug?] )
-	vde? ( net-misc/vde )
-	vnc? ( >=net-libs/libvncserver-0.9.9 )
-"
-# We're stuck on JDK (and JRE, I guess?) 1.8 because of need for wsimport
-# with USE="vboxwebsrv java". Note that we have to put things in DEPEND,
-# not (only, anyway) BDEPEND, as the eclass magic to set the environment variables
-# based on *DEPEND doesn't work for BDEPEND at least right now.
-#
-# There's a comment in Config.kmk about it
-# ("With Java 11 wsimport was removed, usually part of a separate install now.")
-# but it needs more investigation.
-#
-# See bug #878299 to track this issue.
-DEPEND="
-	${COMMON_DEPEND}
-	>=dev-libs/libxslt-1.1.19
-	virtual/libcrypt:=
-	alsa? ( >=media-libs/alsa-lib-1.0.13 )
-	gui? (
-		x11-base/xorg-proto
-		x11-libs/libxcb:=
-		x11-libs/libXcursor
-		x11-libs/libXext
-		x11-libs/libXinerama
-		x11-libs/libXmu
-		x11-libs/libXrandr
-	)
-	java? ( virtual/jdk:1.8 )
-	opengl? (
-		x11-base/xorg-proto
-		x11-libs/libXcursor
-		x11-libs/libXinerama
-		x11-libs/libXmu
-		x11-libs/libXrandr
-		virtual/glu
-	)
-	sdl? ( x11-libs/libXinerama )
-	pulseaudio? ( media-libs/libpulse )
-	udev? ( >=virtual/udev-171 )
-"
-RDEPEND="
-	!app-emulation/virtualbox
-	${COMMON_DEPEND}
-	gui? ( x11-libs/libxcb:= )
-	java? ( virtual/jre:1.8 )
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	>=app-arch/tar-1.34-r2
-	>=dev-lang/yasm-0.6.2
-	dev-libs/libIDL
-	dev-util/glslang
-	>=dev-build/kbuild-0.1.9998.3592
-	sys-apps/which
-	sys-devel/bin86
-	sys-libs/libcap
-	sys-power/iasl
-	virtual/pkgconfig
-	doc? (
-		app-text/docbook-sgml-dtd:4.4
-		app-text/docbook-xsl-ns-stylesheets
-		dev-texlive/texlive-basic
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-latexrecommended
-		dev-texlive/texlive-latexextra
-		dev-texlive/texlive-fontsrecommended
-		dev-texlive/texlive-fontsextra
-		dev-qt/qthelp:5
-	)
-	gui? ( dev-qt/linguist-tools:5 )
-	nls? ( dev-qt/linguist-tools:5 )
-	java? ( virtual/jdk:1.8 )
-"
-
-QA_FLAGS_IGNORED="
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
-"
-
-QA_TEXTRELS="
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-"
-
-QA_EXECSTACK="
-	usr/lib64/virtualbox/iPxeBaseBin
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
-"
-
-QA_WX_LOAD="
-	usr/lib64/virtualbox/iPxeBaseBin
-"
-
-QA_PRESTRIPPED="
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-"
-
-REQUIRED_USE="
-	java? ( sdk )
-	python? ( sdk )
-	vboxwebsrv? ( java )
-	${PYTHON_REQUIRED_USE}
-"
-
-PATCHES=(
-	# Downloaded patchset
-	"${WORKDIR}"/virtualbox-patches-${PATCHES_PV}/patches
-	"${PATCHES_DIR}"/patches
-)
-
-pkg_pretend() {
-	if ! use gui; then
-		einfo "No USE=\"gui\" selected, this build will not include any Qt frontend."
-	fi
-
-	if ! use opengl; then
-		einfo "No USE=\"opengl\" selected, this build will lack"
-		einfo "the OpenGL feature."
-	fi
-	if ! use python; then
-		einfo "You have disabled the \"python\" USE flag. This will only"
-		einfo "disable the python bindings being installed."
-	fi
-	if ! use nls && use gui; then
-		einfo "USE=\"gui\" also selects USE=\"nls\".  This build"
-		einfo "will have NLS support."
-	fi
-
-	# 749273
-	local d=${ROOT}
-	for i in usr "$(get_libdir)"; do
-		d="${d}/$i"
-		if [[ "$(stat -L -c "%g %u" "${d}")" != "0 0" ]]; then
-			die "${d} should be owned by root, VirtualBox will not start otherwise"
-		fi
-	done
-}
-
-pkg_setup() {
-	java-pkg-opt-2_pkg_setup
-	python-single-r1_pkg_setup
-}
-
-src_unpack() {
-	[[ ${PV} == *9999* ]] && git-r3_src_unpack
-	default
-}
-
-src_prepare() {
-	default
-
-	# Only add nopie patch when we're on hardened
-	if gcc-specs-pie; then
-		eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch
-	fi
-
-	# Remove shipped binaries (kBuild, yasm) and tools, see bug #232775
-	rm -r kBuild/bin || die
-	# Remove everything in tools except kBuildUnits
-	find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || die
-
-	# Disable things unused or split into separate ebuilds
-	sed -e "s@MY_LIBDIR@$(get_libdir)@" \
-		"${FILESDIR}"/${MY_PN}-5-localconfig > LocalConfig.kmk || die
-
-	if ! use pch; then
-		# bug #753323
-		printf '\n%s\n' "VBOX_WITHOUT_PRECOMPILED_HEADERS=1" \
-			>> LocalConfig.kmk || die
-	fi
-
-	# bug #916002, #488176
-	tc-ld-force-bfd
-
-	# Respect LDFLAGS
-	sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
-		-i Config.kmk src/libs/xpcom18a4/Config.kmk || die
-
-	# Do not use hard-coded ld (related to bug #488176)
-	sed -e '/QUIET)ld /s@ld @$(LD) @' \
-		-i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
-
-	# Use PAM only when pam USE flag is enbaled (bug #376531)
-	if ! use pam; then
-		einfo "Disabling PAM removes the possibility to use the VRDP features."
-		sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
-		sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
-			src/VBox/HostServices/Makefile.kmk || die
-		echo -e "\nIPRT_WITHOUT_PAM=1" >> LocalConfig.kmk || die
-	fi
-
-	# add correct java path
-	if use java; then
-		sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
-			-i "${S}"/Config.kmk || die
-		java-pkg-opt-2_src_prepare
-	fi
-
-	#856811 #864274
-	# cannot filter out only one flag, some combinations of these flags produce buggy executables
-	for i in abm avx avx2 bmi bmi2 fma fma4 popcnt; do
-		append-cflags $(test-flags-CC -mno-$i)
-		append-cxxflags $(test-flags-CXX -mno-$i)
-	done
-
-	# bug #908814
-	filter-lto
-
-	# bug #843437
-	cat >> LocalConfig.kmk <<-EOF || die
-		CXXFLAGS=${CXXFLAGS}
-		CFLAGS=${CFLAGS}
-	EOF
-
-	if use sdl; then
-		sed -i 's/sdl-config/sdl2-config/' configure || die
-		echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
-	fi
-
-	#443830
-	echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die
-
-	if tc-is-clang; then
-		# clang assembler chokes on comments starting with /
-		sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
-
-		# clang does not support this extension
-		eapply "${FILESDIR}"/${MY_PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
-	fi
-
-	# fix doc generation
-	echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die
-	# replace xhtml names with numeric equivalents
-	find doc/manual -name \*.xml -exec sed -i \
-		-e 's/&nbsp;/\&#160;/g' \
-		-e 's/&ndash;/\&#8211;/g' \
-		-e 's/&larr;/\&#8592;/g' \
-		-e 's/&rarr;/\&#8594;/g' \
-		-e 's/&harr;/\&#8596;/g' {} \+ || die
-
-	# fix help path #891879
-	echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die
-
-	# 489208
-	# Cannot patch the whole text, many translations.  Use sed instead to replace the command
-	find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \
-		's/&apos;[^&]*\(vboxdrv setup\|vboxconfig\)&apos;/\&apos;emerge -1 virtualbox-modules\&apos;/' {} \+ || die
-	sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \
-		src/VBox/Frontends/VirtualBox/src/main.cpp \
-		src/VBox/VMM/VMMR3/VM.cpp || die
-
-	# 890561
-	echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
-
-	if ! use nls && ! use gui; then
-		cat >> LocalConfig.kmk <<-EOF || die
-			VBOX_WITH_NLS :=
-			VBOX_WITH_MAIN_NLS :=
-			VBOX_WITH_PUEL_NLS :=
-			VBOX_WITH_VBOXMANAGE_NLS :=
-		EOF
-	fi
-}
-
-src_configure() {
-	tc-export AR CC CXX LD RANLIB
-	export HOST_CC="$(tc-getBUILD_CC)"
-
-	local myconf=(
-		--with-gcc="$(tc-getCC)"
-		--with-g++="$(tc-getCXX)"
-
-		--disable-kmods
-		--with-kvm
-
-		# this is required for kvm to work.
-		# also this prohibits installation with suid.
-		--disable-hardening
-
-		$(usev !alsa --disable-alsa)
-		$(usev !dbus --disable-dbus)
-		$(usev debug --build-debug)
-		$(usev !doc --disable-docs)
-		$(usev !java --disable-java)
-		$(usev !lvm --disable-devmapper)
-		$(usev !pulseaudio --disable-pulse)
-		$(usev !python --disable-python)
-		$(usev vboxwebsrv --enable-webservice)
-		$(usev vde --enable-vde)
-		$(usev vnc --enable-vnc)
-	)
-
-	if use gui || use sdl || use opengl; then
-		myconf+=(
-			$(usev !opengl --disable-opengl)
-			$(usev !gui --disable-qt)
-			$(usev !sdl --disable-sdl)
-		)
-	else
-		myconf+=(
-			--build-headless
-		)
-	fi
-
-	if use amd64 && ! has_multilib_profile; then
-		myconf+=( --disable-vmmraw )
-	fi
-
-	# not an autoconf script
-	edo ./configure "${myconf[@]}"
-
-	# Force usage of chosen Python implementation
-	# bug #856121, bug #785835
-	sed -i \
-		-e '/VBOX_WITH_PYTHON.*=/d' \
-		-e '/VBOX_PATH_PYTHON_INC.*=/d' \
-		-e '/VBOX_LIB_PYTHON.*=/d' \
-		AutoConfig.kmk || die
-
-	cat >> AutoConfig.kmk <<-EOF || die
-		VBOX_WITH_PYTHON=$(usev python 1)
-		VBOX_PATH_PYTHON_INC=$(python_get_includedir)
-		VBOX_LIB_PYTHON=$(python_get_library_path)
-	EOF
-
-	if use python; then
-		local mangled_python="${EPYTHON#python}"
-		mangled_python="${mangled_python/.}"
-
-		# Stub out the script which defines what the Makefile ends up
-		# building for. gen_python_deps.py gets called by the Makefile
-		# with some args and it spits out a bunch of paths for a hardcoded
-		# list of Pythons. We just override it with what we're actually using.
-		# This minimises the amount of patching we have to do for new Pythons.
-		cat > src/libs/xpcom18a4/python/gen_python_deps.py <<-EOF || die
-			print("VBOX_PYTHON${mangled_python}_INC=$(python_get_includedir)")
-			print("VBOX_PYTHON${mangled_python}_LIB=$(python_get_library_path)")
-			print("VBOX_PYTHONDEF_INC=$(python_get_includedir)")
-			print("VBOX_PYTHONDEF_LIB=$(python_get_library_path)")
-		EOF
-
-		chmod +x src/libs/xpcom18a4/python/gen_python_deps.py || die
-	fi
-}
-
-src_compile() {
-	source ./env.sh || die
-
-	# Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
-	MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
-	MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
-	MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
-
-	local myemakeargs=(
-		VBOX_BUILD_PUBLISHER=_Gentoo
-		VBOX_WITH_VBOXIMGMOUNT=1
-
-		KBUILD_VERBOSE=2
-
-		AS="$(tc-getCC)"
-		CC="$(tc-getCC)"
-		CXX="$(tc-getCXX)"
-
-		TOOL_GCC3_CC="$(tc-getCC)"
-		TOOL_GCC3_LD="$(tc-getCC)"
-		TOOL_GCC3_AS="$(tc-getCC)"
-		TOOL_GCC3_AR="$(tc-getAR)"
-		TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
-
-		TOOL_GXX3_CC="$(tc-getCC)"
-		TOOL_GXX3_CXX="$(tc-getCXX)"
-		TOOL_GXX3_LD="$(tc-getCXX)"
-		TOOL_GXX3_AS="$(tc-getCXX)"
-		TOOL_GXX3_AR="$(tc-getAR)"
-		TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
-
-		TOOL_GCC3_CFLAGS="${CFLAGS}"
-		TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
-		VBOX_GCC_OPT="${CXXFLAGS}"
-		VBOX_NM="$(tc-getNM)"
-
-		TOOL_YASM_AS=yasm
-	)
-
-	if use amd64 && has_multilib_profile; then
-		myemakeargs+=(
-			CC32="$(tc-getCC) -m32"
-			CXX32="$(tc-getCXX) -m32"
-
-			TOOL_GCC32_CC="$(tc-getCC) -m32"
-			TOOL_GCC32_CXX="$(tc-getCXX) -m32"
-			TOOL_GCC32_LD="$(tc-getCC) -m32"
-			TOOL_GCC32_AS="$(tc-getCC) -m32"
-			TOOL_GCC32_AR="$(tc-getAR)"
-			TOOL_GCC32_OBJCOPY="$(tc-getOBJCOPY)"
-
-			TOOL_GXX32_CC="$(tc-getCC) -m32"
-			TOOL_GXX32_CXX="$(tc-getCXX) -m32"
-			TOOL_GXX32_LD="$(tc-getCXX) -m32"
-			TOOL_GXX32_AS="$(tc-getCXX) -m32"
-			TOOL_GXX32_AR="$(tc-getAR)"
-			TOOL_GXX32_OBJCOPY="$(tc-getOBJCOPY)"
-		)
-	fi
-
-	MAKE="kmk" emake "${myemakeargs[@]}" all
-}
-
-src_install() {
-	cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
-
-	local vbox_inst_path="/usr/$(get_libdir)/${MY_PN}" each size ico icofile
-
-	vbox_inst() {
-		local binary="${1}"
-		local perms="${2:-0750}"
-		local path="${3:-${vbox_inst_path}}"
-
-		[[ -n "${binary}" ]] || die "vbox_inst: No binary given!"
-		[[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
-
-		insinto ${path}
-		doins ${binary}
-		fowners root:vboxusers ${path}/${binary}
-		fperms ${perms} ${path}/${binary}
-	}
-
-	# Create configuration files
-	insinto /etc/vbox
-	newins "${FILESDIR}/${MY_PN}-4-config" vbox.cfg
-
-	# Set the correct libdir
-	sed \
-		-e "s@MY_LIBDIR@$(get_libdir)@" \
-		-i "${ED}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
-
-	# Install the wrapper script
-	exeinto ${vbox_inst_path}
-	newexe "${FILESDIR}/${MY_PN}-ose-6-wrapper" "VBox"
-	fowners root:vboxusers ${vbox_inst_path}/VBox
-	fperms 0750 ${vbox_inst_path}/VBox
-
-	# Install binaries and libraries
-	insinto ${vbox_inst_path}
-	doins -r components
-
-	for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,VMMPreload,XPCOMIPCD} \
-		vboximg-mount vbox-img *so *r0; do
-		vbox_inst ${each}
-	done
-
-	for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
-		vbox_inst ${each} 0750
-	done
-
-	# Install EFI Firmware files (bug #320757)
-	for each in VBoxEFI{32,64}.fd ; do
-		vbox_inst ${each} 0644
-	done
-
-	# VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
-	# VBoxXPCOMIPCD (bug #524202)
-	for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
-		pax-mark -m "${ED}"${vbox_inst_path}/${each}
-	done
-
-	# Symlink binaries to the shipped wrapper
-	for each in vbox{autostart,balloonctrl,bugreport,headless,manage} \
-		VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-	done
-	dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount
-	dosym ${vbox_inst_path}/vbox-img /usr/bin/vbox-img
-
-	if use pam; then
-		# VRDPAuth only works with this (bug #351949)
-		dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
-	fi
-
-	# set an env-variable for 3rd party tools
-	echo "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
-	# environment variables used during SDK binding installation
-	echo "VBOX_SDK_PATH=${vbox_inst_path}/sdk" >> "${T}/90virtualbox"
-	echo "VBOX_INSTALL_PATH=${vbox_inst_path}" >> "${T}/90virtualbox"
-	doenvd "${T}/90virtualbox"
-
-	if use sdl; then
-		vbox_inst VBoxSDL 0750
-		pax-mark -m "${ED}"${vbox_inst_path}/VBoxSDL
-
-		for each in vboxsdl VBoxSDL ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-		done
-	fi
-
-	if use gui; then
-		vbox_inst VirtualBox
-		vbox_inst VirtualBoxVM 0750
-		for each in VirtualBox{,VM} ; do
-			pax-mark -m "${ED}"${vbox_inst_path}/${each}
-		done
-
-		if use opengl; then
-			vbox_inst VBoxTestOGL
-			pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
-		fi
-
-		for each in virtualbox{,vm} VirtualBox{,VM} ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-		done
-
-		insinto /usr/share/${PN}
-		doins -r nls
-		doins -r UnattendedTemplates
-
-		newmenu ${MY_PN}.desktop ${PN}.desktop
-
-		pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
-		for size in 16 32 48 64 128 ; do
-			newicon -s ${size} ${MY_PN}-${size}px.png ${PN}.png
-		done
-		newicon ${MY_PN}-48px.png ${PN}.png
-		newicon -s scalable ${MY_PN}.svg ${PN}.png
-		popd &>/dev/null || die
-		pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
-		for size in 16 24 32 48 64 72 96 128 256 512 ; do
-			for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
-				icofile="${MY_PN}-${ico}-${size}px.png"
-				if [[ -f "${icofile}" ]]; then
-					newicon -s ${size} ${icofile} ${MY_PN}-${ico}.png
-				fi
-			done
-		done
-		popd &>/dev/null || die
-	fi
-
-	if use lvm; then
-		vbox_inst VBoxVolInfo 0750
-		dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
-	fi
-
-	if use sdk; then
-		insinto ${vbox_inst_path}
-		doins -r sdk
-
-		if use java; then
-			java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
-			java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
-		fi
-	fi
-
-	if use udev; then
-		local udevdir="$(get_udevdir)"
-		local udev_file="VBoxCreateUSBNode.sh"
-		local rules_file="10-virtualbox.rules"
-
-		insinto ${udevdir}
-		doins ${udev_file}
-		fowners root:vboxusers ${udevdir}/${udev_file}
-		fperms 0750 ${udevdir}/${udev_file}
-
-		insinto ${udevdir}/rules.d
-		sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \
-			> "${T}"/${rules_file} || die
-		doins "${T}"/${rules_file}
-	fi
-
-	if use vboxwebsrv; then
-		vbox_inst vboxwebsrv
-		dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
-		newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
-		newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
-	fi
-
-	# Remove dead symlinks (bug #715338)
-	find "${ED}"/usr/$(get_libdir)/${MY_PN} -xtype l -delete || die
-
-	# Fix version string in extensions or else they don't get accepted
-	# by the virtualbox host process (see bug #438930)
-	find ExtensionPacks -type f -name "ExtPack.xml" -exec sed -i '/Version/s@_Gentoo@@' {} \+ || die
-
-	local extensions_dir="${vbox_inst_path}/ExtensionPacks"
-
-	if use vnc; then
-		insinto ${extensions_dir}
-		doins -r ExtensionPacks/VNC
-	fi
-
-	if use dtrace; then
-		insinto ${extensions_dir}
-		doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
-	fi
-
-	if use doc; then
-		dodoc UserManual.pdf UserManual.q{ch,hc}
-		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
-	elif use gui; then
-		dodoc "${WORKDIR}"/${MY_PN}-help-${ORIGIN_PV}/UserManual.q{ch,hc}
-		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
-	fi
-	dodoc ${PATCHES_DIR}/README.*
-
-	if use python; then
-		local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.so"
-		if [[ ! -x "${python_path_ext}" ]]; then
-			eerror "Couldn't find ${python_path_ext}! Bindings were requested with USE=python"
-			eerror "but none were installed. This may happen if support for a Python target"
-			eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles."
-			die "Incomplete installation of Python bindings! File a bug with Gentoo!"
-		fi
-
-		# 378871
-		local installer_dir="${ED}/usr/$(get_libdir)/virtualbox/sdk/installer"
-		pushd "${installer_dir}" &> /dev/null || die
-		sed -e "s;%VBOX_INSTALL_PATH%;${vbox_inst_path};" \
-			-e "s;%VBOX_SDK_PATH%;${vbox_inst_path}/sdk;" \
-			-i vboxapi/__init__.py || die
-		# insert shebang, the files come without one
-		find vboxapi -name \*.py -exec sed -e "1 i\#! ${PYTHON}" -i {} \+ || die
-		python_domodule vboxapi
-		popd &> /dev/null || die
-		python_doscript vboxshell.py
-
-		# do not install the installer
-		rm -r "${installer_dir}" || die
-	fi
-
-	newtmpfiles "${FILESDIR}"/${MY_PN}-vboxusb_tmpfilesd virtualbox-vboxusb.conf
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-
-	if use udev; then
-		udev_reload
-		udevadm trigger --subsystem-match=usb
-	fi
-
-	tmpfiles_process virtualbox-vboxusb.conf
-
-	if use gui; then
-		elog "To launch VirtualBox just type: \"virtualbox\"."
-	fi
-
-	elog "You must be in the vboxusers group to use VirtualBox."
-	elog ""
-	elog "The latest user manual is available for download at:"
-	elog "https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/UserManual.pdf"
-	elog ""
-
-	optfeature "Advanced networking setups" net-misc/bridge-utils sys-apps/usermode-utilities
-	optfeature "USB2, USB3, PXE boot, and VRDP support" app-emulation/virtualbox-extpack-oracle
-	optfeature "Guest additions ISO" app-emulation/virtualbox-additions
-
-	if ! use udev; then
-		ewarn "Without USE=udev, USB devices will likely not work in ${MY_PN}."
-	fi
-}
-
-pkg_postrm() {
-	xdg_pkg_postrm
-
-	use udev && udev_reload
-}


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/
@ 2024-06-17 15:25 Viorel Munteanu
  0 siblings, 0 replies; 24+ messages in thread
From: Viorel Munteanu @ 2024-06-17 15:25 UTC (permalink / raw
  To: gentoo-commits

commit:     2c7830a6ad520d31130dc5cf4f26c1851fddea6d
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 17 15:06:45 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Mon Jun 17 15:25:07 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c7830a6

app-emulation/virtualbox-kvm: drop 7.0.18_pre20240515

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox-kvm/Manifest              |   1 -
 .../virtualbox-kvm-7.0.18_pre20240515.ebuild       | 768 ---------------------
 2 files changed, 769 deletions(-)

diff --git a/app-emulation/virtualbox-kvm/Manifest b/app-emulation/virtualbox-kvm/Manifest
index 0148c3c44b02..998dffe2e136 100644
--- a/app-emulation/virtualbox-kvm/Manifest
+++ b/app-emulation/virtualbox-kvm/Manifest
@@ -2,6 +2,5 @@ DIST VirtualBox-7.0.16.tar.bz2 170897951 BLAKE2B 6b436c38df632222621723db94677a0
 DIST VirtualBox-7.0.18.tar.bz2 173295159 BLAKE2B 1371d54d648aafbad3814d55d495836ce7a6f9ca955aeb71e24c57a27ed8acae8c020b8094ca7386d341d5e7460b9b0823cc01e7e69dd3cdadaadee1bc608bd1 SHA512 e78a18fa808152cbdc1d407751acf3f57a8202bf238ad3432c4f0b0f97ab203e915a6cd11619e64f4aca5b907eb72be67bab146869af0e73414144addf0d76b4
 DIST virtualbox-help-7.0.16.tar.xz 3948696 BLAKE2B 5c5937313ea0e5cb4764b8a61fd1587e88a4afc965ef00862c5a265a15253929d35e0635231b6be5656f26f600bc4b70a2fa2ebc0f33b35d35c184b57e5acef8 SHA512 b9baca57118a82e3489c8445f0988671f16f75de60cc2d929d5e3b0c4c9e3ceacd796a72a81bba88d69eb4b4559835a13775c18d7782ae7dbe8ad202e247db0c
 DIST virtualbox-help-7.0.18.tar.xz 3948116 BLAKE2B 5715a7e609297387b5fccce0951c62e5969fd68adeecb869712e69f5e90daef97384bd3ff3c39de40903a1fabe7ac6d2f8ecdbb40de16abe955d40e49b962eec SHA512 ec0f915b7221bc40d02f5f1675eb0defb5506b2f2bd96c063a96a9346e1c82428ccdda8b3adac43238c451ae185ac31af4a186da17ffe091469e14e696388b3a
-DIST virtualbox-kvm-7.0.18_pre20240515.tar.gz 114604 BLAKE2B 6db426693022c09bce2d562ee2b8f5ef83eec45b2481e45bc62fe1993b5cd93d83c26c248427515a3f7bd5c3e244d79b2b03bfafd7eaf6256796e3384f1c06d9 SHA512 63e07ce15330714508848b489361650b74970c97e964beef7d4ff5f23c2ad53d3f37860c5297ceae4dfc9d198df94d9531882bb1e870e34ec69494882a4db882
 DIST virtualbox-kvm-7.0.18_pre20240617.tar.gz 131620 BLAKE2B 88f22665c1f774f4799f17777541fb1dd48a6d65f170bd998516f32fa0d84a2b1b18f7ecfcf53dc5365614b7c5b35f9c29ce69be59d475a53cbe8a7ee591f522 SHA512 c3d331bee135c746947735b483ec69536c2b7dfd19049d45212144da5eb952f67081b35a7a874eb3f4a0a611fa617f5d62566a89d2e4c1e4863657f80abd3af5
 DIST virtualbox-patches-7.0.16.tar.bz2 6808 BLAKE2B d15fa2ca306375142c3e25d4759d2790b2bb9eb69e333a8773ad500b29dd127b401943abf59ca59d01858a3ed5551fb3a6c93c4c893c8de971a714ce5306d577 SHA512 a488cbc6660fe8637c44cd79d87156609af089988239a7e76fea8a3c7e6319512c574bef2e942b354b14ce671a8e75ab8b2160abf7c40963795ee8a545ecd992

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.18_pre20240515.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.18_pre20240515.ebuild
deleted file mode 100644
index 2b901786ab78..000000000000
--- a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.18_pre20240515.ebuild
+++ /dev/null
@@ -1,768 +0,0 @@
-# Copyright 2022-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# To add a new Python here:
-# 1. Patch src/libs/xpcom18a4/python/Makefile.kmk (copy the previous impl's logic)
-#    Do NOT skip this part. It'll end up silently not-building the Python extension
-#    or otherwise misbehaving if you do.
-#
-# 2. Then update PYTHON_COMPAT & set PYTHON_SINGLE_TARGET for testing w/ USE=python.
-#
-#  May need to look at other distros (e.g. Arch Linux) to find patches for newer
-#  Python versions as upstream tends to lag. Upstream may have patches on their
-#  trunk branch but not release branch.
-#
-#  See bug #785835, bug #856121.
-PYTHON_COMPAT=( python3_{10..11} )
-
-inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \
-	python-single-r1 tmpfiles toolchain-funcs udev xdg
-
-PATCHES_PV="7.0.16"
-ORIGIN_PN="VirtualBox"
-ORIGIN_PV=${PATCHES_PV}
-
-MY_PN=virtualbox
-MY_PV=${PV#*_pre}
-
-PATCHES_DIR="${WORKDIR}"/${PN}-${MY_PV}
-
-DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
-HOMEPAGE="https://www.virtualbox.org/ https://github.com/cyberus-technology/virtualbox-kvm"
-SRC_URI="https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2"
-if [[ ${PV} == *9999* ]]; then
-	inherit git-r3
-
-	ORIGIN_PV=${PATCHES_PV}
-	EGIT_REPO_URI="https://github.com/cyberus-technology/virtualbox-kvm"
-else
-	ORIGIN_PV=${PV%_pre*}
-	PATCHES_DIR="${WORKDIR}"/${PN}-dev-${MY_PV}
-	SRC_URI+=" https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz"
-fi
-MY_P=${ORIGIN_PN}-${ORIGIN_PV}
-SRC_URI+="
-	https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/${MY_P}.tar.bz2
-	gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${MY_PN}/${MY_PN}-help-${ORIGIN_PV}.tar.xz ) )
-"
-S="${WORKDIR}/${ORIGIN_PN}-${ORIGIN_PV}"
-
-LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
-SLOT="0"
-IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde vnc"
-
-unset WATCOM #856769
-
-COMMON_DEPEND="
-	${PYTHON_DEPS}
-	acct-group/vboxusers
-	dev-libs/libtpms
-	dev-libs/libxml2
-	dev-libs/openssl:0=
-	media-libs/libpng:0=
-	media-libs/libvpx:0=
-	net-misc/curl
-	sys-libs/zlib
-	dbus? ( sys-apps/dbus )
-	gui? (
-		dev-qt/qtcore:5
-		dev-qt/qtdbus:5
-		dev-qt/qtgui:5
-		dev-qt/qthelp:5
-		dev-qt/qtprintsupport:5
-		dev-qt/qtwidgets:5
-		dev-qt/qtx11extras:5
-		dev-qt/qtxml:5
-		x11-libs/libX11
-		x11-libs/libXt
-		opengl? ( dev-qt/qtopengl:5 )
-	)
-	lvm? ( sys-fs/lvm2 )
-	opengl? (
-		media-libs/libglvnd[X]
-		media-libs/vulkan-loader
-		x11-libs/libX11
-		x11-libs/libXt
-	)
-	pam? ( sys-libs/pam )
-	sdl? (
-		media-libs/libsdl2[X,video]
-		x11-libs/libX11
-		x11-libs/libXcursor
-		x11-libs/libXt
-	)
-	vboxwebsrv? ( net-libs/gsoap[-gnutls(-),debug?] )
-	vde? ( net-misc/vde )
-	vnc? ( >=net-libs/libvncserver-0.9.9 )
-"
-# We're stuck on JDK (and JRE, I guess?) 1.8 because of need for wsimport
-# with USE="vboxwebsrv java". Note that we have to put things in DEPEND,
-# not (only, anyway) BDEPEND, as the eclass magic to set the environment variables
-# based on *DEPEND doesn't work for BDEPEND at least right now.
-#
-# There's a comment in Config.kmk about it
-# ("With Java 11 wsimport was removed, usually part of a separate install now.")
-# but it needs more investigation.
-#
-# See bug #878299 to track this issue.
-DEPEND="
-	${COMMON_DEPEND}
-	>=dev-libs/libxslt-1.1.19
-	virtual/libcrypt:=
-	alsa? ( >=media-libs/alsa-lib-1.0.13 )
-	gui? (
-		x11-base/xorg-proto
-		x11-libs/libxcb:=
-		x11-libs/libXcursor
-		x11-libs/libXext
-		x11-libs/libXinerama
-		x11-libs/libXmu
-		x11-libs/libXrandr
-	)
-	java? ( virtual/jdk:1.8 )
-	opengl? (
-		x11-base/xorg-proto
-		x11-libs/libXcursor
-		x11-libs/libXinerama
-		x11-libs/libXmu
-		x11-libs/libXrandr
-		virtual/glu
-	)
-	sdl? ( x11-libs/libXinerama )
-	pulseaudio? ( media-libs/libpulse )
-	udev? ( >=virtual/udev-171 )
-"
-RDEPEND="
-	!app-emulation/virtualbox
-	${COMMON_DEPEND}
-	gui? ( x11-libs/libxcb:= )
-	java? ( virtual/jre:1.8 )
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	>=app-arch/tar-1.34-r2
-	>=dev-lang/yasm-0.6.2
-	dev-libs/libIDL
-	dev-util/glslang
-	>=dev-build/kbuild-0.1.9998.3592
-	sys-apps/which
-	sys-devel/bin86
-	sys-libs/libcap
-	sys-power/iasl
-	virtual/pkgconfig
-	doc? (
-		app-text/docbook-sgml-dtd:4.4
-		app-text/docbook-xsl-ns-stylesheets
-		dev-texlive/texlive-basic
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-latexrecommended
-		dev-texlive/texlive-latexextra
-		dev-texlive/texlive-fontsrecommended
-		dev-texlive/texlive-fontsextra
-		dev-qt/qthelp:5
-	)
-	gui? ( dev-qt/linguist-tools:5 )
-	nls? ( dev-qt/linguist-tools:5 )
-	java? ( virtual/jdk:1.8 )
-"
-
-QA_FLAGS_IGNORED="
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
-"
-
-QA_TEXTRELS="
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-"
-
-QA_EXECSTACK="
-	usr/lib64/virtualbox/iPxeBaseBin
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
-"
-
-QA_WX_LOAD="
-	usr/lib64/virtualbox/iPxeBaseBin
-"
-
-QA_PRESTRIPPED="
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-"
-
-REQUIRED_USE="
-	java? ( sdk )
-	python? ( sdk )
-	vboxwebsrv? ( java )
-	${PYTHON_REQUIRED_USE}
-"
-
-PATCHES=(
-	# Downloaded patchset
-	"${WORKDIR}"/virtualbox-patches-${PATCHES_PV}/patches
-	"${PATCHES_DIR}"/patches
-)
-
-pkg_pretend() {
-	if ! use gui; then
-		einfo "No USE=\"gui\" selected, this build will not include any Qt frontend."
-	fi
-
-	if ! use opengl; then
-		einfo "No USE=\"opengl\" selected, this build will lack"
-		einfo "the OpenGL feature."
-	fi
-	if ! use python; then
-		einfo "You have disabled the \"python\" USE flag. This will only"
-		einfo "disable the python bindings being installed."
-	fi
-	if ! use nls && use gui; then
-		einfo "USE=\"gui\" also selects USE=\"nls\".  This build"
-		einfo "will have NLS support."
-	fi
-
-	# 749273
-	local d=${ROOT}
-	for i in usr "$(get_libdir)"; do
-		d="${d}/$i"
-		if [[ "$(stat -L -c "%g %u" "${d}")" != "0 0" ]]; then
-			die "${d} should be owned by root, VirtualBox will not start otherwise"
-		fi
-	done
-}
-
-pkg_setup() {
-	java-pkg-opt-2_pkg_setup
-	python-single-r1_pkg_setup
-}
-
-src_unpack() {
-	[[ ${PV} == *9999* ]] && git-r3_src_unpack
-	default
-}
-
-src_prepare() {
-	default
-
-	# Only add nopie patch when we're on hardened
-	if gcc-specs-pie; then
-		eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch
-	fi
-
-	# Remove shipped binaries (kBuild, yasm) and tools, see bug #232775
-	rm -r kBuild/bin || die
-	# Remove everything in tools except kBuildUnits
-	find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || die
-
-	# Disable things unused or split into separate ebuilds
-	sed -e "s@MY_LIBDIR@$(get_libdir)@" \
-		"${FILESDIR}"/${MY_PN}-5-localconfig > LocalConfig.kmk || die
-
-	if ! use pch; then
-		# bug #753323
-		printf '\n%s\n' "VBOX_WITHOUT_PRECOMPILED_HEADERS=1" \
-			>> LocalConfig.kmk || die
-	fi
-
-	# bug #916002, #488176
-	tc-ld-force-bfd
-
-	# Respect LDFLAGS
-	sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
-		-i Config.kmk src/libs/xpcom18a4/Config.kmk || die
-
-	# Do not use hard-coded ld (related to bug #488176)
-	sed -e '/QUIET)ld /s@ld @$(LD) @' \
-		-i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
-
-	# Use PAM only when pam USE flag is enbaled (bug #376531)
-	if ! use pam; then
-		einfo "Disabling PAM removes the possibility to use the VRDP features."
-		sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
-		sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
-			src/VBox/HostServices/Makefile.kmk || die
-		echo -e "\nIPRT_WITHOUT_PAM=1" >> LocalConfig.kmk || die
-	fi
-
-	# add correct java path
-	if use java; then
-		sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
-			-i "${S}"/Config.kmk || die
-		java-pkg-opt-2_src_prepare
-	fi
-
-	#856811 #864274
-	# cannot filter out only one flag, some combinations of these flags produce buggy executables
-	for i in abm avx avx2 bmi bmi2 fma fma4 popcnt; do
-		append-cflags $(test-flags-CC -mno-$i)
-		append-cxxflags $(test-flags-CXX -mno-$i)
-	done
-
-	# bug #908814
-	filter-lto
-
-	# bug #843437
-	cat >> LocalConfig.kmk <<-EOF || die
-		CXXFLAGS=${CXXFLAGS}
-		CFLAGS=${CFLAGS}
-	EOF
-
-	if use sdl; then
-		sed -i 's/sdl-config/sdl2-config/' configure || die
-		echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
-	fi
-
-	#443830
-	echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die
-
-	if tc-is-clang; then
-		# clang assembler chokes on comments starting with /
-		sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
-
-		# clang does not support this extension
-		eapply "${FILESDIR}"/${MY_PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
-	fi
-
-	# fix doc generation
-	echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die
-	# replace xhtml names with numeric equivalents
-	find doc/manual -name \*.xml -exec sed -i \
-		-e 's/&nbsp;/\&#160;/g' \
-		-e 's/&ndash;/\&#8211;/g' \
-		-e 's/&larr;/\&#8592;/g' \
-		-e 's/&rarr;/\&#8594;/g' \
-		-e 's/&harr;/\&#8596;/g' {} \+ || die
-
-	# fix help path #891879
-	echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die
-
-	# 489208
-	# Cannot patch the whole text, many translations.  Use sed instead to replace the command
-	find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \
-		's/&apos;[^&]*\(vboxdrv setup\|vboxconfig\)&apos;/\&apos;emerge -1 virtualbox-modules\&apos;/' {} \+ || die
-	sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \
-		src/VBox/Frontends/VirtualBox/src/main.cpp \
-		src/VBox/VMM/VMMR3/VM.cpp || die
-
-	# 890561
-	echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
-
-	if ! use nls && ! use gui; then
-		cat >> LocalConfig.kmk <<-EOF || die
-			VBOX_WITH_NLS :=
-			VBOX_WITH_MAIN_NLS :=
-			VBOX_WITH_PUEL_NLS :=
-			VBOX_WITH_VBOXMANAGE_NLS :=
-		EOF
-	fi
-}
-
-src_configure() {
-	tc-export AR CC CXX LD RANLIB
-	export HOST_CC="$(tc-getBUILD_CC)"
-
-	local myconf=(
-		--with-gcc="$(tc-getCC)"
-		--with-g++="$(tc-getCXX)"
-
-		--disable-kmods
-		--with-kvm
-
-		# this is required for kvm to work.
-		# also this prohibits installation with suid.
-		--disable-hardening
-
-		$(usev !alsa --disable-alsa)
-		$(usev !dbus --disable-dbus)
-		$(usev debug --build-debug)
-		$(usev !doc --disable-docs)
-		$(usev !java --disable-java)
-		$(usev !lvm --disable-devmapper)
-		$(usev !pulseaudio --disable-pulse)
-		$(usev !python --disable-python)
-		$(usev vboxwebsrv --enable-webservice)
-		$(usev vde --enable-vde)
-		$(usev vnc --enable-vnc)
-	)
-
-	if use gui || use sdl || use opengl; then
-		myconf+=(
-			$(usev !opengl --disable-opengl)
-			$(usev !gui --disable-qt)
-			$(usev !sdl --disable-sdl)
-		)
-	else
-		myconf+=(
-			--build-headless
-		)
-	fi
-
-	if use amd64 && ! has_multilib_profile; then
-		myconf+=( --disable-vmmraw )
-	fi
-
-	# not an autoconf script
-	edo ./configure "${myconf[@]}"
-
-	# Force usage of chosen Python implementation
-	# bug #856121, bug #785835
-	sed -i \
-		-e '/VBOX_WITH_PYTHON.*=/d' \
-		-e '/VBOX_PATH_PYTHON_INC.*=/d' \
-		-e '/VBOX_LIB_PYTHON.*=/d' \
-		AutoConfig.kmk || die
-
-	cat >> AutoConfig.kmk <<-EOF || die
-		VBOX_WITH_PYTHON=$(usev python 1)
-		VBOX_PATH_PYTHON_INC=$(python_get_includedir)
-		VBOX_LIB_PYTHON=$(python_get_library_path)
-	EOF
-
-	if use python; then
-		local mangled_python="${EPYTHON#python}"
-		mangled_python="${mangled_python/.}"
-
-		# Stub out the script which defines what the Makefile ends up
-		# building for. gen_python_deps.py gets called by the Makefile
-		# with some args and it spits out a bunch of paths for a hardcoded
-		# list of Pythons. We just override it with what we're actually using.
-		# This minimises the amount of patching we have to do for new Pythons.
-		cat > src/libs/xpcom18a4/python/gen_python_deps.py <<-EOF || die
-			print("VBOX_PYTHON${mangled_python}_INC=$(python_get_includedir)")
-			print("VBOX_PYTHON${mangled_python}_LIB=$(python_get_library_path)")
-			print("VBOX_PYTHONDEF_INC=$(python_get_includedir)")
-			print("VBOX_PYTHONDEF_LIB=$(python_get_library_path)")
-		EOF
-
-		chmod +x src/libs/xpcom18a4/python/gen_python_deps.py || die
-	fi
-}
-
-src_compile() {
-	source ./env.sh || die
-
-	# Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
-	MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
-	MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
-	MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
-
-	local myemakeargs=(
-		VBOX_BUILD_PUBLISHER=_Gentoo
-		VBOX_WITH_VBOXIMGMOUNT=1
-
-		KBUILD_VERBOSE=2
-
-		AS="$(tc-getCC)"
-		CC="$(tc-getCC)"
-		CXX="$(tc-getCXX)"
-
-		TOOL_GCC3_CC="$(tc-getCC)"
-		TOOL_GCC3_LD="$(tc-getCC)"
-		TOOL_GCC3_AS="$(tc-getCC)"
-		TOOL_GCC3_AR="$(tc-getAR)"
-		TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
-
-		TOOL_GXX3_CC="$(tc-getCC)"
-		TOOL_GXX3_CXX="$(tc-getCXX)"
-		TOOL_GXX3_LD="$(tc-getCXX)"
-		TOOL_GXX3_AS="$(tc-getCXX)"
-		TOOL_GXX3_AR="$(tc-getAR)"
-		TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
-
-		TOOL_GCC3_CFLAGS="${CFLAGS}"
-		TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
-		VBOX_GCC_OPT="${CXXFLAGS}"
-		VBOX_NM="$(tc-getNM)"
-
-		TOOL_YASM_AS=yasm
-	)
-
-	if use amd64 && has_multilib_profile; then
-		myemakeargs+=(
-			CC32="$(tc-getCC) -m32"
-			CXX32="$(tc-getCXX) -m32"
-
-			TOOL_GCC32_CC="$(tc-getCC) -m32"
-			TOOL_GCC32_CXX="$(tc-getCXX) -m32"
-			TOOL_GCC32_LD="$(tc-getCC) -m32"
-			TOOL_GCC32_AS="$(tc-getCC) -m32"
-			TOOL_GCC32_AR="$(tc-getAR)"
-			TOOL_GCC32_OBJCOPY="$(tc-getOBJCOPY)"
-
-			TOOL_GXX32_CC="$(tc-getCC) -m32"
-			TOOL_GXX32_CXX="$(tc-getCXX) -m32"
-			TOOL_GXX32_LD="$(tc-getCXX) -m32"
-			TOOL_GXX32_AS="$(tc-getCXX) -m32"
-			TOOL_GXX32_AR="$(tc-getAR)"
-			TOOL_GXX32_OBJCOPY="$(tc-getOBJCOPY)"
-		)
-	fi
-
-	MAKE="kmk" emake "${myemakeargs[@]}" all
-}
-
-src_install() {
-	cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
-
-	local vbox_inst_path="/usr/$(get_libdir)/${MY_PN}" each size ico icofile
-
-	vbox_inst() {
-		local binary="${1}"
-		local perms="${2:-0750}"
-		local path="${3:-${vbox_inst_path}}"
-
-		[[ -n "${binary}" ]] || die "vbox_inst: No binary given!"
-		[[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
-
-		insinto ${path}
-		doins ${binary}
-		fowners root:vboxusers ${path}/${binary}
-		fperms ${perms} ${path}/${binary}
-	}
-
-	# Create configuration files
-	insinto /etc/vbox
-	newins "${FILESDIR}/${MY_PN}-4-config" vbox.cfg
-
-	# Set the correct libdir
-	sed \
-		-e "s@MY_LIBDIR@$(get_libdir)@" \
-		-i "${ED}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
-
-	# Install the wrapper script
-	exeinto ${vbox_inst_path}
-	newexe "${FILESDIR}/${MY_PN}-ose-6-wrapper" "VBox"
-	fowners root:vboxusers ${vbox_inst_path}/VBox
-	fperms 0750 ${vbox_inst_path}/VBox
-
-	# Install binaries and libraries
-	insinto ${vbox_inst_path}
-	doins -r components
-
-	for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,VMMPreload,XPCOMIPCD} \
-		vboximg-mount vbox-img *so *r0; do
-		vbox_inst ${each}
-	done
-
-	for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
-		vbox_inst ${each} 0750
-	done
-
-	# Install EFI Firmware files (bug #320757)
-	for each in VBoxEFI{32,64}.fd ; do
-		vbox_inst ${each} 0644
-	done
-
-	# VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
-	# VBoxXPCOMIPCD (bug #524202)
-	for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
-		pax-mark -m "${ED}"${vbox_inst_path}/${each}
-	done
-
-	# Symlink binaries to the shipped wrapper
-	for each in vbox{autostart,balloonctrl,bugreport,headless,manage} \
-		VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-	done
-	dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount
-	dosym ${vbox_inst_path}/vbox-img /usr/bin/vbox-img
-
-	if use pam; then
-		# VRDPAuth only works with this (bug #351949)
-		dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
-	fi
-
-	# set an env-variable for 3rd party tools
-	echo "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
-	# environment variables used during SDK binding installation
-	echo "VBOX_SDK_PATH=${vbox_inst_path}/sdk" >> "${T}/90virtualbox"
-	echo "VBOX_INSTALL_PATH=${vbox_inst_path}" >> "${T}/90virtualbox"
-	doenvd "${T}/90virtualbox"
-
-	if use sdl; then
-		vbox_inst VBoxSDL 0750
-		pax-mark -m "${ED}"${vbox_inst_path}/VBoxSDL
-
-		for each in vboxsdl VBoxSDL ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-		done
-	fi
-
-	if use gui; then
-		vbox_inst VirtualBox
-		vbox_inst VirtualBoxVM 0750
-		for each in VirtualBox{,VM} ; do
-			pax-mark -m "${ED}"${vbox_inst_path}/${each}
-		done
-
-		if use opengl; then
-			vbox_inst VBoxTestOGL
-			pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
-		fi
-
-		for each in virtualbox{,vm} VirtualBox{,VM} ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-		done
-
-		insinto /usr/share/${PN}
-		doins -r nls
-		doins -r UnattendedTemplates
-
-		newmenu ${MY_PN}.desktop ${PN}.desktop
-
-		pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
-		for size in 16 32 48 64 128 ; do
-			newicon -s ${size} ${MY_PN}-${size}px.png ${PN}.png
-		done
-		newicon ${MY_PN}-48px.png ${PN}.png
-		newicon -s scalable ${MY_PN}.svg ${PN}.png
-		popd &>/dev/null || die
-		pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
-		for size in 16 24 32 48 64 72 96 128 256 512 ; do
-			for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
-				icofile="${MY_PN}-${ico}-${size}px.png"
-				if [[ -f "${icofile}" ]]; then
-					newicon -s ${size} ${icofile} ${MY_PN}-${ico}.png
-				fi
-			done
-		done
-		popd &>/dev/null || die
-	fi
-
-	if use lvm; then
-		vbox_inst VBoxVolInfo 0750
-		dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
-	fi
-
-	if use sdk; then
-		insinto ${vbox_inst_path}
-		doins -r sdk
-
-		if use java; then
-			java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
-			java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
-		fi
-	fi
-
-	if use udev; then
-		local udevdir="$(get_udevdir)"
-		local udev_file="VBoxCreateUSBNode.sh"
-		local rules_file="10-virtualbox.rules"
-
-		insinto ${udevdir}
-		doins ${udev_file}
-		fowners root:vboxusers ${udevdir}/${udev_file}
-		fperms 0750 ${udevdir}/${udev_file}
-
-		insinto ${udevdir}/rules.d
-		sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \
-			> "${T}"/${rules_file} || die
-		doins "${T}"/${rules_file}
-	fi
-
-	if use vboxwebsrv; then
-		vbox_inst vboxwebsrv
-		dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
-		newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
-		newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
-	fi
-
-	# Remove dead symlinks (bug #715338)
-	find "${ED}"/usr/$(get_libdir)/${MY_PN} -xtype l -delete || die
-
-	# Fix version string in extensions or else they don't get accepted
-	# by the virtualbox host process (see bug #438930)
-	find ExtensionPacks -type f -name "ExtPack.xml" -exec sed -i '/Version/s@_Gentoo@@' {} \+ || die
-
-	local extensions_dir="${vbox_inst_path}/ExtensionPacks"
-
-	if use vnc; then
-		insinto ${extensions_dir}
-		doins -r ExtensionPacks/VNC
-	fi
-
-	if use dtrace; then
-		insinto ${extensions_dir}
-		doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
-	fi
-
-	if use doc; then
-		dodoc UserManual.pdf UserManual.q{ch,hc}
-		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
-	elif use gui; then
-		dodoc "${WORKDIR}"/${MY_PN}-help-${ORIGIN_PV}/UserManual.q{ch,hc}
-		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
-	fi
-	dodoc ${PATCHES_DIR}/README.*
-
-	if use python; then
-		local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.so"
-		if [[ ! -x "${python_path_ext}" ]]; then
-			eerror "Couldn't find ${python_path_ext}! Bindings were requested with USE=python"
-			eerror "but none were installed. This may happen if support for a Python target"
-			eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles."
-			die "Incomplete installation of Python bindings! File a bug with Gentoo!"
-		fi
-
-		# 378871
-		local installer_dir="${ED}/usr/$(get_libdir)/virtualbox/sdk/installer"
-		pushd "${installer_dir}" &> /dev/null || die
-		sed -e "s;%VBOX_INSTALL_PATH%;${vbox_inst_path};" \
-			-e "s;%VBOX_SDK_PATH%;${vbox_inst_path}/sdk;" \
-			-i vboxapi/__init__.py || die
-		# insert shebang, the files come without one
-		find vboxapi -name \*.py -exec sed -e "1 i\#! ${PYTHON}" -i {} \+ || die
-		python_domodule vboxapi
-		popd &> /dev/null || die
-		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}"/${MY_PN}-vboxusb_tmpfilesd virtualbox-vboxusb.conf
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-
-	if use udev; then
-		udev_reload
-		udevadm trigger --subsystem-match=usb
-	fi
-
-	tmpfiles_process virtualbox-vboxusb.conf
-
-	if use gui; then
-		elog "To launch VirtualBox just type: \"virtualbox\"."
-	fi
-
-	elog "You must be in the vboxusers group to use VirtualBox."
-	elog ""
-	elog "The latest user manual is available for download at:"
-	elog "https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/UserManual.pdf"
-	elog ""
-
-	optfeature "Advanced networking setups" net-misc/bridge-utils sys-apps/usermode-utilities
-	optfeature "USB2, USB3, PXE boot, and VRDP support" app-emulation/virtualbox-extpack-oracle
-	optfeature "Guest additions ISO" app-emulation/virtualbox-additions
-
-	if ! use udev; then
-		ewarn "Without USE=udev, USB devices will likely not work in ${MY_PN}."
-	fi
-}
-
-pkg_postrm() {
-	xdg_pkg_postrm
-
-	use udev && udev_reload
-}


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/
@ 2024-06-17 15:25 Viorel Munteanu
  0 siblings, 0 replies; 24+ messages in thread
From: Viorel Munteanu @ 2024-06-17 15:25 UTC (permalink / raw
  To: gentoo-commits

commit:     f2ecc1ba846711e6491a365c7bbd42f1b264f7cc
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 17 15:07:13 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Mon Jun 17 15:25:07 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2ecc1ba

app-emulation/virtualbox-kvm: drop 9999

The live ebuild is pointless; upstream only commits to github when
tagging a new release.

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox-kvm/Manifest              |   2 -
 .../virtualbox-kvm-7.0.18_pre20240617.ebuild       |  26 +-
 .../virtualbox-kvm/virtualbox-kvm-9999.ebuild      | 768 ---------------------
 3 files changed, 6 insertions(+), 790 deletions(-)

diff --git a/app-emulation/virtualbox-kvm/Manifest b/app-emulation/virtualbox-kvm/Manifest
index 998dffe2e136..6df664b861f1 100644
--- a/app-emulation/virtualbox-kvm/Manifest
+++ b/app-emulation/virtualbox-kvm/Manifest
@@ -1,6 +1,4 @@
-DIST VirtualBox-7.0.16.tar.bz2 170897951 BLAKE2B 6b436c38df632222621723db94677a0efef5de2ac1eacec73571bc658955f23fff347fa60c37ec78c58bf94b82b8f9a95fb26c07ef4becc7e9f535af069151f5 SHA512 1b8ba08bec144cbd1f2e9aa0929cdf60a0b99930f1dd80567094fba75097d87661aef3da2cc24f4abff6b6db8f186e251c5f693a2a93943cc39909d5f1e1bce5
 DIST VirtualBox-7.0.18.tar.bz2 173295159 BLAKE2B 1371d54d648aafbad3814d55d495836ce7a6f9ca955aeb71e24c57a27ed8acae8c020b8094ca7386d341d5e7460b9b0823cc01e7e69dd3cdadaadee1bc608bd1 SHA512 e78a18fa808152cbdc1d407751acf3f57a8202bf238ad3432c4f0b0f97ab203e915a6cd11619e64f4aca5b907eb72be67bab146869af0e73414144addf0d76b4
-DIST virtualbox-help-7.0.16.tar.xz 3948696 BLAKE2B 5c5937313ea0e5cb4764b8a61fd1587e88a4afc965ef00862c5a265a15253929d35e0635231b6be5656f26f600bc4b70a2fa2ebc0f33b35d35c184b57e5acef8 SHA512 b9baca57118a82e3489c8445f0988671f16f75de60cc2d929d5e3b0c4c9e3ceacd796a72a81bba88d69eb4b4559835a13775c18d7782ae7dbe8ad202e247db0c
 DIST virtualbox-help-7.0.18.tar.xz 3948116 BLAKE2B 5715a7e609297387b5fccce0951c62e5969fd68adeecb869712e69f5e90daef97384bd3ff3c39de40903a1fabe7ac6d2f8ecdbb40de16abe955d40e49b962eec SHA512 ec0f915b7221bc40d02f5f1675eb0defb5506b2f2bd96c063a96a9346e1c82428ccdda8b3adac43238c451ae185ac31af4a186da17ffe091469e14e696388b3a
 DIST virtualbox-kvm-7.0.18_pre20240617.tar.gz 131620 BLAKE2B 88f22665c1f774f4799f17777541fb1dd48a6d65f170bd998516f32fa0d84a2b1b18f7ecfcf53dc5365614b7c5b35f9c29ce69be59d475a53cbe8a7ee591f522 SHA512 c3d331bee135c746947735b483ec69536c2b7dfd19049d45212144da5eb952f67081b35a7a874eb3f4a0a611fa617f5d62566a89d2e4c1e4863657f80abd3af5
 DIST virtualbox-patches-7.0.16.tar.bz2 6808 BLAKE2B d15fa2ca306375142c3e25d4759d2790b2bb9eb69e333a8773ad500b29dd127b401943abf59ca59d01858a3ed5551fb3a6c93c4c893c8de971a714ce5306d577 SHA512 a488cbc6660fe8637c44cd79d87156609af089988239a7e76fea8a3c7e6319512c574bef2e942b354b14ce671a8e75ab8b2160abf7c40963795ee8a545ecd992

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.18_pre20240617.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.18_pre20240617.ebuild
index ac06a5a18c63..66f1c7223292 100644
--- a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.18_pre20240617.ebuild
+++ b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.18_pre20240617.ebuild
@@ -22,28 +22,19 @@ inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature p
 
 PATCHES_PV="7.0.16"
 ORIGIN_PN="VirtualBox"
-ORIGIN_PV=${PATCHES_PV}
+ORIGIN_PV=${PV%_pre*}
 
 MY_PN=virtualbox
 MY_PV=${PV#*_pre}
+MY_P=${ORIGIN_PN}-${ORIGIN_PV}
 
-PATCHES_DIR="${WORKDIR}"/${PN}-${MY_PV}
+PATCHES_DIR="${WORKDIR}"/${PN}-dev-${MY_PV}
 
 DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
 HOMEPAGE="https://www.virtualbox.org/ https://github.com/cyberus-technology/virtualbox-kvm"
-SRC_URI="https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2"
-if [[ ${PV} == *9999* ]]; then
-	inherit git-r3
-
-	ORIGIN_PV=${PATCHES_PV}
-	EGIT_REPO_URI="https://github.com/cyberus-technology/virtualbox-kvm"
-else
-	ORIGIN_PV=${PV%_pre*}
-	PATCHES_DIR="${WORKDIR}"/${PN}-dev-${MY_PV}
-	SRC_URI+=" https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz"
-fi
-MY_P=${ORIGIN_PN}-${ORIGIN_PV}
-SRC_URI+="
+SRC_URI="
+	https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2
+	https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz
 	https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/${MY_P}.tar.bz2
 	gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${MY_PN}/${MY_PN}-help-${ORIGIN_PV}.tar.xz ) )
 "
@@ -239,11 +230,6 @@ pkg_setup() {
 	use python && python-single-r1_pkg_setup
 }
 
-src_unpack() {
-	[[ ${PV} == *9999* ]] && git-r3_src_unpack
-	default
-}
-
 src_prepare() {
 	default
 

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild
deleted file mode 100644
index f501f05d7084..000000000000
--- a/app-emulation/virtualbox-kvm/virtualbox-kvm-9999.ebuild
+++ /dev/null
@@ -1,768 +0,0 @@
-# Copyright 2022-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# To add a new Python here:
-# 1. Patch src/libs/xpcom18a4/python/Makefile.kmk (copy the previous impl's logic)
-#    Do NOT skip this part. It'll end up silently not-building the Python extension
-#    or otherwise misbehaving if you do.
-#
-# 2. Then update PYTHON_COMPAT & set PYTHON_SINGLE_TARGET for testing w/ USE=python.
-#
-#  May need to look at other distros (e.g. Arch Linux) to find patches for newer
-#  Python versions as upstream tends to lag. Upstream may have patches on their
-#  trunk branch but not release branch.
-#
-#  See bug #785835, bug #856121.
-PYTHON_COMPAT=( python3_{10..11} )
-
-inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \
-	python-single-r1 tmpfiles toolchain-funcs udev xdg
-
-PATCHES_PV="7.0.16"
-ORIGIN_PN="VirtualBox"
-ORIGIN_PV=${PATCHES_PV}
-
-MY_PN=virtualbox
-MY_PV=${PV#*_pre}
-
-PATCHES_DIR="${WORKDIR}"/${PN}-${MY_PV}
-
-DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
-HOMEPAGE="https://www.virtualbox.org/ https://github.com/cyberus-technology/virtualbox-kvm"
-SRC_URI="https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2"
-if [[ ${PV} == *9999* ]]; then
-	inherit git-r3
-
-	ORIGIN_PV=${PATCHES_PV}
-	EGIT_REPO_URI="https://github.com/cyberus-technology/virtualbox-kvm"
-else
-	ORIGIN_PV=${PV%_pre*}
-	PATCHES_DIR="${WORKDIR}"/${PN}-dev-${MY_PV}
-	SRC_URI+=" https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz"
-fi
-MY_P=${ORIGIN_PN}-${ORIGIN_PV}
-SRC_URI+="
-	https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/${MY_P}.tar.bz2
-	gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${MY_PN}/${MY_PN}-help-${ORIGIN_PV}.tar.xz ) )
-"
-S="${WORKDIR}/${ORIGIN_PN}-${ORIGIN_PV}"
-
-LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
-SLOT="0"
-IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde vnc"
-
-unset WATCOM #856769
-
-COMMON_DEPEND="
-	${PYTHON_DEPS}
-	acct-group/vboxusers
-	dev-libs/libtpms
-	dev-libs/libxml2
-	dev-libs/openssl:0=
-	media-libs/libpng:0=
-	media-libs/libvpx:0=
-	net-misc/curl
-	sys-libs/zlib
-	dbus? ( sys-apps/dbus )
-	gui? (
-		dev-qt/qtcore:5
-		dev-qt/qtdbus:5
-		dev-qt/qtgui:5
-		dev-qt/qthelp:5
-		dev-qt/qtprintsupport:5
-		dev-qt/qtwidgets:5
-		dev-qt/qtx11extras:5
-		dev-qt/qtxml:5
-		x11-libs/libX11
-		x11-libs/libXt
-		opengl? ( dev-qt/qtopengl:5 )
-	)
-	lvm? ( sys-fs/lvm2 )
-	opengl? (
-		media-libs/libglvnd[X]
-		media-libs/vulkan-loader
-		x11-libs/libX11
-		x11-libs/libXt
-	)
-	pam? ( sys-libs/pam )
-	sdl? (
-		media-libs/libsdl2[X,video]
-		x11-libs/libX11
-		x11-libs/libXcursor
-		x11-libs/libXt
-	)
-	vboxwebsrv? ( net-libs/gsoap[-gnutls(-),debug?] )
-	vde? ( net-misc/vde )
-	vnc? ( >=net-libs/libvncserver-0.9.9 )
-"
-# We're stuck on JDK (and JRE, I guess?) 1.8 because of need for wsimport
-# with USE="vboxwebsrv java". Note that we have to put things in DEPEND,
-# not (only, anyway) BDEPEND, as the eclass magic to set the environment variables
-# based on *DEPEND doesn't work for BDEPEND at least right now.
-#
-# There's a comment in Config.kmk about it
-# ("With Java 11 wsimport was removed, usually part of a separate install now.")
-# but it needs more investigation.
-#
-# See bug #878299 to track this issue.
-DEPEND="
-	${COMMON_DEPEND}
-	>=dev-libs/libxslt-1.1.19
-	virtual/libcrypt:=
-	alsa? ( >=media-libs/alsa-lib-1.0.13 )
-	gui? (
-		x11-base/xorg-proto
-		x11-libs/libxcb:=
-		x11-libs/libXcursor
-		x11-libs/libXext
-		x11-libs/libXinerama
-		x11-libs/libXmu
-		x11-libs/libXrandr
-	)
-	java? ( virtual/jdk:1.8 )
-	opengl? (
-		x11-base/xorg-proto
-		x11-libs/libXcursor
-		x11-libs/libXinerama
-		x11-libs/libXmu
-		x11-libs/libXrandr
-		virtual/glu
-	)
-	sdl? ( x11-libs/libXinerama )
-	pulseaudio? ( media-libs/libpulse )
-	udev? ( >=virtual/udev-171 )
-"
-RDEPEND="
-	!app-emulation/virtualbox
-	${COMMON_DEPEND}
-	gui? ( x11-libs/libxcb:= )
-	java? ( virtual/jre:1.8 )
-"
-BDEPEND="
-	${PYTHON_DEPS}
-	>=app-arch/tar-1.34-r2
-	>=dev-lang/yasm-0.6.2
-	dev-libs/libIDL
-	dev-util/glslang
-	>=dev-build/kbuild-0.1.9998.3592
-	sys-apps/which
-	sys-devel/bin86
-	sys-libs/libcap
-	sys-power/iasl
-	virtual/pkgconfig
-	doc? (
-		app-text/docbook-sgml-dtd:4.4
-		app-text/docbook-xsl-ns-stylesheets
-		dev-texlive/texlive-basic
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-latexrecommended
-		dev-texlive/texlive-latexextra
-		dev-texlive/texlive-fontsrecommended
-		dev-texlive/texlive-fontsextra
-		dev-qt/qthelp:5
-	)
-	gui? ( dev-qt/linguist-tools:5 )
-	nls? ( dev-qt/linguist-tools:5 )
-	java? ( virtual/jdk:1.8 )
-"
-
-QA_FLAGS_IGNORED="
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
-"
-
-QA_TEXTRELS="
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-"
-
-QA_EXECSTACK="
-	usr/lib64/virtualbox/iPxeBaseBin
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.debug
-"
-
-QA_WX_LOAD="
-	usr/lib64/virtualbox/iPxeBaseBin
-"
-
-QA_PRESTRIPPED="
-	usr/lib64/virtualbox/VMMR0.r0
-	usr/lib64/virtualbox/VBoxDDR0.r0
-	usr/lib64/virtualbox/ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack/linux.amd64/VBoxDTraceR0.r0
-"
-
-REQUIRED_USE="
-	java? ( sdk )
-	python? ( sdk )
-	vboxwebsrv? ( java )
-	${PYTHON_REQUIRED_USE}
-"
-
-PATCHES=(
-	# Downloaded patchset
-	"${WORKDIR}"/virtualbox-patches-${PATCHES_PV}/patches
-	"${PATCHES_DIR}"/patches
-)
-
-pkg_pretend() {
-	if ! use gui; then
-		einfo "No USE=\"gui\" selected, this build will not include any Qt frontend."
-	fi
-
-	if ! use opengl; then
-		einfo "No USE=\"opengl\" selected, this build will lack"
-		einfo "the OpenGL feature."
-	fi
-	if ! use python; then
-		einfo "You have disabled the \"python\" USE flag. This will only"
-		einfo "disable the python bindings being installed."
-	fi
-	if ! use nls && use gui; then
-		einfo "USE=\"gui\" also selects USE=\"nls\".  This build"
-		einfo "will have NLS support."
-	fi
-
-	# 749273
-	local d=${ROOT}
-	for i in usr "$(get_libdir)"; do
-		d="${d}/$i"
-		if [[ "$(stat -L -c "%g %u" "${d}")" != "0 0" ]]; then
-			die "${d} should be owned by root, VirtualBox will not start otherwise"
-		fi
-	done
-}
-
-pkg_setup() {
-	java-pkg-opt-2_pkg_setup
-	python-single-r1_pkg_setup
-}
-
-src_unpack() {
-	[[ ${PV} == *9999* ]] && git-r3_src_unpack
-	default
-}
-
-src_prepare() {
-	default
-
-	# Only add nopie patch when we're on hardened
-	if gcc-specs-pie; then
-		eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch
-	fi
-
-	# Remove shipped binaries (kBuild, yasm) and tools, see bug #232775
-	rm -r kBuild/bin || die
-	# Remove everything in tools except kBuildUnits
-	find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || die
-
-	# Disable things unused or split into separate ebuilds
-	sed -e "s@MY_LIBDIR@$(get_libdir)@" \
-		"${FILESDIR}"/${MY_PN}-5-localconfig > LocalConfig.kmk || die
-
-	if ! use pch; then
-		# bug #753323
-		printf '\n%s\n' "VBOX_WITHOUT_PRECOMPILED_HEADERS=1" \
-			>> LocalConfig.kmk || die
-	fi
-
-	# bug #916002, #488176
-	tc-ld-force-bfd
-
-	# Respect LDFLAGS
-	sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
-		-i Config.kmk src/libs/xpcom18a4/Config.kmk || die
-
-	# Do not use hard-coded ld (related to bug #488176)
-	sed -e '/QUIET)ld /s@ld @$(LD) @' \
-		-i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
-
-	# Use PAM only when pam USE flag is enbaled (bug #376531)
-	if ! use pam; then
-		einfo "Disabling PAM removes the possibility to use the VRDP features."
-		sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
-		sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
-			src/VBox/HostServices/Makefile.kmk || die
-		echo -e "\nIPRT_WITHOUT_PAM=1" >> LocalConfig.kmk || die
-	fi
-
-	# add correct java path
-	if use java; then
-		sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
-			-i "${S}"/Config.kmk || die
-		java-pkg-opt-2_src_prepare
-	fi
-
-	#856811 #864274
-	# cannot filter out only one flag, some combinations of these flags produce buggy executables
-	for i in abm avx avx2 bmi bmi2 fma fma4 popcnt; do
-		append-cflags $(test-flags-CC -mno-$i)
-		append-cxxflags $(test-flags-CXX -mno-$i)
-	done
-
-	# bug #908814
-	filter-lto
-
-	# bug #843437
-	cat >> LocalConfig.kmk <<-EOF || die
-		CXXFLAGS=${CXXFLAGS}
-		CFLAGS=${CFLAGS}
-	EOF
-
-	if use sdl; then
-		sed -i 's/sdl-config/sdl2-config/' configure || die
-		echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
-	fi
-
-	#443830
-	echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die
-
-	if tc-is-clang; then
-		# clang assembler chokes on comments starting with /
-		sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
-
-		# clang does not support this extension
-		eapply "${FILESDIR}"/${MY_PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
-	fi
-
-	# fix doc generation
-	echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die
-	# replace xhtml names with numeric equivalents
-	find doc/manual -name \*.xml -exec sed -i \
-		-e 's/&nbsp;/\&#160;/g' \
-		-e 's/&ndash;/\&#8211;/g' \
-		-e 's/&larr;/\&#8592;/g' \
-		-e 's/&rarr;/\&#8594;/g' \
-		-e 's/&harr;/\&#8596;/g' {} \+ || die
-
-	# fix help path #891879
-	echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die
-
-	# 489208
-	# Cannot patch the whole text, many translations.  Use sed instead to replace the command
-	find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \
-		's/&apos;[^&]*\(vboxdrv setup\|vboxconfig\)&apos;/\&apos;emerge -1 virtualbox-modules\&apos;/' {} \+ || die
-	sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \
-		src/VBox/Frontends/VirtualBox/src/main.cpp \
-		src/VBox/VMM/VMMR3/VM.cpp || die
-
-	# 890561
-	echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
-
-	if ! use nls && ! use gui; then
-		cat >> LocalConfig.kmk <<-EOF || die
-			VBOX_WITH_NLS :=
-			VBOX_WITH_MAIN_NLS :=
-			VBOX_WITH_PUEL_NLS :=
-			VBOX_WITH_VBOXMANAGE_NLS :=
-		EOF
-	fi
-}
-
-src_configure() {
-	tc-export AR CC CXX LD RANLIB
-	export HOST_CC="$(tc-getBUILD_CC)"
-
-	local myconf=(
-		--with-gcc="$(tc-getCC)"
-		--with-g++="$(tc-getCXX)"
-
-		--disable-kmods
-		--with-kvm
-
-		# this is required for kvm to work.
-		# also this prohibits installation with suid.
-		--disable-hardening
-
-		$(usev !alsa --disable-alsa)
-		$(usev !dbus --disable-dbus)
-		$(usev debug --build-debug)
-		$(usev !doc --disable-docs)
-		$(usev !java --disable-java)
-		$(usev !lvm --disable-devmapper)
-		$(usev !pulseaudio --disable-pulse)
-		$(usev !python --disable-python)
-		$(usev vboxwebsrv --enable-webservice)
-		$(usev vde --enable-vde)
-		$(usev vnc --enable-vnc)
-	)
-
-	if use gui || use sdl || use opengl; then
-		myconf+=(
-			$(usev !opengl --disable-opengl)
-			$(usev !gui --disable-qt)
-			$(usev !sdl --disable-sdl)
-		)
-	else
-		myconf+=(
-			--build-headless
-		)
-	fi
-
-	if use amd64 && ! has_multilib_profile; then
-		myconf+=( --disable-vmmraw )
-	fi
-
-	# not an autoconf script
-	edo ./configure "${myconf[@]}"
-
-	# Force usage of chosen Python implementation
-	# bug #856121, bug #785835
-	sed -i \
-		-e '/VBOX_WITH_PYTHON.*=/d' \
-		-e '/VBOX_PATH_PYTHON_INC.*=/d' \
-		-e '/VBOX_LIB_PYTHON.*=/d' \
-		AutoConfig.kmk || die
-
-	cat >> AutoConfig.kmk <<-EOF || die
-		VBOX_WITH_PYTHON=$(usev python 1)
-		VBOX_PATH_PYTHON_INC=$(python_get_includedir)
-		VBOX_LIB_PYTHON=$(python_get_library_path)
-	EOF
-
-	if use python; then
-		local mangled_python="${EPYTHON#python}"
-		mangled_python="${mangled_python/.}"
-
-		# Stub out the script which defines what the Makefile ends up
-		# building for. gen_python_deps.py gets called by the Makefile
-		# with some args and it spits out a bunch of paths for a hardcoded
-		# list of Pythons. We just override it with what we're actually using.
-		# This minimises the amount of patching we have to do for new Pythons.
-		cat > src/libs/xpcom18a4/python/gen_python_deps.py <<-EOF || die
-			print("VBOX_PYTHON${mangled_python}_INC=$(python_get_includedir)")
-			print("VBOX_PYTHON${mangled_python}_LIB=$(python_get_library_path)")
-			print("VBOX_PYTHONDEF_INC=$(python_get_includedir)")
-			print("VBOX_PYTHONDEF_LIB=$(python_get_library_path)")
-		EOF
-
-		chmod +x src/libs/xpcom18a4/python/gen_python_deps.py || die
-	fi
-}
-
-src_compile() {
-	source ./env.sh || die
-
-	# Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
-	MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
-	MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
-	MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
-
-	local myemakeargs=(
-		VBOX_BUILD_PUBLISHER=_Gentoo
-		VBOX_WITH_VBOXIMGMOUNT=1
-
-		KBUILD_VERBOSE=2
-
-		AS="$(tc-getCC)"
-		CC="$(tc-getCC)"
-		CXX="$(tc-getCXX)"
-
-		TOOL_GCC3_CC="$(tc-getCC)"
-		TOOL_GCC3_LD="$(tc-getCC)"
-		TOOL_GCC3_AS="$(tc-getCC)"
-		TOOL_GCC3_AR="$(tc-getAR)"
-		TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
-
-		TOOL_GXX3_CC="$(tc-getCC)"
-		TOOL_GXX3_CXX="$(tc-getCXX)"
-		TOOL_GXX3_LD="$(tc-getCXX)"
-		TOOL_GXX3_AS="$(tc-getCXX)"
-		TOOL_GXX3_AR="$(tc-getAR)"
-		TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
-
-		TOOL_GCC3_CFLAGS="${CFLAGS}"
-		TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
-		VBOX_GCC_OPT="${CXXFLAGS}"
-		VBOX_NM="$(tc-getNM)"
-
-		TOOL_YASM_AS=yasm
-	)
-
-	if use amd64 && has_multilib_profile; then
-		myemakeargs+=(
-			CC32="$(tc-getCC) -m32"
-			CXX32="$(tc-getCXX) -m32"
-
-			TOOL_GCC32_CC="$(tc-getCC) -m32"
-			TOOL_GCC32_CXX="$(tc-getCXX) -m32"
-			TOOL_GCC32_LD="$(tc-getCC) -m32"
-			TOOL_GCC32_AS="$(tc-getCC) -m32"
-			TOOL_GCC32_AR="$(tc-getAR)"
-			TOOL_GCC32_OBJCOPY="$(tc-getOBJCOPY)"
-
-			TOOL_GXX32_CC="$(tc-getCC) -m32"
-			TOOL_GXX32_CXX="$(tc-getCXX) -m32"
-			TOOL_GXX32_LD="$(tc-getCXX) -m32"
-			TOOL_GXX32_AS="$(tc-getCXX) -m32"
-			TOOL_GXX32_AR="$(tc-getAR)"
-			TOOL_GXX32_OBJCOPY="$(tc-getOBJCOPY)"
-		)
-	fi
-
-	MAKE="kmk" emake "${myemakeargs[@]}" all
-}
-
-src_install() {
-	cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
-
-	local vbox_inst_path="/usr/$(get_libdir)/${MY_PN}" each size ico icofile
-
-	vbox_inst() {
-		local binary="${1}"
-		local perms="${2:-0750}"
-		local path="${3:-${vbox_inst_path}}"
-
-		[[ -n "${binary}" ]] || die "vbox_inst: No binary given!"
-		[[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
-
-		insinto ${path}
-		doins ${binary}
-		fowners root:vboxusers ${path}/${binary}
-		fperms ${perms} ${path}/${binary}
-	}
-
-	# Create configuration files
-	insinto /etc/vbox
-	newins "${FILESDIR}/${MY_PN}-4-config" vbox.cfg
-
-	# Set the correct libdir
-	sed \
-		-e "s@MY_LIBDIR@$(get_libdir)@" \
-		-i "${ED}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
-
-	# Install the wrapper script
-	exeinto ${vbox_inst_path}
-	newexe "${FILESDIR}/${MY_PN}-ose-6-wrapper" "VBox"
-	fowners root:vboxusers ${vbox_inst_path}/VBox
-	fperms 0750 ${vbox_inst_path}/VBox
-
-	# Install binaries and libraries
-	insinto ${vbox_inst_path}
-	doins -r components
-
-	for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,VMMPreload,XPCOMIPCD} \
-		vboximg-mount vbox-img *so *r0; do
-		vbox_inst ${each}
-	done
-
-	# These binaries need to be suid root.
-	for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
-		vbox_inst ${each} 0750
-	done
-
-	# Install EFI Firmware files (bug #320757)
-	for each in VBoxEFI{32,64}.fd ; do
-		vbox_inst ${each} 0644
-	done
-
-	# VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
-	# VBoxXPCOMIPCD (bug #524202)
-	for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
-		pax-mark -m "${ED}"${vbox_inst_path}/${each}
-	done
-
-	# Symlink binaries to the shipped wrapper
-	for each in vbox{autostart,balloonctrl,bugreport,headless,manage} \
-		VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-	done
-	dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount
-	dosym ${vbox_inst_path}/vbox-img /usr/bin/vbox-img
-
-	if use pam; then
-		# VRDPAuth only works with this (bug #351949)
-		dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
-	fi
-
-	# set an env-variable for 3rd party tools
-	echo "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
-	# environment variables used during SDK binding installation
-	echo "VBOX_SDK_PATH=${vbox_inst_path}/sdk" >> "${T}/90virtualbox"
-	echo "VBOX_INSTALL_PATH=${vbox_inst_path}" >> "${T}/90virtualbox"
-	doenvd "${T}/90virtualbox"
-
-	if use sdl; then
-		vbox_inst VBoxSDL 0750
-		pax-mark -m "${ED}"${vbox_inst_path}/VBoxSDL
-
-		for each in vboxsdl VBoxSDL ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-		done
-	fi
-
-	if use gui; then
-		vbox_inst VirtualBox
-		vbox_inst VirtualBoxVM 0750
-		for each in VirtualBox{,VM} ; do
-			pax-mark -m "${ED}"${vbox_inst_path}/${each}
-		done
-
-		if use opengl; then
-			vbox_inst VBoxTestOGL
-			pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
-		fi
-
-		for each in virtualbox{,vm} VirtualBox{,VM} ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-		done
-
-		insinto /usr/share/${PN}
-		doins -r nls
-		doins -r UnattendedTemplates
-
-		newmenu ${MY_PN}.desktop ${PN}.desktop
-
-		pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
-		for size in 16 32 48 64 128 ; do
-			newicon -s ${size} ${MY_PN}-${size}px.png ${PN}.png
-		done
-		newicon ${MY_PN}-48px.png ${PN}.png
-		newicon -s scalable ${MY_PN}.svg ${PN}.png
-		popd &>/dev/null || die
-		pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
-		for size in 16 24 32 48 64 72 96 128 256 512 ; do
-			for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
-				icofile="${MY_PN}-${ico}-${size}px.png"
-				if [[ -f "${icofile}" ]]; then
-					newicon -s ${size} ${icofile} ${MY_PN}-${ico}.png
-				fi
-			done
-		done
-		popd &>/dev/null || die
-	fi
-
-	if use lvm; then
-		vbox_inst VBoxVolInfo 0750
-		dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
-	fi
-
-	if use sdk; then
-		insinto ${vbox_inst_path}
-		doins -r sdk
-
-		if use java; then
-			java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
-			java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
-		fi
-	fi
-
-	if use udev; then
-		local udevdir="$(get_udevdir)"
-		local udev_file="VBoxCreateUSBNode.sh"
-		local rules_file="10-virtualbox.rules"
-
-		insinto ${udevdir}
-		doins ${udev_file}
-		fowners root:vboxusers ${udevdir}/${udev_file}
-		fperms 0750 ${udevdir}/${udev_file}
-
-		insinto ${udevdir}/rules.d
-		sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \
-			> "${T}"/${rules_file} || die
-		doins "${T}"/${rules_file}
-	fi
-
-	if use vboxwebsrv; then
-		vbox_inst vboxwebsrv
-		dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
-		newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
-		newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
-	fi
-
-	# Remove dead symlinks (bug #715338)
-	find "${ED}"/usr/$(get_libdir)/${MY_PN} -xtype l -delete || die
-
-	# Fix version string in extensions or else they don't get accepted
-	# by the virtualbox host process (see bug #438930)
-	find ExtensionPacks -type f -name "ExtPack.xml" -exec sed -i '/Version/s@_Gentoo@@' {} \+ || die
-
-	local extensions_dir="${vbox_inst_path}/ExtensionPacks"
-
-	if use vnc; then
-		insinto ${extensions_dir}
-		doins -r ExtensionPacks/VNC
-	fi
-
-	if use dtrace; then
-		insinto ${extensions_dir}
-		doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
-	fi
-
-	if use doc; then
-		dodoc UserManual.pdf UserManual.q{ch,hc}
-		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
-	elif use gui; then
-		dodoc "${WORKDIR}"/${MY_PN}-help-${ORIGIN_PV}/UserManual.q{ch,hc}
-		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
-	fi
-	dodoc ${PATCHES_DIR}/README.*
-
-	if use python; then
-		local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.so"
-		if [[ ! -x "${python_path_ext}" ]]; then
-			eerror "Couldn't find ${python_path_ext}! Bindings were requested with USE=python"
-			eerror "but none were installed. This may happen if support for a Python target"
-			eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles."
-			die "Incomplete installation of Python bindings! File a bug with Gentoo!"
-		fi
-
-		# 378871
-		local installer_dir="${ED}/usr/$(get_libdir)/virtualbox/sdk/installer"
-		pushd "${installer_dir}" &> /dev/null || die
-		sed -e "s;%VBOX_INSTALL_PATH%;${vbox_inst_path};" \
-			-e "s;%VBOX_SDK_PATH%;${vbox_inst_path}/sdk;" \
-			-i vboxapi/__init__.py || die
-		# insert shebang, the files come without one
-		find vboxapi -name \*.py -exec sed -e "1 i\#! ${PYTHON}" -i {} \+ || die
-		python_domodule vboxapi
-		popd &> /dev/null || die
-		python_doscript vboxshell.py
-
-		# do not install the installer
-		rm -r "${installer_dir}" || die
-	fi
-
-	newtmpfiles "${FILESDIR}"/${MY_PN}-vboxusb_tmpfilesd virtualbox-vboxusb.conf
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-
-	if use udev; then
-		udev_reload
-		udevadm trigger --subsystem-match=usb
-	fi
-
-	tmpfiles_process virtualbox-vboxusb.conf
-
-	if use gui; then
-		elog "To launch VirtualBox just type: \"virtualbox\"."
-	fi
-
-	elog "You must be in the vboxusers group to use VirtualBox."
-	elog ""
-	elog "The latest user manual is available for download at:"
-	elog "https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/UserManual.pdf"
-	elog ""
-
-	optfeature "Advanced networking setups" net-misc/bridge-utils sys-apps/usermode-utilities
-	optfeature "USB2, USB3, PXE boot, and VRDP support" app-emulation/virtualbox-extpack-oracle
-	optfeature "Guest additions ISO" app-emulation/virtualbox-additions
-
-	if ! use udev; then
-		ewarn "Without USE=udev, USB devices will likely not work in ${MY_PN}."
-	fi
-}
-
-pkg_postrm() {
-	xdg_pkg_postrm
-
-	use udev && udev_reload
-}


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/
@ 2024-06-17 15:25 Viorel Munteanu
  0 siblings, 0 replies; 24+ messages in thread
From: Viorel Munteanu @ 2024-06-17 15:25 UTC (permalink / raw
  To: gentoo-commits

commit:     4c5b6adf41b150d109fac81b0cbd5f2093ef31ad
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 17 15:05:13 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Mon Jun 17 15:25:06 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c5b6adf

app-emulation/virtualbox-kvm: add 7.0.18_pre20240617

Add new release from upstream.
Enable hardening by default (upstream added a patch for this).
Add features from app-emulation/virtualbox: python decoupling and vmmraw
use flag.

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox-kvm/Manifest              |   1 +
 app-emulation/virtualbox-kvm/metadata.xml          |   2 +
 .../virtualbox-kvm-7.0.18_pre20240617.ebuild       | 767 +++++++++++++++++++++
 3 files changed, 770 insertions(+)

diff --git a/app-emulation/virtualbox-kvm/Manifest b/app-emulation/virtualbox-kvm/Manifest
index 71a5a6e444d0..0148c3c44b02 100644
--- a/app-emulation/virtualbox-kvm/Manifest
+++ b/app-emulation/virtualbox-kvm/Manifest
@@ -3,4 +3,5 @@ DIST VirtualBox-7.0.18.tar.bz2 173295159 BLAKE2B 1371d54d648aafbad3814d55d495836
 DIST virtualbox-help-7.0.16.tar.xz 3948696 BLAKE2B 5c5937313ea0e5cb4764b8a61fd1587e88a4afc965ef00862c5a265a15253929d35e0635231b6be5656f26f600bc4b70a2fa2ebc0f33b35d35c184b57e5acef8 SHA512 b9baca57118a82e3489c8445f0988671f16f75de60cc2d929d5e3b0c4c9e3ceacd796a72a81bba88d69eb4b4559835a13775c18d7782ae7dbe8ad202e247db0c
 DIST virtualbox-help-7.0.18.tar.xz 3948116 BLAKE2B 5715a7e609297387b5fccce0951c62e5969fd68adeecb869712e69f5e90daef97384bd3ff3c39de40903a1fabe7ac6d2f8ecdbb40de16abe955d40e49b962eec SHA512 ec0f915b7221bc40d02f5f1675eb0defb5506b2f2bd96c063a96a9346e1c82428ccdda8b3adac43238c451ae185ac31af4a186da17ffe091469e14e696388b3a
 DIST virtualbox-kvm-7.0.18_pre20240515.tar.gz 114604 BLAKE2B 6db426693022c09bce2d562ee2b8f5ef83eec45b2481e45bc62fe1993b5cd93d83c26c248427515a3f7bd5c3e244d79b2b03bfafd7eaf6256796e3384f1c06d9 SHA512 63e07ce15330714508848b489361650b74970c97e964beef7d4ff5f23c2ad53d3f37860c5297ceae4dfc9d198df94d9531882bb1e870e34ec69494882a4db882
+DIST virtualbox-kvm-7.0.18_pre20240617.tar.gz 131620 BLAKE2B 88f22665c1f774f4799f17777541fb1dd48a6d65f170bd998516f32fa0d84a2b1b18f7ecfcf53dc5365614b7c5b35f9c29ce69be59d475a53cbe8a7ee591f522 SHA512 c3d331bee135c746947735b483ec69536c2b7dfd19049d45212144da5eb952f67081b35a7a874eb3f4a0a611fa617f5d62566a89d2e4c1e4863657f80abd3af5
 DIST virtualbox-patches-7.0.16.tar.bz2 6808 BLAKE2B d15fa2ca306375142c3e25d4759d2790b2bb9eb69e333a8773ad500b29dd127b401943abf59ca59d01858a3ed5551fb3a6c93c4c893c8de971a714ce5306d577 SHA512 a488cbc6660fe8637c44cd79d87156609af089988239a7e76fea8a3c7e6319512c574bef2e942b354b14ce671a8e75ab8b2160abf7c40963795ee8a545ecd992

diff --git a/app-emulation/virtualbox-kvm/metadata.xml b/app-emulation/virtualbox-kvm/metadata.xml
index 6f699287abd4..882fbc7b3710 100644
--- a/app-emulation/virtualbox-kvm/metadata.xml
+++ b/app-emulation/virtualbox-kvm/metadata.xml
@@ -7,11 +7,13 @@
   </maintainer>
   <use>
     <flag name="dtrace">Install dtrace Extension Pack</flag>
+    <flag name="hardened">Enable hardening and install binaries SUID</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="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>
   </use>
   <upstream>
     <remote-id type="github">cyberus-technology/virtualbox-kvm</remote-id>

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.18_pre20240617.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.18_pre20240617.ebuild
new file mode 100644
index 000000000000..ac06a5a18c63
--- /dev/null
+++ b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.18_pre20240617.ebuild
@@ -0,0 +1,767 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# To add a new Python here:
+# 1. Patch src/libs/xpcom18a4/python/Makefile.kmk (copy the previous impl's logic)
+#    Do NOT skip this part. It'll end up silently not-building the Python extension
+#    or otherwise misbehaving if you do.
+#
+# 2. Then update PYTHON_COMPAT & set PYTHON_SINGLE_TARGET for testing w/ USE=python.
+#
+#  May need to look at other distros (e.g. Arch Linux) to find patches for newer
+#  Python versions as upstream tends to lag. Upstream may have patches on their
+#  trunk branch but not release branch.
+#
+#  See bug #785835, bug #856121.
+PYTHON_COMPAT=( python3_{10..11} )
+
+inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \
+	python-single-r1 tmpfiles toolchain-funcs udev xdg
+
+PATCHES_PV="7.0.16"
+ORIGIN_PN="VirtualBox"
+ORIGIN_PV=${PATCHES_PV}
+
+MY_PN=virtualbox
+MY_PV=${PV#*_pre}
+
+PATCHES_DIR="${WORKDIR}"/${PN}-${MY_PV}
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/ https://github.com/cyberus-technology/virtualbox-kvm"
+SRC_URI="https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2"
+if [[ ${PV} == *9999* ]]; then
+	inherit git-r3
+
+	ORIGIN_PV=${PATCHES_PV}
+	EGIT_REPO_URI="https://github.com/cyberus-technology/virtualbox-kvm"
+else
+	ORIGIN_PV=${PV%_pre*}
+	PATCHES_DIR="${WORKDIR}"/${PN}-dev-${MY_PV}
+	SRC_URI+=" https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz"
+fi
+MY_P=${ORIGIN_PN}-${ORIGIN_PV}
+SRC_URI+="
+	https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/${MY_P}.tar.bz2
+	gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${MY_PN}/${MY_PN}-help-${ORIGIN_PV}.tar.xz ) )
+"
+S="${WORKDIR}/${ORIGIN_PN}-${ORIGIN_PV}"
+
+LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
+SLOT="0"
+IUSE="alsa dbus debug doc dtrace +gui +hardened java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde +vmmraw vnc"
+
+unset WATCOM #856769
+
+COMMON_DEPEND="
+	acct-group/vboxusers
+	dev-libs/libtpms
+	dev-libs/libxml2
+	dev-libs/openssl:0=
+	media-libs/libpng:0=
+	media-libs/libvpx:0=
+	net-misc/curl
+	sys-libs/zlib
+	dbus? ( sys-apps/dbus )
+	gui? (
+		dev-qt/qtcore:5
+		dev-qt/qtdbus:5
+		dev-qt/qtgui:5
+		dev-qt/qthelp:5
+		dev-qt/qtprintsupport:5
+		dev-qt/qtwidgets:5
+		dev-qt/qtx11extras:5
+		dev-qt/qtxml:5
+		x11-libs/libX11
+		x11-libs/libXt
+		opengl? ( dev-qt/qtopengl:5 )
+	)
+	lvm? ( sys-fs/lvm2 )
+	opengl? (
+		media-libs/libglvnd[X]
+		media-libs/vulkan-loader
+		x11-libs/libX11
+		x11-libs/libXt
+	)
+	pam? ( sys-libs/pam )
+	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 )
+	gui? (
+		x11-base/xorg-proto
+		x11-libs/libxcb:=
+		x11-libs/libXcursor
+		x11-libs/libXext
+		x11-libs/libXinerama
+		x11-libs/libXmu
+		x11-libs/libXrandr
+	)
+	java? ( virtual/jdk:1.8 )
+	opengl? (
+		x11-base/xorg-proto
+		x11-libs/libXcursor
+		x11-libs/libXinerama
+		x11-libs/libXmu
+		x11-libs/libXrandr
+		virtual/glu
+	)
+	sdl? ( x11-libs/libXinerama )
+	pulseaudio? ( media-libs/libpulse )
+	udev? ( >=virtual/udev-171 )
+"
+RDEPEND="
+	!app-emulation/virtualbox
+	${COMMON_DEPEND}
+	gui? ( x11-libs/libxcb:= )
+	java? ( virtual/jre:1.8 )
+"
+BDEPEND="
+	>=app-arch/tar-1.34-r2
+	>=dev-lang/yasm-0.6.2
+	dev-libs/libIDL
+	dev-util/glslang
+	>=dev-build/kbuild-0.1.9998.3592
+	sys-apps/which
+	sys-devel/bin86
+	sys-libs/libcap
+	sys-power/iasl
+	virtual/pkgconfig
+	doc? (
+		app-text/docbook-sgml-dtd:4.4
+		app-text/docbook-xsl-ns-stylesheets
+		dev-texlive/texlive-basic
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-latexrecommended
+		dev-texlive/texlive-latexextra
+		dev-texlive/texlive-fontsrecommended
+		dev-texlive/texlive-fontsextra
+		dev-qt/qthelp:5
+	)
+	gui? ( dev-qt/linguist-tools:5 )
+	nls? ( dev-qt/linguist-tools:5 )
+	java? ( virtual/jdk:1.8 )
+	python? ( ${PYTHON_DEPS} )
+"
+
+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
+	"${PATCHES_DIR}"/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_unpack() {
+	[[ ${PV} == *9999* ]] && git-r3_src_unpack
+	default
+}
+
+src_prepare() {
+	default
+
+	# Only add nopie patch when we're on hardened
+	if gcc-specs-pie; then
+		eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch
+	fi
+
+	# Remove shipped binaries (kBuild, yasm) and tools, see bug #232775
+	rm -r kBuild/bin || die
+	# Remove everything in tools except kBuildUnits
+	find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || die
+
+	# Disable things unused or split into separate ebuilds
+	sed -e "s@MY_LIBDIR@$(get_libdir)@" \
+		"${FILESDIR}"/${MY_PN}-5-localconfig > LocalConfig.kmk || die
+
+	if ! use pch; then
+		# bug #753323
+		printf '\n%s\n' "VBOX_WITHOUT_PRECOMPILED_HEADERS=1" \
+			>> LocalConfig.kmk || die
+	fi
+
+	# bug #916002, #488176
+	tc-ld-force-bfd
+
+	# Respect LDFLAGS
+	sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
+		-i Config.kmk src/libs/xpcom18a4/Config.kmk || die
+
+	# Do not use hard-coded ld (related to bug #488176)
+	sed -e '/QUIET)ld /s@ld @$(LD) @' \
+		-i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
+
+	# Use PAM only when pam USE flag is enbaled (bug #376531)
+	if ! use pam; then
+		einfo "Disabling PAM removes the possibility to use the VRDP features."
+		sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
+		sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
+			src/VBox/HostServices/Makefile.kmk || die
+		echo -e "\nIPRT_WITHOUT_PAM=1" >> LocalConfig.kmk || die
+	fi
+
+	# add correct java path
+	if use java; then
+		sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
+			-i "${S}"/Config.kmk || die
+		java-pkg-opt-2_src_prepare
+	fi
+
+	#856811 #864274
+	# cannot filter out only one flag, some combinations of these flags produce buggy executables
+	for i in abm avx avx2 bmi bmi2 fma fma4 popcnt; do
+		append-cflags $(test-flags-CC -mno-$i)
+		append-cxxflags $(test-flags-CXX -mno-$i)
+	done
+
+	# bug #908814
+	filter-lto
+
+	# bug #843437
+	cat >> LocalConfig.kmk <<-EOF || die
+		CXXFLAGS=${CXXFLAGS}
+		CFLAGS=${CFLAGS}
+	EOF
+
+	if use sdl; then
+		sed -i 's/sdl-config/sdl2-config/' configure || die
+		echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
+	fi
+
+	#443830
+	echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die
+
+	if tc-is-clang; then
+		# clang assembler chokes on comments starting with /
+		sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
+
+		# clang does not support this extension
+		eapply "${FILESDIR}"/${MY_PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
+	fi
+
+	# fix doc generation
+	echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die
+	# replace xhtml names with numeric equivalents
+	find doc/manual -name \*.xml -exec sed -i \
+		-e 's/&nbsp;/\&#160;/g' \
+		-e 's/&ndash;/\&#8211;/g' \
+		-e 's/&larr;/\&#8592;/g' \
+		-e 's/&rarr;/\&#8594;/g' \
+		-e 's/&harr;/\&#8596;/g' {} \+ || die
+
+	# fix help path #891879
+	echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die
+
+	# 489208
+	# Cannot patch the whole text, many translations.  Use sed instead to replace the command
+	find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \
+		's/&apos;[^&]*\(vboxdrv setup\|vboxconfig\)&apos;/\&apos;emerge -1 virtualbox-modules\&apos;/' {} \+ || die
+	sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \
+		src/VBox/Frontends/VirtualBox/src/main.cpp \
+		src/VBox/VMM/VMMR3/VM.cpp || die
+
+	# 890561
+	echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
+
+	if ! use nls && ! use gui; then
+		cat >> LocalConfig.kmk <<-EOF || die
+			VBOX_WITH_NLS :=
+			VBOX_WITH_MAIN_NLS :=
+			VBOX_WITH_PUEL_NLS :=
+			VBOX_WITH_VBOXMANAGE_NLS :=
+		EOF
+	fi
+}
+
+src_configure() {
+	tc-export AR CC CXX LD RANLIB
+	export HOST_CC="$(tc-getBUILD_CC)"
+
+	local myconf=(
+		--with-gcc="$(tc-getCC)"
+		--with-g++="$(tc-getCXX)"
+
+		--disable-kmods
+		--with-kvm
+
+		$(usev !alsa --disable-alsa)
+		$(usev !dbus --disable-dbus)
+		$(usev debug --build-debug)
+		$(usev !doc --disable-docs)
+		$(usev !hardened --disable-hardening)
+		$(usev !java --disable-java)
+		$(usev !lvm --disable-devmapper)
+		$(usev !pulseaudio --disable-pulse)
+		$(usev !python --disable-python)
+		$(usev vboxwebsrv --enable-webservice)
+		$(usev vde --enable-vde)
+		$(usev !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
+		)
+	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_install() {
+	cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
+
+	local vbox_inst_path="/usr/$(get_libdir)/${MY_PN}" each size ico icofile
+
+	vbox_inst() {
+		local binary="${1}"
+		local perms="${2:-0750}"
+		local path="${3:-${vbox_inst_path}}"
+
+		[[ -n "${binary}" ]] || die "vbox_inst: No binary given!"
+		[[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
+
+		insinto ${path}
+		doins ${binary}
+		fowners root:vboxusers ${path}/${binary}
+		fperms ${perms} ${path}/${binary}
+	}
+
+	# Create configuration files
+	insinto /etc/vbox
+	newins "${FILESDIR}/${MY_PN}-4-config" vbox.cfg
+
+	# Set the correct libdir
+	sed \
+		-e "s@MY_LIBDIR@$(get_libdir)@" \
+		-i "${ED}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
+
+	# Install the wrapper script
+	exeinto ${vbox_inst_path}
+	newexe "${FILESDIR}/${MY_PN}-ose-6-wrapper" "VBox"
+	fowners root:vboxusers ${vbox_inst_path}/VBox
+	fperms 0750 ${vbox_inst_path}/VBox
+
+	# Install binaries and libraries
+	insinto ${vbox_inst_path}
+	doins -r components
+
+	for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,VMMPreload,XPCOMIPCD} \
+		vboximg-mount vbox-img *so *r0; do
+		vbox_inst ${each}
+	done
+
+	# These binaries need to be suid root with USE=hardened.
+	local mode=$(usex hardened 4750 0750)
+	for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
+		vbox_inst ${each} ${mode}
+	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 ${mode}
+		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 ${mode}
+		for each in VirtualBox{,VM} ; do
+			pax-mark -m "${ED}"${vbox_inst_path}/${each}
+		done
+
+		if use opengl; then
+			vbox_inst VBoxTestOGL
+			pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
+		fi
+
+		for each in virtualbox{,vm} VirtualBox{,VM} ; do
+			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+		done
+
+		insinto /usr/share/${PN}
+		doins -r nls
+		doins -r UnattendedTemplates
+
+		newmenu ${MY_PN}.desktop ${PN}.desktop
+
+		pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
+		for size in 16 32 48 64 128 ; do
+			newicon -s ${size} ${MY_PN}-${size}px.png ${PN}.png
+		done
+		newicon ${MY_PN}-48px.png ${PN}.png
+		newicon -s scalable ${MY_PN}.svg ${PN}.png
+		popd &>/dev/null || die
+		pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
+		for size in 16 24 32 48 64 72 96 128 256 512 ; do
+			for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
+				icofile="${MY_PN}-${ico}-${size}px.png"
+				if [[ -f "${icofile}" ]]; then
+					newicon -s ${size} ${icofile} ${MY_PN}-${ico}.png
+				fi
+			done
+		done
+		popd &>/dev/null || die
+	fi
+
+	if use lvm; then
+		vbox_inst VBoxVolInfo ${mode}
+		dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
+	fi
+
+	if use sdk; then
+		insinto ${vbox_inst_path}
+		doins -r sdk
+
+		if use java; then
+			java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
+			java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
+		fi
+	fi
+
+	if use udev; then
+		local udevdir="$(get_udevdir)"
+		local udev_file="VBoxCreateUSBNode.sh"
+		local rules_file="10-virtualbox.rules"
+
+		insinto ${udevdir}
+		doins ${udev_file}
+		fowners root:vboxusers ${udevdir}/${udev_file}
+		fperms 0750 ${udevdir}/${udev_file}
+
+		insinto ${udevdir}/rules.d
+		sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \
+			> "${T}"/${rules_file} || die
+		doins "${T}"/${rules_file}
+	fi
+
+	if use vboxwebsrv; then
+		vbox_inst vboxwebsrv
+		dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
+		newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
+		newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
+	fi
+
+	# Remove dead symlinks (bug #715338)
+	find "${ED}"/usr/$(get_libdir)/${MY_PN} -xtype l -delete || die
+
+	# Fix version string in extensions or else they don't get accepted
+	# by the virtualbox host process (see bug #438930)
+	find ExtensionPacks -type f -name "ExtPack.xml" -exec sed -i '/Version/s@_Gentoo@@' {} \+ || die
+
+	local extensions_dir="${vbox_inst_path}/ExtensionPacks"
+
+	if use vnc; then
+		insinto ${extensions_dir}
+		doins -r ExtensionPacks/VNC
+	fi
+
+	if use dtrace; then
+		insinto ${extensions_dir}
+		doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
+	fi
+
+	if use doc; then
+		dodoc UserManual.pdf UserManual.q{ch,hc}
+		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
+	elif use gui; then
+		dodoc "${WORKDIR}"/${MY_PN}-help-${ORIGIN_PV}/UserManual.q{ch,hc}
+		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
+	fi
+	dodoc ${PATCHES_DIR}/README.*
+
+	if use python; then
+		local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.so"
+		if [[ ! -x "${python_path_ext}" ]]; then
+			eerror "Couldn't find ${python_path_ext}! Bindings were requested with USE=python"
+			eerror "but none were installed. This may happen if support for a Python target"
+			eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles."
+			die "Incomplete installation of Python bindings! File a bug with Gentoo!"
+		fi
+
+		# 378871
+		local installer_dir="${ED}/usr/$(get_libdir)/virtualbox/sdk/installer"
+		pushd "${installer_dir}" &> /dev/null || die
+		sed -e "s;%VBOX_INSTALL_PATH%;${vbox_inst_path};" \
+			-e "s;%VBOX_SDK_PATH%;${vbox_inst_path}/sdk;" \
+			-i vboxapi/__init__.py || die
+		# insert shebang, the files come without one
+		find vboxapi -name \*.py -exec sed -e "1 i\#! ${PYTHON}" -i {} \+ || die
+		python_domodule vboxapi
+		popd &> /dev/null || die
+		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}"/${MY_PN}-vboxusb_tmpfilesd virtualbox-vboxusb.conf
+}
+
+pkg_postinst() {
+	xdg_pkg_postinst
+
+	if use udev; then
+		udev_reload
+		udevadm trigger --subsystem-match=usb
+	fi
+
+	tmpfiles_process virtualbox-vboxusb.conf
+
+	if use gui; then
+		elog "To launch VirtualBox just type: \"virtualbox\"."
+	fi
+
+	elog "You must be in the vboxusers group to use VirtualBox."
+	elog ""
+	elog "The latest user manual is available for download at:"
+	elog "https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/UserManual.pdf"
+	elog ""
+
+	optfeature "Advanced networking setups" net-misc/bridge-utils sys-apps/usermode-utilities
+	optfeature "USB2, USB3, PXE boot, and VRDP support" app-emulation/virtualbox-extpack-oracle
+	optfeature "Guest additions ISO" app-emulation/virtualbox-additions
+
+	if ! use udev; then
+		ewarn "Without USE=udev, USB devices will likely not work in ${MY_PN}."
+	fi
+}
+
+pkg_postrm() {
+	xdg_pkg_postrm
+
+	use udev && udev_reload
+}


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/
@ 2024-08-28 14:46 Viorel Munteanu
  0 siblings, 0 replies; 24+ messages in thread
From: Viorel Munteanu @ 2024-08-28 14:46 UTC (permalink / raw
  To: gentoo-commits

commit:     85b448a5dcf69cc3658d47bb64ae1533db70d93f
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 28 14:45:35 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Wed Aug 28 14:46:07 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85b448a5

app-emulation/virtualbox-kvm: add 7.0.20_pre20240828

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox-kvm/Manifest              |   3 +
 .../virtualbox-kvm-7.0.20_pre20240828.ebuild       | 753 +++++++++++++++++++++
 2 files changed, 756 insertions(+)

diff --git a/app-emulation/virtualbox-kvm/Manifest b/app-emulation/virtualbox-kvm/Manifest
index 6df664b861f1..1d234c3cf39b 100644
--- a/app-emulation/virtualbox-kvm/Manifest
+++ b/app-emulation/virtualbox-kvm/Manifest
@@ -1,4 +1,7 @@
 DIST VirtualBox-7.0.18.tar.bz2 173295159 BLAKE2B 1371d54d648aafbad3814d55d495836ce7a6f9ca955aeb71e24c57a27ed8acae8c020b8094ca7386d341d5e7460b9b0823cc01e7e69dd3cdadaadee1bc608bd1 SHA512 e78a18fa808152cbdc1d407751acf3f57a8202bf238ad3432c4f0b0f97ab203e915a6cd11619e64f4aca5b907eb72be67bab146869af0e73414144addf0d76b4
+DIST VirtualBox-7.0.20.tar.bz2 173300021 BLAKE2B 23a1553578c8b89c3bea65fd9a451ef5abf419ce8a05524f2afc15b8d9a378a22ffb01c0c792d258320aeddb330b74f8f769180863041e333512d0eed2f4449c SHA512 7682e24d60c1896c661f2689af6820ae67b6bd8d9faaf18c58e8159bc7694ef80722f8e9611d6272da5b46eb2f3a44fc637b277e6801b7a8bf53aad045a81fe9
 DIST virtualbox-help-7.0.18.tar.xz 3948116 BLAKE2B 5715a7e609297387b5fccce0951c62e5969fd68adeecb869712e69f5e90daef97384bd3ff3c39de40903a1fabe7ac6d2f8ecdbb40de16abe955d40e49b962eec SHA512 ec0f915b7221bc40d02f5f1675eb0defb5506b2f2bd96c063a96a9346e1c82428ccdda8b3adac43238c451ae185ac31af4a186da17ffe091469e14e696388b3a
+DIST virtualbox-help-7.0.20.tar.xz 3949292 BLAKE2B c56f736606fdedfb59bd1f4446a457587dcbe018d1be3162d94eca780cacfa45b49ba5a9c6b25970d28e5a428904bdfd34d2f229c1e24b567fd1b1959cbdc9ea SHA512 e73e448b8aa875d0f6ae1fb398082fa7183e198191a9b509b63592b5df3a19069b805dcdc11d98da3971a14fd6670d8b0a777e5a6d6b63358f7a4f263ca8d31e
 DIST virtualbox-kvm-7.0.18_pre20240617.tar.gz 131620 BLAKE2B 88f22665c1f774f4799f17777541fb1dd48a6d65f170bd998516f32fa0d84a2b1b18f7ecfcf53dc5365614b7c5b35f9c29ce69be59d475a53cbe8a7ee591f522 SHA512 c3d331bee135c746947735b483ec69536c2b7dfd19049d45212144da5eb952f67081b35a7a874eb3f4a0a611fa617f5d62566a89d2e4c1e4863657f80abd3af5
+DIST virtualbox-kvm-7.0.20_pre20240828.tar.gz 130388 BLAKE2B 68589fce348efe37a46d4e6cb28ced18969c5cffbd3dcaf85a4f0a085782521a26b4fe4901bda914a17dc97514df7c2a0548d616830abdb9b279afc1508f6c28 SHA512 3625a069729158e48d0f356d34657b925e235f24af0cd42d01625936b6baf1f16ab11448fb7c82190722e24b81b240b08786154ad26050ed6dff2c69c89e0cd4
 DIST virtualbox-patches-7.0.16.tar.bz2 6808 BLAKE2B d15fa2ca306375142c3e25d4759d2790b2bb9eb69e333a8773ad500b29dd127b401943abf59ca59d01858a3ed5551fb3a6c93c4c893c8de971a714ce5306d577 SHA512 a488cbc6660fe8637c44cd79d87156609af089988239a7e76fea8a3c7e6319512c574bef2e942b354b14ce671a8e75ab8b2160abf7c40963795ee8a545ecd992

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.20_pre20240828.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.20_pre20240828.ebuild
new file mode 100644
index 000000000000..66f1c7223292
--- /dev/null
+++ b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.20_pre20240828.ebuild
@@ -0,0 +1,753 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# To add a new Python here:
+# 1. Patch src/libs/xpcom18a4/python/Makefile.kmk (copy the previous impl's logic)
+#    Do NOT skip this part. It'll end up silently not-building the Python extension
+#    or otherwise misbehaving if you do.
+#
+# 2. Then update PYTHON_COMPAT & set PYTHON_SINGLE_TARGET for testing w/ USE=python.
+#
+#  May need to look at other distros (e.g. Arch Linux) to find patches for newer
+#  Python versions as upstream tends to lag. Upstream may have patches on their
+#  trunk branch but not release branch.
+#
+#  See bug #785835, bug #856121.
+PYTHON_COMPAT=( python3_{10..11} )
+
+inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \
+	python-single-r1 tmpfiles toolchain-funcs udev xdg
+
+PATCHES_PV="7.0.16"
+ORIGIN_PN="VirtualBox"
+ORIGIN_PV=${PV%_pre*}
+
+MY_PN=virtualbox
+MY_PV=${PV#*_pre}
+MY_P=${ORIGIN_PN}-${ORIGIN_PV}
+
+PATCHES_DIR="${WORKDIR}"/${PN}-dev-${MY_PV}
+
+DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
+HOMEPAGE="https://www.virtualbox.org/ https://github.com/cyberus-technology/virtualbox-kvm"
+SRC_URI="
+	https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2
+	https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz
+	https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/${MY_P}.tar.bz2
+	gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${MY_PN}/${MY_PN}-help-${ORIGIN_PV}.tar.xz ) )
+"
+S="${WORKDIR}/${ORIGIN_PN}-${ORIGIN_PV}"
+
+LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
+SLOT="0"
+IUSE="alsa dbus debug doc dtrace +gui +hardened java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde +vmmraw vnc"
+
+unset WATCOM #856769
+
+COMMON_DEPEND="
+	acct-group/vboxusers
+	dev-libs/libtpms
+	dev-libs/libxml2
+	dev-libs/openssl:0=
+	media-libs/libpng:0=
+	media-libs/libvpx:0=
+	net-misc/curl
+	sys-libs/zlib
+	dbus? ( sys-apps/dbus )
+	gui? (
+		dev-qt/qtcore:5
+		dev-qt/qtdbus:5
+		dev-qt/qtgui:5
+		dev-qt/qthelp:5
+		dev-qt/qtprintsupport:5
+		dev-qt/qtwidgets:5
+		dev-qt/qtx11extras:5
+		dev-qt/qtxml:5
+		x11-libs/libX11
+		x11-libs/libXt
+		opengl? ( dev-qt/qtopengl:5 )
+	)
+	lvm? ( sys-fs/lvm2 )
+	opengl? (
+		media-libs/libglvnd[X]
+		media-libs/vulkan-loader
+		x11-libs/libX11
+		x11-libs/libXt
+	)
+	pam? ( sys-libs/pam )
+	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 )
+	gui? (
+		x11-base/xorg-proto
+		x11-libs/libxcb:=
+		x11-libs/libXcursor
+		x11-libs/libXext
+		x11-libs/libXinerama
+		x11-libs/libXmu
+		x11-libs/libXrandr
+	)
+	java? ( virtual/jdk:1.8 )
+	opengl? (
+		x11-base/xorg-proto
+		x11-libs/libXcursor
+		x11-libs/libXinerama
+		x11-libs/libXmu
+		x11-libs/libXrandr
+		virtual/glu
+	)
+	sdl? ( x11-libs/libXinerama )
+	pulseaudio? ( media-libs/libpulse )
+	udev? ( >=virtual/udev-171 )
+"
+RDEPEND="
+	!app-emulation/virtualbox
+	${COMMON_DEPEND}
+	gui? ( x11-libs/libxcb:= )
+	java? ( virtual/jre:1.8 )
+"
+BDEPEND="
+	>=app-arch/tar-1.34-r2
+	>=dev-lang/yasm-0.6.2
+	dev-libs/libIDL
+	dev-util/glslang
+	>=dev-build/kbuild-0.1.9998.3592
+	sys-apps/which
+	sys-devel/bin86
+	sys-libs/libcap
+	sys-power/iasl
+	virtual/pkgconfig
+	doc? (
+		app-text/docbook-sgml-dtd:4.4
+		app-text/docbook-xsl-ns-stylesheets
+		dev-texlive/texlive-basic
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-latexrecommended
+		dev-texlive/texlive-latexextra
+		dev-texlive/texlive-fontsrecommended
+		dev-texlive/texlive-fontsextra
+		dev-qt/qthelp:5
+	)
+	gui? ( dev-qt/linguist-tools:5 )
+	nls? ( dev-qt/linguist-tools:5 )
+	java? ( virtual/jdk:1.8 )
+	python? ( ${PYTHON_DEPS} )
+"
+
+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
+	"${PATCHES_DIR}"/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
+
+	# Only add nopie patch when we're on hardened
+	if gcc-specs-pie; then
+		eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch
+	fi
+
+	# Remove shipped binaries (kBuild, yasm) and tools, see bug #232775
+	rm -r kBuild/bin || die
+	# Remove everything in tools except kBuildUnits
+	find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || die
+
+	# Disable things unused or split into separate ebuilds
+	sed -e "s@MY_LIBDIR@$(get_libdir)@" \
+		"${FILESDIR}"/${MY_PN}-5-localconfig > LocalConfig.kmk || die
+
+	if ! use pch; then
+		# bug #753323
+		printf '\n%s\n' "VBOX_WITHOUT_PRECOMPILED_HEADERS=1" \
+			>> LocalConfig.kmk || die
+	fi
+
+	# bug #916002, #488176
+	tc-ld-force-bfd
+
+	# Respect LDFLAGS
+	sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
+		-i Config.kmk src/libs/xpcom18a4/Config.kmk || die
+
+	# Do not use hard-coded ld (related to bug #488176)
+	sed -e '/QUIET)ld /s@ld @$(LD) @' \
+		-i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
+
+	# Use PAM only when pam USE flag is enbaled (bug #376531)
+	if ! use pam; then
+		einfo "Disabling PAM removes the possibility to use the VRDP features."
+		sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
+		sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
+			src/VBox/HostServices/Makefile.kmk || die
+		echo -e "\nIPRT_WITHOUT_PAM=1" >> LocalConfig.kmk || die
+	fi
+
+	# add correct java path
+	if use java; then
+		sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
+			-i "${S}"/Config.kmk || die
+		java-pkg-opt-2_src_prepare
+	fi
+
+	#856811 #864274
+	# cannot filter out only one flag, some combinations of these flags produce buggy executables
+	for i in abm avx avx2 bmi bmi2 fma fma4 popcnt; do
+		append-cflags $(test-flags-CC -mno-$i)
+		append-cxxflags $(test-flags-CXX -mno-$i)
+	done
+
+	# bug #908814
+	filter-lto
+
+	# bug #843437
+	cat >> LocalConfig.kmk <<-EOF || die
+		CXXFLAGS=${CXXFLAGS}
+		CFLAGS=${CFLAGS}
+	EOF
+
+	if use sdl; then
+		sed -i 's/sdl-config/sdl2-config/' configure || die
+		echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
+	fi
+
+	#443830
+	echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die
+
+	if tc-is-clang; then
+		# clang assembler chokes on comments starting with /
+		sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
+
+		# clang does not support this extension
+		eapply "${FILESDIR}"/${MY_PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
+	fi
+
+	# fix doc generation
+	echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die
+	# replace xhtml names with numeric equivalents
+	find doc/manual -name \*.xml -exec sed -i \
+		-e 's/&nbsp;/\&#160;/g' \
+		-e 's/&ndash;/\&#8211;/g' \
+		-e 's/&larr;/\&#8592;/g' \
+		-e 's/&rarr;/\&#8594;/g' \
+		-e 's/&harr;/\&#8596;/g' {} \+ || die
+
+	# fix help path #891879
+	echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die
+
+	# 489208
+	# Cannot patch the whole text, many translations.  Use sed instead to replace the command
+	find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \
+		's/&apos;[^&]*\(vboxdrv setup\|vboxconfig\)&apos;/\&apos;emerge -1 virtualbox-modules\&apos;/' {} \+ || die
+	sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \
+		src/VBox/Frontends/VirtualBox/src/main.cpp \
+		src/VBox/VMM/VMMR3/VM.cpp || die
+
+	# 890561
+	echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
+
+	if ! use nls && ! use gui; then
+		cat >> LocalConfig.kmk <<-EOF || die
+			VBOX_WITH_NLS :=
+			VBOX_WITH_MAIN_NLS :=
+			VBOX_WITH_PUEL_NLS :=
+			VBOX_WITH_VBOXMANAGE_NLS :=
+		EOF
+	fi
+}
+
+src_configure() {
+	tc-export AR CC CXX LD RANLIB
+	export HOST_CC="$(tc-getBUILD_CC)"
+
+	local myconf=(
+		--with-gcc="$(tc-getCC)"
+		--with-g++="$(tc-getCXX)"
+
+		--disable-kmods
+		--with-kvm
+
+		$(usev !alsa --disable-alsa)
+		$(usev !dbus --disable-dbus)
+		$(usev debug --build-debug)
+		$(usev !doc --disable-docs)
+		$(usev !hardened --disable-hardening)
+		$(usev !java --disable-java)
+		$(usev !lvm --disable-devmapper)
+		$(usev !pulseaudio --disable-pulse)
+		$(usev !python --disable-python)
+		$(usev vboxwebsrv --enable-webservice)
+		$(usev vde --enable-vde)
+		$(usev !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
+		)
+	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_install() {
+	cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
+
+	local vbox_inst_path="/usr/$(get_libdir)/${MY_PN}" each size ico icofile
+
+	vbox_inst() {
+		local binary="${1}"
+		local perms="${2:-0750}"
+		local path="${3:-${vbox_inst_path}}"
+
+		[[ -n "${binary}" ]] || die "vbox_inst: No binary given!"
+		[[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
+
+		insinto ${path}
+		doins ${binary}
+		fowners root:vboxusers ${path}/${binary}
+		fperms ${perms} ${path}/${binary}
+	}
+
+	# Create configuration files
+	insinto /etc/vbox
+	newins "${FILESDIR}/${MY_PN}-4-config" vbox.cfg
+
+	# Set the correct libdir
+	sed \
+		-e "s@MY_LIBDIR@$(get_libdir)@" \
+		-i "${ED}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
+
+	# Install the wrapper script
+	exeinto ${vbox_inst_path}
+	newexe "${FILESDIR}/${MY_PN}-ose-6-wrapper" "VBox"
+	fowners root:vboxusers ${vbox_inst_path}/VBox
+	fperms 0750 ${vbox_inst_path}/VBox
+
+	# Install binaries and libraries
+	insinto ${vbox_inst_path}
+	doins -r components
+
+	for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,VMMPreload,XPCOMIPCD} \
+		vboximg-mount vbox-img *so *r0; do
+		vbox_inst ${each}
+	done
+
+	# These binaries need to be suid root with USE=hardened.
+	local mode=$(usex hardened 4750 0750)
+	for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
+		vbox_inst ${each} ${mode}
+	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 ${mode}
+		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 ${mode}
+		for each in VirtualBox{,VM} ; do
+			pax-mark -m "${ED}"${vbox_inst_path}/${each}
+		done
+
+		if use opengl; then
+			vbox_inst VBoxTestOGL
+			pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
+		fi
+
+		for each in virtualbox{,vm} VirtualBox{,VM} ; do
+			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
+		done
+
+		insinto /usr/share/${PN}
+		doins -r nls
+		doins -r UnattendedTemplates
+
+		newmenu ${MY_PN}.desktop ${PN}.desktop
+
+		pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
+		for size in 16 32 48 64 128 ; do
+			newicon -s ${size} ${MY_PN}-${size}px.png ${PN}.png
+		done
+		newicon ${MY_PN}-48px.png ${PN}.png
+		newicon -s scalable ${MY_PN}.svg ${PN}.png
+		popd &>/dev/null || die
+		pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
+		for size in 16 24 32 48 64 72 96 128 256 512 ; do
+			for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
+				icofile="${MY_PN}-${ico}-${size}px.png"
+				if [[ -f "${icofile}" ]]; then
+					newicon -s ${size} ${icofile} ${MY_PN}-${ico}.png
+				fi
+			done
+		done
+		popd &>/dev/null || die
+	fi
+
+	if use lvm; then
+		vbox_inst VBoxVolInfo ${mode}
+		dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
+	fi
+
+	if use sdk; then
+		insinto ${vbox_inst_path}
+		doins -r sdk
+
+		if use java; then
+			java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
+			java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
+		fi
+	fi
+
+	if use udev; then
+		local udevdir="$(get_udevdir)"
+		local udev_file="VBoxCreateUSBNode.sh"
+		local rules_file="10-virtualbox.rules"
+
+		insinto ${udevdir}
+		doins ${udev_file}
+		fowners root:vboxusers ${udevdir}/${udev_file}
+		fperms 0750 ${udevdir}/${udev_file}
+
+		insinto ${udevdir}/rules.d
+		sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \
+			> "${T}"/${rules_file} || die
+		doins "${T}"/${rules_file}
+	fi
+
+	if use vboxwebsrv; then
+		vbox_inst vboxwebsrv
+		dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
+		newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
+		newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
+	fi
+
+	# Remove dead symlinks (bug #715338)
+	find "${ED}"/usr/$(get_libdir)/${MY_PN} -xtype l -delete || die
+
+	# Fix version string in extensions or else they don't get accepted
+	# by the virtualbox host process (see bug #438930)
+	find ExtensionPacks -type f -name "ExtPack.xml" -exec sed -i '/Version/s@_Gentoo@@' {} \+ || die
+
+	local extensions_dir="${vbox_inst_path}/ExtensionPacks"
+
+	if use vnc; then
+		insinto ${extensions_dir}
+		doins -r ExtensionPacks/VNC
+	fi
+
+	if use dtrace; then
+		insinto ${extensions_dir}
+		doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
+	fi
+
+	if use doc; then
+		dodoc UserManual.pdf UserManual.q{ch,hc}
+		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
+	elif use gui; then
+		dodoc "${WORKDIR}"/${MY_PN}-help-${ORIGIN_PV}/UserManual.q{ch,hc}
+		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
+	fi
+	dodoc ${PATCHES_DIR}/README.*
+
+	if use python; then
+		local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.so"
+		if [[ ! -x "${python_path_ext}" ]]; then
+			eerror "Couldn't find ${python_path_ext}! Bindings were requested with USE=python"
+			eerror "but none were installed. This may happen if support for a Python target"
+			eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles."
+			die "Incomplete installation of Python bindings! File a bug with Gentoo!"
+		fi
+
+		# 378871
+		local installer_dir="${ED}/usr/$(get_libdir)/virtualbox/sdk/installer"
+		pushd "${installer_dir}" &> /dev/null || die
+		sed -e "s;%VBOX_INSTALL_PATH%;${vbox_inst_path};" \
+			-e "s;%VBOX_SDK_PATH%;${vbox_inst_path}/sdk;" \
+			-i vboxapi/__init__.py || die
+		# insert shebang, the files come without one
+		find vboxapi -name \*.py -exec sed -e "1 i\#! ${PYTHON}" -i {} \+ || die
+		python_domodule vboxapi
+		popd &> /dev/null || die
+		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}"/${MY_PN}-vboxusb_tmpfilesd virtualbox-vboxusb.conf
+}
+
+pkg_postinst() {
+	xdg_pkg_postinst
+
+	if use udev; then
+		udev_reload
+		udevadm trigger --subsystem-match=usb
+	fi
+
+	tmpfiles_process virtualbox-vboxusb.conf
+
+	if use gui; then
+		elog "To launch VirtualBox just type: \"virtualbox\"."
+	fi
+
+	elog "You must be in the vboxusers group to use VirtualBox."
+	elog ""
+	elog "The latest user manual is available for download at:"
+	elog "https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/UserManual.pdf"
+	elog ""
+
+	optfeature "Advanced networking setups" net-misc/bridge-utils sys-apps/usermode-utilities
+	optfeature "USB2, USB3, PXE boot, and VRDP support" app-emulation/virtualbox-extpack-oracle
+	optfeature "Guest additions ISO" app-emulation/virtualbox-additions
+
+	if ! use udev; then
+		ewarn "Without USE=udev, USB devices will likely not work in ${MY_PN}."
+	fi
+}
+
+pkg_postrm() {
+	xdg_pkg_postrm
+
+	use udev && udev_reload
+}


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/
@ 2024-09-15 13:02 Viorel Munteanu
  0 siblings, 0 replies; 24+ messages in thread
From: Viorel Munteanu @ 2024-09-15 13:02 UTC (permalink / raw
  To: gentoo-commits

commit:     e49f72d703cfa58877e6befb6dd561b5b7d9afb9
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 15 12:53:45 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Sun Sep 15 13:01:56 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e49f72d7

app-emulation/virtualbox-kvm: drop 7.0.18_pre20240617

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox-kvm/Manifest              |   3 -
 .../virtualbox-kvm-7.0.18_pre20240617.ebuild       | 753 ---------------------
 2 files changed, 756 deletions(-)

diff --git a/app-emulation/virtualbox-kvm/Manifest b/app-emulation/virtualbox-kvm/Manifest
index 1d234c3cf39b..84ca730ce269 100644
--- a/app-emulation/virtualbox-kvm/Manifest
+++ b/app-emulation/virtualbox-kvm/Manifest
@@ -1,7 +1,4 @@
-DIST VirtualBox-7.0.18.tar.bz2 173295159 BLAKE2B 1371d54d648aafbad3814d55d495836ce7a6f9ca955aeb71e24c57a27ed8acae8c020b8094ca7386d341d5e7460b9b0823cc01e7e69dd3cdadaadee1bc608bd1 SHA512 e78a18fa808152cbdc1d407751acf3f57a8202bf238ad3432c4f0b0f97ab203e915a6cd11619e64f4aca5b907eb72be67bab146869af0e73414144addf0d76b4
 DIST VirtualBox-7.0.20.tar.bz2 173300021 BLAKE2B 23a1553578c8b89c3bea65fd9a451ef5abf419ce8a05524f2afc15b8d9a378a22ffb01c0c792d258320aeddb330b74f8f769180863041e333512d0eed2f4449c SHA512 7682e24d60c1896c661f2689af6820ae67b6bd8d9faaf18c58e8159bc7694ef80722f8e9611d6272da5b46eb2f3a44fc637b277e6801b7a8bf53aad045a81fe9
-DIST virtualbox-help-7.0.18.tar.xz 3948116 BLAKE2B 5715a7e609297387b5fccce0951c62e5969fd68adeecb869712e69f5e90daef97384bd3ff3c39de40903a1fabe7ac6d2f8ecdbb40de16abe955d40e49b962eec SHA512 ec0f915b7221bc40d02f5f1675eb0defb5506b2f2bd96c063a96a9346e1c82428ccdda8b3adac43238c451ae185ac31af4a186da17ffe091469e14e696388b3a
 DIST virtualbox-help-7.0.20.tar.xz 3949292 BLAKE2B c56f736606fdedfb59bd1f4446a457587dcbe018d1be3162d94eca780cacfa45b49ba5a9c6b25970d28e5a428904bdfd34d2f229c1e24b567fd1b1959cbdc9ea SHA512 e73e448b8aa875d0f6ae1fb398082fa7183e198191a9b509b63592b5df3a19069b805dcdc11d98da3971a14fd6670d8b0a777e5a6d6b63358f7a4f263ca8d31e
-DIST virtualbox-kvm-7.0.18_pre20240617.tar.gz 131620 BLAKE2B 88f22665c1f774f4799f17777541fb1dd48a6d65f170bd998516f32fa0d84a2b1b18f7ecfcf53dc5365614b7c5b35f9c29ce69be59d475a53cbe8a7ee591f522 SHA512 c3d331bee135c746947735b483ec69536c2b7dfd19049d45212144da5eb952f67081b35a7a874eb3f4a0a611fa617f5d62566a89d2e4c1e4863657f80abd3af5
 DIST virtualbox-kvm-7.0.20_pre20240828.tar.gz 130388 BLAKE2B 68589fce348efe37a46d4e6cb28ced18969c5cffbd3dcaf85a4f0a085782521a26b4fe4901bda914a17dc97514df7c2a0548d616830abdb9b279afc1508f6c28 SHA512 3625a069729158e48d0f356d34657b925e235f24af0cd42d01625936b6baf1f16ab11448fb7c82190722e24b81b240b08786154ad26050ed6dff2c69c89e0cd4
 DIST virtualbox-patches-7.0.16.tar.bz2 6808 BLAKE2B d15fa2ca306375142c3e25d4759d2790b2bb9eb69e333a8773ad500b29dd127b401943abf59ca59d01858a3ed5551fb3a6c93c4c893c8de971a714ce5306d577 SHA512 a488cbc6660fe8637c44cd79d87156609af089988239a7e76fea8a3c7e6319512c574bef2e942b354b14ce671a8e75ab8b2160abf7c40963795ee8a545ecd992

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.18_pre20240617.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.18_pre20240617.ebuild
deleted file mode 100644
index 66f1c7223292..000000000000
--- a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.18_pre20240617.ebuild
+++ /dev/null
@@ -1,753 +0,0 @@
-# Copyright 2022-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-# To add a new Python here:
-# 1. Patch src/libs/xpcom18a4/python/Makefile.kmk (copy the previous impl's logic)
-#    Do NOT skip this part. It'll end up silently not-building the Python extension
-#    or otherwise misbehaving if you do.
-#
-# 2. Then update PYTHON_COMPAT & set PYTHON_SINGLE_TARGET for testing w/ USE=python.
-#
-#  May need to look at other distros (e.g. Arch Linux) to find patches for newer
-#  Python versions as upstream tends to lag. Upstream may have patches on their
-#  trunk branch but not release branch.
-#
-#  See bug #785835, bug #856121.
-PYTHON_COMPAT=( python3_{10..11} )
-
-inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info multilib optfeature pax-utils \
-	python-single-r1 tmpfiles toolchain-funcs udev xdg
-
-PATCHES_PV="7.0.16"
-ORIGIN_PN="VirtualBox"
-ORIGIN_PV=${PV%_pre*}
-
-MY_PN=virtualbox
-MY_PV=${PV#*_pre}
-MY_P=${ORIGIN_PN}-${ORIGIN_PV}
-
-PATCHES_DIR="${WORKDIR}"/${PN}-dev-${MY_PV}
-
-DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
-HOMEPAGE="https://www.virtualbox.org/ https://github.com/cyberus-technology/virtualbox-kvm"
-SRC_URI="
-	https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2
-	https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz
-	https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/${MY_P}.tar.bz2
-	gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${MY_PN}/${MY_PN}-help-${ORIGIN_PV}.tar.xz ) )
-"
-S="${WORKDIR}/${ORIGIN_PN}-${ORIGIN_PV}"
-
-LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
-SLOT="0"
-IUSE="alsa dbus debug doc dtrace +gui +hardened java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde +vmmraw vnc"
-
-unset WATCOM #856769
-
-COMMON_DEPEND="
-	acct-group/vboxusers
-	dev-libs/libtpms
-	dev-libs/libxml2
-	dev-libs/openssl:0=
-	media-libs/libpng:0=
-	media-libs/libvpx:0=
-	net-misc/curl
-	sys-libs/zlib
-	dbus? ( sys-apps/dbus )
-	gui? (
-		dev-qt/qtcore:5
-		dev-qt/qtdbus:5
-		dev-qt/qtgui:5
-		dev-qt/qthelp:5
-		dev-qt/qtprintsupport:5
-		dev-qt/qtwidgets:5
-		dev-qt/qtx11extras:5
-		dev-qt/qtxml:5
-		x11-libs/libX11
-		x11-libs/libXt
-		opengl? ( dev-qt/qtopengl:5 )
-	)
-	lvm? ( sys-fs/lvm2 )
-	opengl? (
-		media-libs/libglvnd[X]
-		media-libs/vulkan-loader
-		x11-libs/libX11
-		x11-libs/libXt
-	)
-	pam? ( sys-libs/pam )
-	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 )
-	gui? (
-		x11-base/xorg-proto
-		x11-libs/libxcb:=
-		x11-libs/libXcursor
-		x11-libs/libXext
-		x11-libs/libXinerama
-		x11-libs/libXmu
-		x11-libs/libXrandr
-	)
-	java? ( virtual/jdk:1.8 )
-	opengl? (
-		x11-base/xorg-proto
-		x11-libs/libXcursor
-		x11-libs/libXinerama
-		x11-libs/libXmu
-		x11-libs/libXrandr
-		virtual/glu
-	)
-	sdl? ( x11-libs/libXinerama )
-	pulseaudio? ( media-libs/libpulse )
-	udev? ( >=virtual/udev-171 )
-"
-RDEPEND="
-	!app-emulation/virtualbox
-	${COMMON_DEPEND}
-	gui? ( x11-libs/libxcb:= )
-	java? ( virtual/jre:1.8 )
-"
-BDEPEND="
-	>=app-arch/tar-1.34-r2
-	>=dev-lang/yasm-0.6.2
-	dev-libs/libIDL
-	dev-util/glslang
-	>=dev-build/kbuild-0.1.9998.3592
-	sys-apps/which
-	sys-devel/bin86
-	sys-libs/libcap
-	sys-power/iasl
-	virtual/pkgconfig
-	doc? (
-		app-text/docbook-sgml-dtd:4.4
-		app-text/docbook-xsl-ns-stylesheets
-		dev-texlive/texlive-basic
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-latexrecommended
-		dev-texlive/texlive-latexextra
-		dev-texlive/texlive-fontsrecommended
-		dev-texlive/texlive-fontsextra
-		dev-qt/qthelp:5
-	)
-	gui? ( dev-qt/linguist-tools:5 )
-	nls? ( dev-qt/linguist-tools:5 )
-	java? ( virtual/jdk:1.8 )
-	python? ( ${PYTHON_DEPS} )
-"
-
-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
-	"${PATCHES_DIR}"/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
-
-	# Only add nopie patch when we're on hardened
-	if gcc-specs-pie; then
-		eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch
-	fi
-
-	# Remove shipped binaries (kBuild, yasm) and tools, see bug #232775
-	rm -r kBuild/bin || die
-	# Remove everything in tools except kBuildUnits
-	find tools -mindepth 1 -maxdepth 1 -name kBuildUnits -prune -o -exec rm -r {} \+ || die
-
-	# Disable things unused or split into separate ebuilds
-	sed -e "s@MY_LIBDIR@$(get_libdir)@" \
-		"${FILESDIR}"/${MY_PN}-5-localconfig > LocalConfig.kmk || die
-
-	if ! use pch; then
-		# bug #753323
-		printf '\n%s\n' "VBOX_WITHOUT_PRECOMPILED_HEADERS=1" \
-			>> LocalConfig.kmk || die
-	fi
-
-	# bug #916002, #488176
-	tc-ld-force-bfd
-
-	# Respect LDFLAGS
-	sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
-		-i Config.kmk src/libs/xpcom18a4/Config.kmk || die
-
-	# Do not use hard-coded ld (related to bug #488176)
-	sed -e '/QUIET)ld /s@ld @$(LD) @' \
-		-i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
-
-	# Use PAM only when pam USE flag is enbaled (bug #376531)
-	if ! use pam; then
-		einfo "Disabling PAM removes the possibility to use the VRDP features."
-		sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
-		sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
-			src/VBox/HostServices/Makefile.kmk || die
-		echo -e "\nIPRT_WITHOUT_PAM=1" >> LocalConfig.kmk || die
-	fi
-
-	# add correct java path
-	if use java; then
-		sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
-			-i "${S}"/Config.kmk || die
-		java-pkg-opt-2_src_prepare
-	fi
-
-	#856811 #864274
-	# cannot filter out only one flag, some combinations of these flags produce buggy executables
-	for i in abm avx avx2 bmi bmi2 fma fma4 popcnt; do
-		append-cflags $(test-flags-CC -mno-$i)
-		append-cxxflags $(test-flags-CXX -mno-$i)
-	done
-
-	# bug #908814
-	filter-lto
-
-	# bug #843437
-	cat >> LocalConfig.kmk <<-EOF || die
-		CXXFLAGS=${CXXFLAGS}
-		CFLAGS=${CFLAGS}
-	EOF
-
-	if use sdl; then
-		sed -i 's/sdl-config/sdl2-config/' configure || die
-		echo -e "\nVBOX_WITH_VBOXSDL=1" >> LocalConfig.kmk || die
-	fi
-
-	#443830
-	echo -e "\nVBOX_WITH_VBOX_IMG=1" >> LocalConfig.kmk || die
-
-	if tc-is-clang; then
-		# clang assembler chokes on comments starting with /
-		sed -i -e '/^\//d' src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_Linux_x86_64.s || die
-
-		# clang does not support this extension
-		eapply "${FILESDIR}"/${MY_PN}-7.0.8-disable-rebuild-iPxeBiosBin.patch
-	fi
-
-	# fix doc generation
-	echo -e "\nVBOX_PATH_DOCBOOK=/usr/share/sgml/docbook/xsl-ns-stylesheets" >> LocalConfig.kmk || die
-	# replace xhtml names with numeric equivalents
-	find doc/manual -name \*.xml -exec sed -i \
-		-e 's/&nbsp;/\&#160;/g' \
-		-e 's/&ndash;/\&#8211;/g' \
-		-e 's/&larr;/\&#8592;/g' \
-		-e 's/&rarr;/\&#8594;/g' \
-		-e 's/&harr;/\&#8596;/g' {} \+ || die
-
-	# fix help path #891879
-	echo -e "\nVBOX_PATH_PACKAGE_DOCS=/usr/share/doc/${PF}" >> LocalConfig.kmk || die
-
-	# 489208
-	# Cannot patch the whole text, many translations.  Use sed instead to replace the command
-	find src/VBox/Frontends/VirtualBox/nls -name \*.ts -exec sed -i \
-		's/&apos;[^&]*\(vboxdrv setup\|vboxconfig\)&apos;/\&apos;emerge -1 virtualbox-modules\&apos;/' {} \+ || die
-	sed -i "s:'/sbin/vboxconfig':'emerge -1 virtualbox-modules':" \
-		src/VBox/Frontends/VirtualBox/src/main.cpp \
-		src/VBox/VMM/VMMR3/VM.cpp || die
-
-	# 890561
-	echo -e "\nVBOX_GTAR=gtar" >> LocalConfig.kmk || die
-
-	if ! use nls && ! use gui; then
-		cat >> LocalConfig.kmk <<-EOF || die
-			VBOX_WITH_NLS :=
-			VBOX_WITH_MAIN_NLS :=
-			VBOX_WITH_PUEL_NLS :=
-			VBOX_WITH_VBOXMANAGE_NLS :=
-		EOF
-	fi
-}
-
-src_configure() {
-	tc-export AR CC CXX LD RANLIB
-	export HOST_CC="$(tc-getBUILD_CC)"
-
-	local myconf=(
-		--with-gcc="$(tc-getCC)"
-		--with-g++="$(tc-getCXX)"
-
-		--disable-kmods
-		--with-kvm
-
-		$(usev !alsa --disable-alsa)
-		$(usev !dbus --disable-dbus)
-		$(usev debug --build-debug)
-		$(usev !doc --disable-docs)
-		$(usev !hardened --disable-hardening)
-		$(usev !java --disable-java)
-		$(usev !lvm --disable-devmapper)
-		$(usev !pulseaudio --disable-pulse)
-		$(usev !python --disable-python)
-		$(usev vboxwebsrv --enable-webservice)
-		$(usev vde --enable-vde)
-		$(usev !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
-		)
-	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_install() {
-	cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
-
-	local vbox_inst_path="/usr/$(get_libdir)/${MY_PN}" each size ico icofile
-
-	vbox_inst() {
-		local binary="${1}"
-		local perms="${2:-0750}"
-		local path="${3:-${vbox_inst_path}}"
-
-		[[ -n "${binary}" ]] || die "vbox_inst: No binary given!"
-		[[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
-
-		insinto ${path}
-		doins ${binary}
-		fowners root:vboxusers ${path}/${binary}
-		fperms ${perms} ${path}/${binary}
-	}
-
-	# Create configuration files
-	insinto /etc/vbox
-	newins "${FILESDIR}/${MY_PN}-4-config" vbox.cfg
-
-	# Set the correct libdir
-	sed \
-		-e "s@MY_LIBDIR@$(get_libdir)@" \
-		-i "${ED}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
-
-	# Install the wrapper script
-	exeinto ${vbox_inst_path}
-	newexe "${FILESDIR}/${MY_PN}-ose-6-wrapper" "VBox"
-	fowners root:vboxusers ${vbox_inst_path}/VBox
-	fperms 0750 ${vbox_inst_path}/VBox
-
-	# Install binaries and libraries
-	insinto ${vbox_inst_path}
-	doins -r components
-
-	for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,VMMPreload,XPCOMIPCD} \
-		vboximg-mount vbox-img *so *r0; do
-		vbox_inst ${each}
-	done
-
-	# These binaries need to be suid root with USE=hardened.
-	local mode=$(usex hardened 4750 0750)
-	for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
-		vbox_inst ${each} ${mode}
-	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 ${mode}
-		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 ${mode}
-		for each in VirtualBox{,VM} ; do
-			pax-mark -m "${ED}"${vbox_inst_path}/${each}
-		done
-
-		if use opengl; then
-			vbox_inst VBoxTestOGL
-			pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
-		fi
-
-		for each in virtualbox{,vm} VirtualBox{,VM} ; do
-			dosym ${vbox_inst_path}/VBox /usr/bin/${each}
-		done
-
-		insinto /usr/share/${PN}
-		doins -r nls
-		doins -r UnattendedTemplates
-
-		newmenu ${MY_PN}.desktop ${PN}.desktop
-
-		pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
-		for size in 16 32 48 64 128 ; do
-			newicon -s ${size} ${MY_PN}-${size}px.png ${PN}.png
-		done
-		newicon ${MY_PN}-48px.png ${PN}.png
-		newicon -s scalable ${MY_PN}.svg ${PN}.png
-		popd &>/dev/null || die
-		pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
-		for size in 16 24 32 48 64 72 96 128 256 512 ; do
-			for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
-				icofile="${MY_PN}-${ico}-${size}px.png"
-				if [[ -f "${icofile}" ]]; then
-					newicon -s ${size} ${icofile} ${MY_PN}-${ico}.png
-				fi
-			done
-		done
-		popd &>/dev/null || die
-	fi
-
-	if use lvm; then
-		vbox_inst VBoxVolInfo ${mode}
-		dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
-	fi
-
-	if use sdk; then
-		insinto ${vbox_inst_path}
-		doins -r sdk
-
-		if use java; then
-			java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
-			java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
-		fi
-	fi
-
-	if use udev; then
-		local udevdir="$(get_udevdir)"
-		local udev_file="VBoxCreateUSBNode.sh"
-		local rules_file="10-virtualbox.rules"
-
-		insinto ${udevdir}
-		doins ${udev_file}
-		fowners root:vboxusers ${udevdir}/${udev_file}
-		fperms 0750 ${udevdir}/${udev_file}
-
-		insinto ${udevdir}/rules.d
-		sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/${rules_file} \
-			> "${T}"/${rules_file} || die
-		doins "${T}"/${rules_file}
-	fi
-
-	if use vboxwebsrv; then
-		vbox_inst vboxwebsrv
-		dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
-		newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
-		newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
-	fi
-
-	# Remove dead symlinks (bug #715338)
-	find "${ED}"/usr/$(get_libdir)/${MY_PN} -xtype l -delete || die
-
-	# Fix version string in extensions or else they don't get accepted
-	# by the virtualbox host process (see bug #438930)
-	find ExtensionPacks -type f -name "ExtPack.xml" -exec sed -i '/Version/s@_Gentoo@@' {} \+ || die
-
-	local extensions_dir="${vbox_inst_path}/ExtensionPacks"
-
-	if use vnc; then
-		insinto ${extensions_dir}
-		doins -r ExtensionPacks/VNC
-	fi
-
-	if use dtrace; then
-		insinto ${extensions_dir}
-		doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
-	fi
-
-	if use doc; then
-		dodoc UserManual.pdf UserManual.q{ch,hc}
-		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
-	elif use gui; then
-		dodoc "${WORKDIR}"/${MY_PN}-help-${ORIGIN_PV}/UserManual.q{ch,hc}
-		docompress -x /usr/share/doc/${PF}/UserManual.q{ch,hc}
-	fi
-	dodoc ${PATCHES_DIR}/README.*
-
-	if use python; then
-		local python_path_ext="${ED}/usr/$(get_libdir)/virtualbox/VBoxPython3.so"
-		if [[ ! -x "${python_path_ext}" ]]; then
-			eerror "Couldn't find ${python_path_ext}! Bindings were requested with USE=python"
-			eerror "but none were installed. This may happen if support for a Python target"
-			eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles."
-			die "Incomplete installation of Python bindings! File a bug with Gentoo!"
-		fi
-
-		# 378871
-		local installer_dir="${ED}/usr/$(get_libdir)/virtualbox/sdk/installer"
-		pushd "${installer_dir}" &> /dev/null || die
-		sed -e "s;%VBOX_INSTALL_PATH%;${vbox_inst_path};" \
-			-e "s;%VBOX_SDK_PATH%;${vbox_inst_path}/sdk;" \
-			-i vboxapi/__init__.py || die
-		# insert shebang, the files come without one
-		find vboxapi -name \*.py -exec sed -e "1 i\#! ${PYTHON}" -i {} \+ || die
-		python_domodule vboxapi
-		popd &> /dev/null || die
-		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}"/${MY_PN}-vboxusb_tmpfilesd virtualbox-vboxusb.conf
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-
-	if use udev; then
-		udev_reload
-		udevadm trigger --subsystem-match=usb
-	fi
-
-	tmpfiles_process virtualbox-vboxusb.conf
-
-	if use gui; then
-		elog "To launch VirtualBox just type: \"virtualbox\"."
-	fi
-
-	elog "You must be in the vboxusers group to use VirtualBox."
-	elog ""
-	elog "The latest user manual is available for download at:"
-	elog "https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/UserManual.pdf"
-	elog ""
-
-	optfeature "Advanced networking setups" net-misc/bridge-utils sys-apps/usermode-utilities
-	optfeature "USB2, USB3, PXE boot, and VRDP support" app-emulation/virtualbox-extpack-oracle
-	optfeature "Guest additions ISO" app-emulation/virtualbox-additions
-
-	if ! use udev; then
-		ewarn "Without USE=udev, USB devices will likely not work in ${MY_PN}."
-	fi
-}
-
-pkg_postrm() {
-	xdg_pkg_postrm
-
-	use udev && udev_reload
-}


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/
@ 2024-10-18 17:16 Viorel Munteanu
  0 siblings, 0 replies; 24+ messages in thread
From: Viorel Munteanu @ 2024-10-18 17:16 UTC (permalink / raw
  To: gentoo-commits

commit:     60fd8d70fe3196d767aef8946a240d474837f46c
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 18 16:28:03 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Fri Oct 18 17:13:12 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60fd8d70

app-emulation/virtualbox-kvm: keyword 7.0.20_pre20240828 for ~amd64

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.20_pre20240828.ebuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.20_pre20240828.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.20_pre20240828.ebuild
index 66f1c7223292..7585d275e20d 100644
--- a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.20_pre20240828.ebuild
+++ b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.20_pre20240828.ebuild
@@ -42,6 +42,7 @@ S="${WORKDIR}/${ORIGIN_PN}-${ORIGIN_PV}"
 
 LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )"
 SLOT="0"
+KEYWORDS="~amd64"
 IUSE="alsa dbus debug doc dtrace +gui +hardened java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde +vmmraw vnc"
 
 unset WATCOM #856769


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/
@ 2024-11-02 18:00 Viorel Munteanu
  0 siblings, 0 replies; 24+ messages in thread
From: Viorel Munteanu @ 2024-11-02 18:00 UTC (permalink / raw
  To: gentoo-commits

commit:     4dc2ddf25f471f04072c547b407956a86a84f127
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Sat Nov  2 17:58:44 2024 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Sat Nov  2 18:00:44 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4dc2ddf2

app-emulation/virtualbox-kvm: add 7.0.22_pre20240828

The patch is for virtualbox 7.0.20, but it also works applied to 7.0.22.
Rename the distfile so it can be used for multiple versions.

Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>

 app-emulation/virtualbox-kvm/Manifest                                 | 4 +++-
 app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.20_pre20240828.ebuild | 2 +-
 ...20_pre20240828.ebuild => virtualbox-kvm-7.0.22_pre20240828.ebuild} | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/app-emulation/virtualbox-kvm/Manifest b/app-emulation/virtualbox-kvm/Manifest
index 84ca730ce269..559a88a07b50 100644
--- a/app-emulation/virtualbox-kvm/Manifest
+++ b/app-emulation/virtualbox-kvm/Manifest
@@ -1,4 +1,6 @@
 DIST VirtualBox-7.0.20.tar.bz2 173300021 BLAKE2B 23a1553578c8b89c3bea65fd9a451ef5abf419ce8a05524f2afc15b8d9a378a22ffb01c0c792d258320aeddb330b74f8f769180863041e333512d0eed2f4449c SHA512 7682e24d60c1896c661f2689af6820ae67b6bd8d9faaf18c58e8159bc7694ef80722f8e9611d6272da5b46eb2f3a44fc637b277e6801b7a8bf53aad045a81fe9
+DIST VirtualBox-7.0.22.tar.bz2 174643573 BLAKE2B 93ba1dd44a7147e61d72489a127e497f510c12eef576f8a30af45011e383050a908124c0f9794a92f28400cbb2f230308884893bafacd4f8a391b2354958f02d SHA512 eb231cc487becfbad8c979fb9d6a1ede3a28a1bb11e77b1482181be4bd294fd209c77a7d599562f99f1ac2be587203b9d97230ccce4f85ed96c63e66b0fce392
 DIST virtualbox-help-7.0.20.tar.xz 3949292 BLAKE2B c56f736606fdedfb59bd1f4446a457587dcbe018d1be3162d94eca780cacfa45b49ba5a9c6b25970d28e5a428904bdfd34d2f229c1e24b567fd1b1959cbdc9ea SHA512 e73e448b8aa875d0f6ae1fb398082fa7183e198191a9b509b63592b5df3a19069b805dcdc11d98da3971a14fd6670d8b0a777e5a6d6b63358f7a4f263ca8d31e
-DIST virtualbox-kvm-7.0.20_pre20240828.tar.gz 130388 BLAKE2B 68589fce348efe37a46d4e6cb28ced18969c5cffbd3dcaf85a4f0a085782521a26b4fe4901bda914a17dc97514df7c2a0548d616830abdb9b279afc1508f6c28 SHA512 3625a069729158e48d0f356d34657b925e235f24af0cd42d01625936b6baf1f16ab11448fb7c82190722e24b81b240b08786154ad26050ed6dff2c69c89e0cd4
+DIST virtualbox-help-7.0.22.tar.xz 3950712 BLAKE2B 381743c2d6e5da940865818c725bc299ae7b178f25f822cb25a8bc2ed69fa32e3999a8f795132ffe7f01d1ae6c19f5e91d89a09dfa5cc6919cfeae4b6c420951 SHA512 4ae974a9a166c483d767ea1417afac04a8a5f3eb51bb78e4254c5e5577aaa5a64e39fe151ae73f7bc560ed63ca09a02c49c0314bbac3bea6a1331b2b852a1a0f
+DIST virtualbox-kvm-20240828.tar.gz 130388 BLAKE2B 68589fce348efe37a46d4e6cb28ced18969c5cffbd3dcaf85a4f0a085782521a26b4fe4901bda914a17dc97514df7c2a0548d616830abdb9b279afc1508f6c28 SHA512 3625a069729158e48d0f356d34657b925e235f24af0cd42d01625936b6baf1f16ab11448fb7c82190722e24b81b240b08786154ad26050ed6dff2c69c89e0cd4
 DIST virtualbox-patches-7.0.16.tar.bz2 6808 BLAKE2B d15fa2ca306375142c3e25d4759d2790b2bb9eb69e333a8773ad500b29dd127b401943abf59ca59d01858a3ed5551fb3a6c93c4c893c8de971a714ce5306d577 SHA512 a488cbc6660fe8637c44cd79d87156609af089988239a7e76fea8a3c7e6319512c574bef2e942b354b14ce671a8e75ab8b2160abf7c40963795ee8a545ecd992

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.20_pre20240828.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.20_pre20240828.ebuild
index 7585d275e20d..9480b1ee85f8 100644
--- a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.20_pre20240828.ebuild
+++ b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.20_pre20240828.ebuild
@@ -34,7 +34,7 @@ DESCRIPTION="Family of powerful x86 virtualization products for enterprise and h
 HOMEPAGE="https://www.virtualbox.org/ https://github.com/cyberus-technology/virtualbox-kvm"
 SRC_URI="
 	https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2
-	https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz
+	https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${PN}-${MY_PV}.tar.gz
 	https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/${MY_P}.tar.bz2
 	gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${MY_PN}/${MY_PN}-help-${ORIGIN_PV}.tar.xz ) )
 "

diff --git a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.20_pre20240828.ebuild b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.22_pre20240828.ebuild
similarity index 99%
copy from app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.20_pre20240828.ebuild
copy to app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.22_pre20240828.ebuild
index 7585d275e20d..9480b1ee85f8 100644
--- a/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.20_pre20240828.ebuild
+++ b/app-emulation/virtualbox-kvm/virtualbox-kvm-7.0.22_pre20240828.ebuild
@@ -34,7 +34,7 @@ DESCRIPTION="Family of powerful x86 virtualization products for enterprise and h
 HOMEPAGE="https://www.virtualbox.org/ https://github.com/cyberus-technology/virtualbox-kvm"
 SRC_URI="
 	https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${PATCHES_PV}.tar.bz2
-	https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${P}.tar.gz
+	https://github.com/cyberus-technology/virtualbox-kvm/archive/dev-${MY_PV}.tar.gz -> ${PN}-${MY_PV}.tar.gz
 	https://download.virtualbox.org/virtualbox/${ORIGIN_PV}/${MY_P}.tar.bz2
 	gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${MY_PN}/${MY_PN}-help-${ORIGIN_PV}.tar.xz ) )
 "


^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2024-11-02 18:00 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-15 13:02 [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-kvm/ Viorel Munteanu
  -- strict thread matches above, loose matches on Subject: below --
2024-11-02 18:00 Viorel Munteanu
2024-10-18 17:16 Viorel Munteanu
2024-08-28 14:46 Viorel Munteanu
2024-06-17 15:25 Viorel Munteanu
2024-06-17 15:25 Viorel Munteanu
2024-06-17 15:25 Viorel Munteanu
2024-06-05  4:53 Viorel Munteanu
2024-05-15 16:34 Viorel Munteanu
2024-05-15 16:34 Viorel Munteanu
2024-05-15 16:34 Viorel Munteanu
2024-05-03 17:41 Viorel Munteanu
2024-05-03 17:41 Viorel Munteanu
2024-05-02 11:12 Viorel Munteanu
2024-04-17 19:56 Viorel Munteanu
2024-03-29  6:00 Viorel Munteanu
2024-03-25 16:16 Viorel Munteanu
2024-03-25 16:16 Viorel Munteanu
2024-03-25 16:16 Viorel Munteanu
2024-03-25 16:16 Viorel Munteanu
2024-03-25 16:16 Viorel Munteanu
2024-03-09 15:49 Viorel Munteanu
2024-03-09 15:49 Viorel Munteanu
2024-02-26 12:58 Viorel Munteanu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox