public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/files/, app-emulation/virtualbox/
Date: Wed,  6 Jul 2022 03:01:42 +0000 (UTC)	[thread overview]
Message-ID: <1657076481.0e7860b78e08743e7ba8a9d641a085e349811f83.sam@gentoo> (raw)

commit:     0e7860b78e08743e7ba8a9d641a085e349811f83
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jul  6 02:59:20 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jul  6 03:01:21 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e7860b7

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 <AT> gentoo.org>

 .../files/virtualbox-6.1.34-r3-python.patch        | 14 +++++
 .../virtualbox/virtualbox-6.1.34-r3.ebuild         | 64 +++++++++++++++-------
 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() {


             reply	other threads:[~2022-07-06  3:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-06  3:01 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-18 13:32 [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/files/, app-emulation/virtualbox/ Viorel Munteanu
2023-09-30  4:36 Viorel Munteanu
2023-06-15 10:44 Viorel Munteanu
2023-05-30  5:22 Viorel Munteanu
2023-01-22  9:59 Viorel Munteanu
2023-01-11 15:38 Viorel Munteanu
2022-07-27 21:05 Sam James
2022-07-06  3:01 Sam James
2022-06-15 12:37 Lars Wendler
2022-06-15 12:37 Lars Wendler
2021-08-03 11:18 Lars Wendler
2019-02-02 10:41 Lars Wendler
2018-12-07 20:17 Lars Wendler
2018-04-11  7:54 Lars Wendler
2016-12-09 22:28 Lars Wendler
2015-09-29 13:29 Lars Wendler

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=1657076481.0e7860b78e08743e7ba8a9d641a085e349811f83.sam@gentoo \
    --to=sam@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