summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-07-06 03:59:20 +0100
committerSam James <sam@gentoo.org>2022-07-06 04:01:21 +0100
commit0e7860b78e08743e7ba8a9d641a085e349811f83 (patch)
treecaf322df1e4d344fdabd36a50e149d5ee3d3d6d1
parentapp-emulation/virtualbox: use optfeature (diff)
downloadgentoo-0e7860b78e08743e7ba8a9d641a085e349811f83.tar.gz
gentoo-0e7860b78e08743e7ba8a9d641a085e349811f83.tar.bz2
gentoo-0e7860b78e08743e7ba8a9d641a085e349811f83.zip
app-emulation/virtualbox: drop Python 3.10 for now
Didn't really want to do this but it's going to take substantially more work to get it running. Two issues (as described in the ebuild comment I've added): 1. The build system (not just configure) does a huge amount of autodetection; 2. Its infra isn't set up to build Python 3.10+ yet (as in, no targets defined, and they're all manually written). And it doesn't seem to even use the result of configure? It'll take more work to get this done and dropping 3.10 for now, while it's unfortunate, means it's at least not in a broken state until then. I've left in the partial work commented out given it gets us part of the way there. As far as I can tell, the configure stuff isn't even used for the subsequent actual building of the modules. Bug: https://bugs.gentoo.org/856121 Bug: https://bugs.gentoo.org/785835 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--app-emulation/virtualbox/files/virtualbox-6.1.34-r3-python.patch14
-rw-r--r--app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild64
2 files changed, 58 insertions, 20 deletions
diff --git a/app-emulation/virtualbox/files/virtualbox-6.1.34-r3-python.patch b/app-emulation/virtualbox/files/virtualbox-6.1.34-r3-python.patch
new file mode 100644
index 000000000000..3a6da1f681c1
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-6.1.34-r3-python.patch
@@ -0,0 +1,14 @@
+diff --git a/configure b/configure
+index fd2e296..695f6a7 100755
+--- a/configure
++++ b/configure
+@@ -1987,6 +1987,9 @@ check_python()
+ {
+ test_header "Python support"
+
++ # We force the right implementation in the ebuild instead
++ return
++
+ # On darwin this is a on/off decision only
+ if [ "$OS" = "darwin" ]; then
+ echo "enabled"
diff --git a/app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild b/app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild
index db2898848eba..a352a9dd329b 100644
--- a/app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild
+++ b/app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild
@@ -3,7 +3,16 @@
EAPI=8
-PYTHON_COMPAT=( python3_{8..10} )
+# This absolutely doesn't work with Python 3.10 yet as of 6.1.34.
+# Two problems:
+# 1. The build system (not just in configure, but in src/libs/xpcom18a4/python/Makefile.kmk)
+# insists on trying to detect various Python paths without giving choice of which is used;
+#
+# 2. None of that machinery mentioned in #1. is rigged up for Python 3.10+, and
+# the homebrew Makefile/kbuild stuff is a pain to understand.
+#
+# bug #785835, bug #856121
+PYTHON_COMPAT=( python3_{8,9} )
inherit desktop edo java-pkg-opt-2 linux-info multilib optfeature pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg
MY_PN="VirtualBox"
@@ -135,9 +144,12 @@ REQUIRED_USE="
"
PATCHES=(
- "${FILESDIR}/${P}-vboxr0.patch"
- "${FILESDIR}/${PN}-6.1.34-python3.10.patch" # bug #852152
- "${FILESDIR}/${PN}-6.1.34-no-pam.patch" # bug #843437
+ "${FILESDIR}"/${P}-vboxr0.patch
+ "${FILESDIR}"/${PN}-6.1.34-python3.10.patch # bug #852152
+ "${FILESDIR}"/${PN}-6.1.34-no-pam.patch # bug #843437
+ "${FILESDIR}"/${PN}-6.1.26-configure-include-qt5-path.patch # bug #805365
+ "${FILESDIR}"/${PN}-6.1.34-r3-python.patch
+ "${WORKDIR}"/patches
)
pkg_pretend() {
@@ -164,6 +176,18 @@ 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
+
+ # Only add paxmark patch when we're on pax-kernel
+ if use pax-kernel ; then
+ eapply "${FILESDIR}"/virtualbox-5.2.8-paxmark-bldprogs.patch
+ fi
+
# Remove shipped binaries (kBuild,yasm), see bug #232775
rm -r kBuild/bin tools || die
@@ -204,22 +228,6 @@ src_prepare() {
-i "${S}"/Config.kmk || die
java-pkg-opt-2_src_prepare
fi
-
- # Only add nopie patch when we're on hardened
- if gcc-specs-pie ; then
- eapply "${FILESDIR}/050_virtualbox-5.2.8-nopie.patch"
- fi
-
- # Only add paxmark patch when we're on pax-kernel
- if use pax-kernel ; then
- eapply "${FILESDIR}"/virtualbox-5.2.8-paxmark-bldprogs.patch
- fi
-
- eapply "${FILESDIR}/${PN}-6.1.26-configure-include-qt5-path.patch" #805365
-
- eapply "${WORKDIR}/patches"
-
- default
}
src_configure() {
@@ -270,6 +278,22 @@ src_configure() {
# not an autoconf script
edo ./configure "${myconf[@]}"
+
+ # Try to force usage of chosen Python implementation
+ # Commented out for now as it's insufficient (see comment above
+ # PYTHON_COMPAT).
+ # 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=$(usex python 1 0)
+ # VBOX_PATH_PYTHON_INC=$(python_get_includedir)
+ # VBOX_LIB_PYTHON=$(python_get_library_path)
+ #EOF
}
src_compile() {