public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Viorel Munteanu" <ceamac@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/
Date: Wed, 18 Oct 2023 04:08:08 +0000 (UTC)	[thread overview]
Message-ID: <1697602035.f093feb82664a221d2dabede63219decbd6ae3f0.ceamac@gentoo> (raw)

commit:     f093feb82664a221d2dabede63219decbd6ae3f0
Author:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 17 18:54:12 2023 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Wed Oct 18 04:07:15 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f093feb8

app-emulation/virtualbox: add 6.1.48

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

 app-emulation/virtualbox/Manifest                 |   1 +
 app-emulation/virtualbox/virtualbox-6.1.48.ebuild | 675 ++++++++++++++++++++++
 2 files changed, 676 insertions(+)

diff --git a/app-emulation/virtualbox/Manifest b/app-emulation/virtualbox/Manifest
index aad4f0b02e95..7eb92a4a1f28 100644
--- a/app-emulation/virtualbox/Manifest
+++ b/app-emulation/virtualbox/Manifest
@@ -1,4 +1,5 @@
 DIST VirtualBox-6.1.46.tar.bz2 166045588 BLAKE2B 041fad30d7cbe524cfd5c865b225c00df7715a6648ed0d8f7ee3ca4be0d0dabcb324c676ba2ea78288cde89ed8e5412fae75e31bb49f623de2acddb8f10d6ee1 SHA512 695ca4d41ff10d0581e4cffe4a0ec80e0fe380f4c7d5d51ee4d21aeb61646c26edd60301e541894e71c3323e2d7207e23299938c18ee45631afd1e0851946e77
+DIST VirtualBox-6.1.48.tar.bz2 165960987 BLAKE2B c981e390ae518b829970827f6032fb19a93685fb58835a9d489c6e14cc60a5c14c65b0a3da5adae7818e73e1b0e558e8fa803160cb67847f18565bb78d656e97 SHA512 fff759f3871e4e8962536002f2bc13e5150a927e280493f5cb0abf06466ce66e45f4c6ef43489b5b3ed8682d8a3ac0eb6fb3dd7c4144924c81612553ec71a95f
 DIST VirtualBox-7.0.10.tar.bz2 175450841 BLAKE2B 49eaa14f716f021f1ecec1ad48a2aa8a3a758cbd9b03cf30d65ddcf5aba11842b0ea8bc2c4d477084a4cea318dc302a4ed426ec9f675a1fe675c5f18c48796c7 SHA512 2870d39385f66557281edf1368db68cd69d6a9bebc30d52511929462d0ac210cec49dd8531a280c6facff22ba6e4808477fbf3d09abf998d863a007fc7f2c3bd
 DIST virtualbox-help-7.0.10.tar.xz 3941196 BLAKE2B fa6667e0cf12e2e05b896a7d9d7e1f78d43bb4618f35b3c81f5ccf5f227d1181b0c8fb1f6dc02a8619550b193a73d4094c5d3f0d43514392f9ed563085068789 SHA512 fab2dff812a438f3e78dbace24741d91b317bbbc7362f082a18f3871e3c6fd8af7744cf1b3fd3b82cf5135e03d521de05a7a5bc98ec19aacfa1b4e5392e60f30
 DIST virtualbox-patches-6.1.36.tar.bz2 2733 BLAKE2B dcfebfeca4873d382441515d48b4dfee9343bc7c83ea3cbb5002dbf7975143a79fae9a701b67dc35505e9ca03ff1b6293cb7c3279c4fdfda8ad21ba5fb9b7e87 SHA512 1bed5cdefbf8e7c4b0d9092ba4961ecf2262f27f35c71a91ef6f2e8fe8a1d92ed74f06bafbf58d70ba7165d933997f58073f4d4f4051e3ba5c0339b729066f57

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


             reply	other threads:[~2023-10-18  4:08 UTC|newest]

Thread overview: 198+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-18  4:08 Viorel Munteanu [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-10-18 17:16 [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/ Viorel Munteanu
2024-10-01  5:05 Viorel Munteanu
2024-09-27 17:08 Viorel Munteanu
2024-09-15 13:02 Viorel Munteanu
2024-09-15 13:02 Viorel Munteanu
2024-09-01 10:45 Viorel Munteanu
2024-08-22 11:20 Viorel Munteanu
2024-08-15 12:56 Viorel Munteanu
2024-07-26 15:02 Viorel Munteanu
2024-07-26 15:02 Viorel Munteanu
2024-07-16 18:13 Viorel Munteanu
2024-06-17 15:25 Viorel Munteanu
2024-06-05  4:53 Viorel Munteanu
2024-06-05  4:53 Viorel Munteanu
2024-06-03 11:32 Viorel Munteanu
2024-06-03 11:32 Viorel Munteanu
2024-06-03  8:07 Sam James
2024-05-25  9:53 Viorel Munteanu
2024-05-25  9:53 Viorel Munteanu
2024-05-25  9:53 Viorel Munteanu
2024-05-03 17:41 Viorel Munteanu
2024-05-03 17:41 Viorel Munteanu
2024-05-01  5:00 Viorel Munteanu
2024-05-01  5:00 Viorel Munteanu
2024-04-30  4:25 Viorel Munteanu
2024-04-30  4:25 Viorel Munteanu
2024-04-19  7:12 Viorel Munteanu
2024-04-17 19:56 Viorel Munteanu
2024-03-19 17:20 Viorel Munteanu
2024-01-27  7:44 Sam James
2024-01-27  7:34 Sam James
2024-01-25 15:50 Viorel Munteanu
2024-01-25 10:08 Viorel Munteanu
2024-01-25 10:08 Viorel Munteanu
2024-01-25  9:51 Viorel Munteanu
2024-01-25  9:51 Viorel Munteanu
2024-01-18 11:47 Viorel Munteanu
2024-01-17 17:38 Viorel Munteanu
2024-01-17 17:38 Viorel Munteanu
2023-10-18  4:08 Viorel Munteanu
2023-10-17 19:22 Sam James
2023-08-26 11:50 Viorel Munteanu
2023-08-15 12:16 Viorel Munteanu
2023-08-03 20:45 Sam James
2023-07-20  9:40 Viorel Munteanu
2023-07-20  9:40 Viorel Munteanu
2023-05-29 20:10 Sam James
2023-05-29 14:13 Sam James
2023-05-01  5:41 Viorel Munteanu
2023-04-30 11:12 Viorel Munteanu
2023-04-21 16:38 Viorel Munteanu
2023-04-21 16:38 Viorel Munteanu
2023-03-18  8:27 Viorel Munteanu
2023-02-21 15:06 Viorel Munteanu
2023-02-21 15:06 Viorel Munteanu
2023-02-15  5:12 Sam James
2023-02-15  5:12 Sam James
2023-02-08 17:13 Sam James
2023-02-03 14:35 Viorel Munteanu
2023-01-24  8:36 Viorel Munteanu
2023-01-22  9:59 Viorel Munteanu
2023-01-22  9:59 Viorel Munteanu
2023-01-13 13:15 Viorel Munteanu
2023-01-11 12:54 Arthur Zamarin
2022-12-10  9:56 Viorel Munteanu
2022-12-10  9:56 Viorel Munteanu
2022-11-20 10:13 Viorel Munteanu
2022-11-20  8:20 Viorel Munteanu
2022-11-20  8:20 Viorel Munteanu
2022-11-20  8:20 Viorel Munteanu
2022-11-20  8:20 Viorel Munteanu
2022-11-20  8:20 Viorel Munteanu
2022-11-20  8:20 Viorel Munteanu
2022-11-02 16:17 Viorel Munteanu
2022-10-27  8:35 Joonas Niilola
2022-10-17 21:05 Sam James
2022-10-06 10:23 Joonas Niilola
2022-09-05  1:22 Sam James
2022-09-05  1:22 Sam James
2022-08-23 20:48 Sam James
2022-08-23 18:57 Sam James
2022-08-13 19:24 Sam James
2022-08-08  9:40 Andreas Sturmlechner
2022-07-24 23:23 Sam James
2022-07-06  9:23 Sam James
2022-07-06  8:09 Sam James
2022-07-06  8:06 Sam James
2022-07-06  6:05 Sam James
2022-07-06  3:18 Sam James
2022-07-06  3:01 Sam James
2022-07-06  3:01 Sam James
2022-07-06  2:06 Sam James
2022-04-04 18:28 Jakov Smolić
2022-03-16 17:07 Sam James
2022-01-29 18:38 Sam James
2022-01-27 13:57 Lars Wendler
2022-01-12  2:45 Sam James
2021-12-06 21:11 Jakov Smolić
2021-11-06 20:53 Sam James
2021-07-30 22:55 David Seifert
2021-07-19 18:36 Sam James
2021-04-30 23:34 Sam James
2021-04-30 13:16 Mikle Kolyada
2021-04-21  9:55 Lars Wendler
2021-01-22  1:48 Sam James
2021-01-06  3:10 Sam James
2020-12-08 12:12 Lars Wendler
2020-12-08 12:12 Lars Wendler
2020-09-11 15:37 Lars Wendler
2020-09-09  8:10 Lars Wendler
2020-09-02  3:55 Sam James
2020-08-30  1:32 Thomas Deutschmann
2020-06-24 21:04 Ulrich Müller
2020-06-14 15:13 Lars Wendler
2020-05-07 13:18 Michał Górny
2020-04-26 23:44 Thomas Deutschmann
2020-04-22 14:03 Mikle Kolyada
2020-03-29  7:19 Mikle Kolyada
2020-03-27 12:43 Lars Wendler
2020-03-27 12:43 Lars Wendler
2020-03-27 12:43 Lars Wendler
2020-02-25 17:15 Lars Wendler
2019-12-17 12:42 Lars Wendler
2019-12-15 11:03 Lars Wendler
2019-12-13 19:17 Lars Wendler
2019-11-28 15:40 Lars Wendler
2019-09-15  9:04 Mikle Kolyada
2019-09-07 21:07 Thomas Deutschmann
2019-08-28 14:34 David Seifert
2019-07-21 17:54 Michał Górny
2019-07-18  7:18 Lars Wendler
2019-07-17  8:52 Lars Wendler
2019-05-09 13:06 Lars Wendler
2019-04-20 11:31 Lars Wendler
2019-04-18 20:32 Thomas Deutschmann
2019-04-08 13:15 Mikle Kolyada
2019-04-02  9:43 Lars Wendler
2019-01-16 19:50 Lars Wendler
2018-11-28  2:07 Thomas Deutschmann
2018-11-25  9:25 Mikle Kolyada
2018-11-17 15:29 Lars Wendler
2018-11-17 11:55 Lars Wendler
2018-11-16 16:32 Lars Wendler
2018-11-16 14:48 Lars Wendler
2018-07-22 17:07 Mikle Kolyada
2018-07-19  8:39 Lars Wendler
2018-07-19  8:37 Lars Wendler
2018-07-18 10:07 Lars Wendler
2018-07-16 23:42 Lars Wendler
2018-07-16  9:46 Lars Wendler
2018-07-16  9:46 Lars Wendler
2018-07-03 18:52 Jonas Stein
2018-07-02  9:42 Lars Wendler
2018-05-08 15:15 Agostino Sarubbo
2018-05-07 23:55 Thomas Deutschmann
2018-03-03 21:33 James Le Cuirot
2018-02-19 14:45 Lars Wendler
2018-02-16 14:56 Lars Wendler
2018-01-21 20:30 Thomas Deutschmann
2018-01-18 21:41 Mikle Kolyada
2018-01-02 16:33 Lars Wendler
2017-12-29 17:42 Mikle Kolyada
2017-12-26  2:06 Thomas Deutschmann
2017-10-17  9:44 Lars Wendler
2017-10-02 22:18 Lars Wendler
2017-08-06 20:43 Lars Wendler
2017-08-06 15:57 Aaron Bauman
2017-07-28  6:41 Lars Wendler
2017-07-23 19:13 Lars Wendler
2017-04-07  8:24 Lars Wendler
2017-03-28 16:31 Lars Wendler
2017-02-03 15:13 Lars Wendler
2017-01-31 12:31 Tobias Klausmann
2016-09-20 12:12 Lars Wendler
2016-09-02 15:09 Ian Stakenvicius
2016-08-17 13:07 Lars Wendler
2016-07-27 10:05 Jeroen Roovers
2016-07-26  8:38 Lars Wendler
2016-07-14 15:30 Lars Wendler
2016-07-14  9:28 Lars Wendler
2016-07-13 20:24 Lars Wendler
2016-07-13 10:16 Lars Wendler
2016-06-13 14:23 Lars Wendler
2016-05-15 19:36 Lars Wendler
2016-03-21 10:59 Patrick Lauer
2016-03-11 21:50 Lars Wendler
2016-03-07 14:51 Lars Wendler
2016-03-07 14:51 Lars Wendler
2016-03-05 22:38 Mikle Kolyada
2016-02-22  8:42 Patrick Lauer
2015-11-19 21:28 Lars Wendler
2015-11-06  8:46 Mikle Kolyada
2015-10-21  6:40 Lars Wendler
2015-10-06 10:26 Julian Ospald
2015-09-10 21:01 Lars Wendler
2015-08-30 11:32 Lars Wendler
2015-08-16 13:53 Patrice Clement

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1697602035.f093feb82664a221d2dabede63219decbd6ae3f0.ceamac@gentoo \
    --to=ceamac@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox