From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E3DBB15800A for ; Sat, 26 Aug 2023 11:50:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1C1532BC146; Sat, 26 Aug 2023 11:50:30 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EE6362BC146 for ; Sat, 26 Aug 2023 11:50:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C7218340D19 for ; Sat, 26 Aug 2023 11:50:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 110721044 for ; Sat, 26 Aug 2023 11:50:27 +0000 (UTC) From: "Viorel Munteanu" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Viorel Munteanu" Message-ID: <1693050608.93ab26a36f5d15fef87efa4db2a26ec844289bdc.ceamac@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-emulation/virtualbox/virtualbox-7.0.10-r1.ebuild app-emulation/virtualbox/virtualbox-9999.ebuild X-VCS-Directories: app-emulation/virtualbox/ X-VCS-Committer: ceamac X-VCS-Committer-Name: Viorel Munteanu X-VCS-Revision: 93ab26a36f5d15fef87efa4db2a26ec844289bdc X-VCS-Branch: master Date: Sat, 26 Aug 2023 11:50:27 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d09ff0d4-5b7b-4b4a-b079-8983e0360a27 X-Archives-Hash: 68100a305909240eb852d495dc246b1f commit: 93ab26a36f5d15fef87efa4db2a26ec844289bdc Author: Viorel Munteanu gentoo org> AuthorDate: Sat Aug 26 11:31:58 2023 +0000 Commit: Viorel Munteanu gentoo org> CommitDate: Sat Aug 26 11:50:08 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93ab26a3 app-emulation/virtualbox: install python vboxapi Closes: https://bugs.gentoo.org/378871 Signed-off-by: Viorel Munteanu gentoo.org> ...box-9999.ebuild => virtualbox-7.0.10-r1.ebuild} | 85 ++++++++++------------ app-emulation/virtualbox/virtualbox-9999.ebuild | 22 +++++- 2 files changed, 58 insertions(+), 49 deletions(-) diff --git a/app-emulation/virtualbox/virtualbox-9999.ebuild b/app-emulation/virtualbox/virtualbox-7.0.10-r1.ebuild similarity index 92% copy from app-emulation/virtualbox/virtualbox-9999.ebuild copy to app-emulation/virtualbox/virtualbox-7.0.10-r1.ebuild index 3479b65025f4..d663f08829a9 100644 --- a/app-emulation/virtualbox/virtualbox-9999.ebuild +++ b/app-emulation/virtualbox/virtualbox-7.0.10-r1.ebuild @@ -3,15 +3,6 @@ EAPI=8 -# Important! -# This compiles the latest svn version. -# It also compiles the kernel modules. Does not depend on virtualbox-modules. -# It is not meant to be used, might be very unstable. -# Upstream seem to have added support for python 3.12; I haven't checked it yet. -# -# USE=doc does not work for now. -# -# # 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 @@ -24,26 +15,26 @@ EAPI=8 # trunk branch but not release branch. # # See bug #785835, bug #856121. -PYTHON_COMPAT=( python3_{9..12} ) +PYTHON_COMPAT=( python3_{10..11} ) -inherit desktop edo flag-o-matic java-pkg-opt-2 linux-mod-r1 multilib optfeature pax-utils \ - python-single-r1 subversion tmpfiles toolchain-funcs udev xdg +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" -BASE_PV=7.0.8 MY_P=${MY_PN}-${PV} DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use" HOMEPAGE="https://www.virtualbox.org/" -ESVN_REPO_URI="https://www.virtualbox.org/svn/vbox/trunk" SRC_URI=" - https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-7.0.10_pre20230615.tar.bz2 - gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${PN}-help-${BASE_PV}.tar.xz ) ) + https://download.virtualbox.org/virtualbox/${PV}/${MY_P}.tar.bz2 + https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-7.0.8.tar.bz2 + gui? ( !doc? ( https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${PN}-help-${PV}.tar.xz ) ) " -S="${WORKDIR}/trunk" +S="${WORKDIR}/${MY_PN}-${PV}" LICENSE="GPL-2+ GPL-3 LGPL-2.1 MIT dtrace? ( CDDL )" SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64" IUSE="alsa dbus debug doc dtrace +gui java lvm nls pam pch pulseaudio +opengl python +sdk +sdl +udev vboxwebsrv vde vnc" unset WATCOM #856769 @@ -51,6 +42,7 @@ unset WATCOM #856769 COMMON_DEPEND=" ${PYTHON_DEPS} acct-group/vboxusers + ~app-emulation/virtualbox-modules-${PV} dev-libs/libtpms dev-libs/libxml2 dev-libs/openssl:0= @@ -134,7 +126,6 @@ RDEPEND=" " BDEPEND=" ${PYTHON_DEPS} - app-arch/makeself >=app-arch/tar-1.34-r2 >=dev-lang/yasm-0.6.2 dev-libs/libIDL @@ -211,18 +202,15 @@ PATCHES=( "${FILESDIR}"/${PN}-6.1.36-fcf-protection.patch "${FILESDIR}"/${PN}-7.0.0-fix-compilation-clang.patch - "${FILESDIR}"/${PN}-7.0.9-python.patch + "${FILESDIR}"/${PN}-7.0.10-python.patch "${FILESDIR}"/${PN}-7.0.6-gcc-13.patch "${FILESDIR}"/${PN}-7.0.8-mtune-keep-size.patch + "${FILESDIR}"/${PN}-7.0.6-fix-libxml2.patch # Downloaded patchset - "${WORKDIR}"/virtualbox-patches-7.0.10_pre20230615/patches + "${WORKDIR}"/virtualbox-patches-7.0.8/patches ) -DOCS=() # Don't install the default README file during einstalldocs - -CONFIG_CHECK="~!SPINLOCK JUMP_LABEL" - pkg_pretend() { if ! use gui; then einfo "No USE=\"gui\" selected, this build will not include any Qt frontend." @@ -254,12 +242,6 @@ pkg_pretend() { pkg_setup() { java-pkg-opt-2_pkg_setup python-single-r1_pkg_setup - linux-mod-r1_pkg_setup -} - -src_unpack() { - subversion_src_unpack - default } src_prepare() { @@ -511,21 +493,9 @@ src_compile() { fi MAKE="kmk" emake "${myemakeargs[@]}" all - - local modlist=( {vboxdrv,vboxnetflt,vboxnetadp}=misc:"out/linux.${ARCH}/release/bin/src" ) - local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" ) - linux-mod-r1_src_compile } src_install() { - linux-mod-r1_src_install - insinto /usr/lib/modules-load.d/ - newins - virtualbox.conf <<-EOF - vboxdrv - vboxnetflt - vboxnetadp - EOF - cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die local vbox_inst_path="/usr/$(get_libdir)/${PN}" each size ico icofile @@ -598,7 +568,10 @@ src_install() { fi # set an env-variable for 3rd party tools - echo -n "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox" + 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 @@ -617,6 +590,11 @@ src_install() { 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 @@ -707,7 +685,7 @@ src_install() { dodoc UserManual.pdf UserManual.q{ch,hc} docompress -x /usr/share/doc/${PF} elif use gui; then - dodoc "${WORKDIR}"/${PN}-help-${BASE_PV}/UserManual.q{ch,hc} + dodoc "${WORKDIR}"/${PN}-help-${PV}/UserManual.q{ch,hc} docompress -x /usr/share/doc/${PF} fi @@ -719,14 +697,27 @@ src_install() { eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles." die "Incomplete installation of Python bindings! File a bug with Gentoo!" fi + + # 378871 + local installer_dir="${ED}/usr/$(get_libdir)/virtualbox/sdk/installer" + pushd "${installer_dir}" &> /dev/null || die + sed -e "s;%VBOX_INSTALL_PATH%;${vbox_inst_path};" \ + -e "s;%VBOX_SDK_PATH%;${vbox_inst_path}/sdk;" \ + -i vboxapi/__init__.py || die + # insert shebang, the files come without one + find vboxapi -name \*.py -exec sed -e "1 i\#! ${PYTHON}" -i {} \+ || die + python_domodule vboxapi + popd &> /dev/null || die + python_doscript vboxshell.py + + # do not install the installer + rm -r "${installer_dir}" || die fi newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf } pkg_postinst() { - linux-mod-r1_pkg_postinst - xdg_pkg_postinst if use udev; then @@ -743,7 +734,7 @@ pkg_postinst() { elog "You must be in the vboxusers group to use VirtualBox." elog "" elog "The latest user manual is available for download at:" - elog "https://download.virtualbox.org/virtualbox/${BASE_PV}/UserManual.pdf" + elog "https://download.virtualbox.org/virtualbox/${PV}/UserManual.pdf" elog "" optfeature "Advanced networking setups" net-misc/bridge-utils sys-apps/usermode-utilities diff --git a/app-emulation/virtualbox/virtualbox-9999.ebuild b/app-emulation/virtualbox/virtualbox-9999.ebuild index 3479b65025f4..9048fa58d8a6 100644 --- a/app-emulation/virtualbox/virtualbox-9999.ebuild +++ b/app-emulation/virtualbox/virtualbox-9999.ebuild @@ -24,7 +24,7 @@ EAPI=8 # trunk branch but not release branch. # # See bug #785835, bug #856121. -PYTHON_COMPAT=( python3_{9..12} ) +PYTHON_COMPAT=( python3_{10..11} ) inherit desktop edo flag-o-matic java-pkg-opt-2 linux-mod-r1 multilib optfeature pax-utils \ python-single-r1 subversion tmpfiles toolchain-funcs udev xdg @@ -598,7 +598,10 @@ src_install() { fi # set an env-variable for 3rd party tools - echo -n "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox" + 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 @@ -719,6 +722,21 @@ src_install() { eerror "(listed in PYTHON_COMPAT in the ebuild) is incomplete within the Makefiles." die "Incomplete installation of Python bindings! File a bug with Gentoo!" fi + + # 378871 + local installer_dir="${ED}/usr/$(get_libdir)/virtualbox/sdk/installer" + pushd "${installer_dir}" &> /dev/null || die + sed -e "s;%VBOX_INSTALL_PATH%;${vbox_inst_path};" \ + -e "s;%VBOX_SDK_PATH%;${vbox_inst_path}/sdk;" \ + -i vboxapi/__init__.py || die + # insert shebang, the files come without one + find vboxapi -name \*.py -exec sed -e "1 i\#! ${PYTHON}" -i {} \+ || die + python_domodule vboxapi + popd &> /dev/null || die + python_doscript vboxshell.py + + # do not install the installer + rm -r "${installer_dir}" || die fi newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf