1 |
commit: 0e7860b78e08743e7ba8a9d641a085e349811f83 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jul 6 02:59:20 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jul 6 03:01:21 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e7860b7 |
7 |
|
8 |
app-emulation/virtualbox: drop Python 3.10 for now |
9 |
|
10 |
Didn't really want to do this but it's going to take substantially |
11 |
more work to get it running. |
12 |
|
13 |
Two issues (as described in the ebuild comment I've added): |
14 |
1. The build system (not just configure) does a huge amount of |
15 |
autodetection; |
16 |
|
17 |
2. Its infra isn't set up to build Python 3.10+ yet (as in, |
18 |
no targets defined, and they're all manually written). And |
19 |
it doesn't seem to even use the result of configure? |
20 |
|
21 |
It'll take more work to get this done and dropping 3.10 for now, |
22 |
while it's unfortunate, means it's at least not in a broken state |
23 |
until then. |
24 |
|
25 |
I've left in the partial work commented out given it gets |
26 |
us part of the way there. As far as I can tell, the configure |
27 |
stuff isn't even used for the subsequent actual building |
28 |
of the modules. |
29 |
|
30 |
Bug: https://bugs.gentoo.org/856121 |
31 |
Bug: https://bugs.gentoo.org/785835 |
32 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
33 |
|
34 |
.../files/virtualbox-6.1.34-r3-python.patch | 14 +++++ |
35 |
.../virtualbox/virtualbox-6.1.34-r3.ebuild | 64 +++++++++++++++------- |
36 |
2 files changed, 58 insertions(+), 20 deletions(-) |
37 |
|
38 |
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 |
39 |
new file mode 100644 |
40 |
index 000000000000..3a6da1f681c1 |
41 |
--- /dev/null |
42 |
+++ b/app-emulation/virtualbox/files/virtualbox-6.1.34-r3-python.patch |
43 |
@@ -0,0 +1,14 @@ |
44 |
+diff --git a/configure b/configure |
45 |
+index fd2e296..695f6a7 100755 |
46 |
+--- a/configure |
47 |
++++ b/configure |
48 |
+@@ -1987,6 +1987,9 @@ check_python() |
49 |
+ { |
50 |
+ test_header "Python support" |
51 |
+ |
52 |
++ # We force the right implementation in the ebuild instead |
53 |
++ return |
54 |
++ |
55 |
+ # On darwin this is a on/off decision only |
56 |
+ if [ "$OS" = "darwin" ]; then |
57 |
+ echo "enabled" |
58 |
|
59 |
diff --git a/app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild b/app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild |
60 |
index db2898848eba..a352a9dd329b 100644 |
61 |
--- a/app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild |
62 |
+++ b/app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild |
63 |
@@ -3,7 +3,16 @@ |
64 |
|
65 |
EAPI=8 |
66 |
|
67 |
-PYTHON_COMPAT=( python3_{8..10} ) |
68 |
+# This absolutely doesn't work with Python 3.10 yet as of 6.1.34. |
69 |
+# Two problems: |
70 |
+# 1. The build system (not just in configure, but in src/libs/xpcom18a4/python/Makefile.kmk) |
71 |
+# insists on trying to detect various Python paths without giving choice of which is used; |
72 |
+# |
73 |
+# 2. None of that machinery mentioned in #1. is rigged up for Python 3.10+, and |
74 |
+# the homebrew Makefile/kbuild stuff is a pain to understand. |
75 |
+# |
76 |
+# bug #785835, bug #856121 |
77 |
+PYTHON_COMPAT=( python3_{8,9} ) |
78 |
inherit desktop edo java-pkg-opt-2 linux-info multilib optfeature pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg |
79 |
|
80 |
MY_PN="VirtualBox" |
81 |
@@ -135,9 +144,12 @@ REQUIRED_USE=" |
82 |
" |
83 |
|
84 |
PATCHES=( |
85 |
- "${FILESDIR}/${P}-vboxr0.patch" |
86 |
- "${FILESDIR}/${PN}-6.1.34-python3.10.patch" # bug #852152 |
87 |
- "${FILESDIR}/${PN}-6.1.34-no-pam.patch" # bug #843437 |
88 |
+ "${FILESDIR}"/${P}-vboxr0.patch |
89 |
+ "${FILESDIR}"/${PN}-6.1.34-python3.10.patch # bug #852152 |
90 |
+ "${FILESDIR}"/${PN}-6.1.34-no-pam.patch # bug #843437 |
91 |
+ "${FILESDIR}"/${PN}-6.1.26-configure-include-qt5-path.patch # bug #805365 |
92 |
+ "${FILESDIR}"/${PN}-6.1.34-r3-python.patch |
93 |
+ "${WORKDIR}"/patches |
94 |
) |
95 |
|
96 |
pkg_pretend() { |
97 |
@@ -164,6 +176,18 @@ pkg_setup() { |
98 |
} |
99 |
|
100 |
src_prepare() { |
101 |
+ default |
102 |
+ |
103 |
+ # Only add nopie patch when we're on hardened |
104 |
+ if gcc-specs-pie ; then |
105 |
+ eapply "${FILESDIR}"/050_virtualbox-5.2.8-nopie.patch |
106 |
+ fi |
107 |
+ |
108 |
+ # Only add paxmark patch when we're on pax-kernel |
109 |
+ if use pax-kernel ; then |
110 |
+ eapply "${FILESDIR}"/virtualbox-5.2.8-paxmark-bldprogs.patch |
111 |
+ fi |
112 |
+ |
113 |
# Remove shipped binaries (kBuild,yasm), see bug #232775 |
114 |
rm -r kBuild/bin tools || die |
115 |
|
116 |
@@ -204,22 +228,6 @@ src_prepare() { |
117 |
-i "${S}"/Config.kmk || die |
118 |
java-pkg-opt-2_src_prepare |
119 |
fi |
120 |
- |
121 |
- # Only add nopie patch when we're on hardened |
122 |
- if gcc-specs-pie ; then |
123 |
- eapply "${FILESDIR}/050_virtualbox-5.2.8-nopie.patch" |
124 |
- fi |
125 |
- |
126 |
- # Only add paxmark patch when we're on pax-kernel |
127 |
- if use pax-kernel ; then |
128 |
- eapply "${FILESDIR}"/virtualbox-5.2.8-paxmark-bldprogs.patch |
129 |
- fi |
130 |
- |
131 |
- eapply "${FILESDIR}/${PN}-6.1.26-configure-include-qt5-path.patch" #805365 |
132 |
- |
133 |
- eapply "${WORKDIR}/patches" |
134 |
- |
135 |
- default |
136 |
} |
137 |
|
138 |
src_configure() { |
139 |
@@ -270,6 +278,22 @@ src_configure() { |
140 |
|
141 |
# not an autoconf script |
142 |
edo ./configure "${myconf[@]}" |
143 |
+ |
144 |
+ # Try to force usage of chosen Python implementation |
145 |
+ # Commented out for now as it's insufficient (see comment above |
146 |
+ # PYTHON_COMPAT). |
147 |
+ # bug #856121, bug #785835 |
148 |
+ #sed -i \ |
149 |
+ # -e '/VBOX_WITH_PYTHON.*=/d' \ |
150 |
+ # -e '/VBOX_PATH_PYTHON_INC.*=/d' \ |
151 |
+ # -e '/VBOX_LIB_PYTHON.*=/d' \ |
152 |
+ # AutoConfig.kmk || die |
153 |
+ # |
154 |
+ #cat >> AutoConfig.kmk <<-EOF || die |
155 |
+ # VBOX_WITH_PYTHON=$(usex python 1 0) |
156 |
+ # VBOX_PATH_PYTHON_INC=$(python_get_includedir) |
157 |
+ # VBOX_LIB_PYTHON=$(python_get_library_path) |
158 |
+ #EOF |
159 |
} |
160 |
|
161 |
src_compile() { |