1 |
commit: 19111a37141aee3704830806a4419c1cced2d131 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jul 6 02:14:51 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jul 6 02:14:54 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19111a37 |
7 |
|
8 |
app-emulation/virtualbox: fix build w/o PAM; respect CFLAGS |
9 |
|
10 |
Closes: https://bugs.gentoo.org/583148 |
11 |
Closes: https://bugs.gentoo.org/843437 |
12 |
Thanks-to: François-Xavier Carton <fx.carton91 <AT> gmail.com> |
13 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
14 |
|
15 |
.../files/virtualbox-6.1.34-no-pam.patch | 22 +++++++++++++++ |
16 |
....1.34-r2.ebuild => virtualbox-6.1.34-r3.ebuild} | 32 ++++++++++++---------- |
17 |
2 files changed, 39 insertions(+), 15 deletions(-) |
18 |
|
19 |
diff --git a/app-emulation/virtualbox/files/virtualbox-6.1.34-no-pam.patch b/app-emulation/virtualbox/files/virtualbox-6.1.34-no-pam.patch |
20 |
new file mode 100644 |
21 |
index 000000000000..9266cece55bd |
22 |
--- /dev/null |
23 |
+++ b/app-emulation/virtualbox/files/virtualbox-6.1.34-no-pam.patch |
24 |
@@ -0,0 +1,22 @@ |
25 |
+https://bugs.gentoo.org/843437 |
26 |
+https://www.virtualbox.org/changeset/94406/vbox |
27 |
+ |
28 |
+--- a/src/VBox/Runtime/Makefile.kmk |
29 |
++++ b/src/VBox/Runtime/Makefile.kmk |
30 |
+@@ -324,4 +324,7 @@ |
31 |
+ ifdef IPRT_WITH_FUTEX_BASED_SEMS |
32 |
+ RuntimeR3_DEFS.linux += IPRT_WITH_FUTEX_BASED_SEMS |
33 |
++endif |
34 |
++ifdef IPRT_WITHOUT_PAM |
35 |
++ RuntimeR3_DEFS += IPRT_WITHOUT_PAM |
36 |
+ endif |
37 |
+ RuntimeR3_INCS = \ |
38 |
+--- a/src/VBox/Runtime/r3/posix/process-creation-posix.cpp |
39 |
++++ b/src/VBox/Runtime/r3/posix/process-creation-posix.cpp |
40 |
+@@ -86,4 +86,5 @@ |
41 |
+ |
42 |
+ #if !defined(IPRT_USE_PAM) \ |
43 |
++ && !defined(IPRT_WITHOUT_PAM) \ |
44 |
+ && ( defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX) || defined(RT_OS_NETBSD) || defined(RT_OS_OPENBSD) ) |
45 |
+ # define IPRT_USE_PAM |
46 |
+ |
47 |
|
48 |
diff --git a/app-emulation/virtualbox/virtualbox-6.1.34-r2.ebuild b/app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild |
49 |
similarity index 96% |
50 |
rename from app-emulation/virtualbox/virtualbox-6.1.34-r2.ebuild |
51 |
rename to app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild |
52 |
index 73fc49ceb444..3920e11b0d57 100644 |
53 |
--- a/app-emulation/virtualbox/virtualbox-6.1.34-r2.ebuild |
54 |
+++ b/app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild |
55 |
@@ -4,23 +4,25 @@ |
56 |
EAPI=8 |
57 |
|
58 |
PYTHON_COMPAT=( python3_{8..10} ) |
59 |
-inherit desktop flag-o-matic java-pkg-opt-2 linux-info pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg |
60 |
+inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg |
61 |
|
62 |
MY_PN="VirtualBox" |
63 |
MY_PV="${PV/beta/BETA}" |
64 |
MY_PV="${MY_PV/rc/RC}" |
65 |
MY_P=${MY_PN}-${MY_PV} |
66 |
-[[ "${PV}" == *a ]] && DIR_PV="$(ver_cut 1-3)" |
67 |
+[[ ${PV} == *a ]] && DIR_PV="$(ver_cut 1-3)" |
68 |
|
69 |
DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use" |
70 |
HOMEPAGE="https://www.virtualbox.org/" |
71 |
SRC_URI="https://download.virtualbox.org/virtualbox/${DIR_PV:-${MY_PV}}/${MY_P}.tar.bz2 |
72 |
https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-6.1.12-patches-01.tar.xz" |
73 |
+S="${WORKDIR}/${MY_PN}-${DIR_PV:-${MY_PV}}" |
74 |
|
75 |
LICENSE="GPL-2 dtrace? ( CDDL )" |
76 |
SLOT="0/$(ver_cut 1-2)" |
77 |
-[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \ |
78 |
-KEYWORDS="~amd64" |
79 |
+if [[ ${PV} != *_beta* ]] && [[ ${PV} != *_rc* ]] ; then |
80 |
+ KEYWORDS="~amd64" |
81 |
+fi |
82 |
IUSE="alsa debug doc dtrace headless java lvm +opus pam pax-kernel pch pulseaudio +opengl python +qt5 +sdk +udev vboxwebsrv vnc" |
83 |
|
84 |
COMMON_DEPEND=" |
85 |
@@ -121,12 +123,10 @@ QA_WX_LOAD=" |
86 |
" |
87 |
|
88 |
QA_PRESTRIPPED=" |
89 |
- /usr/lib64/virtualbox/VMMR0.r0 |
90 |
- /usr/lib64/virtualbox/VBoxDDR0.r0 |
91 |
+ usr/lib64/virtualbox/VMMR0.r0 |
92 |
+ usr/lib64/virtualbox/VBoxDDR0.r0 |
93 |
" |
94 |
|
95 |
-S="${WORKDIR}/${MY_PN}-${DIR_PV:-${MY_PV}}" |
96 |
- |
97 |
REQUIRED_USE=" |
98 |
java? ( sdk ) |
99 |
python? ( sdk ) |
100 |
@@ -136,7 +136,8 @@ REQUIRED_USE=" |
101 |
|
102 |
PATCHES=( |
103 |
"${FILESDIR}/${P}-vboxr0.patch" |
104 |
- "${FILESDIR}/${PN}-6.1.34-python3.10.patch" #852152 |
105 |
+ "${FILESDIR}/${PN}-6.1.34-python3.10.patch" # bug #852152 |
106 |
+ "${FILESDIR}/${PN}-6.1.34-no-pam.patch" # bug #843437 |
107 |
) |
108 |
|
109 |
pkg_pretend() { |
110 |
@@ -225,11 +226,6 @@ src_prepare() { |
111 |
default |
112 |
} |
113 |
|
114 |
-doecho() { |
115 |
- echo "$@" |
116 |
- "$@" || die |
117 |
-} |
118 |
- |
119 |
src_configure() { |
120 |
local myconf=( |
121 |
--with-gcc="$(tc-getCC)" |
122 |
@@ -261,8 +257,14 @@ src_configure() { |
123 |
if use amd64 && ! has_multilib_profile ; then |
124 |
myconf+=( --disable-vmmraw ) |
125 |
fi |
126 |
+ |
127 |
+ cat >> LocalConfig.kmk <<-EOF || die |
128 |
+ CFLAGS=${CFLAGS} |
129 |
+ CXXFLAGS=${CXXFLAGS} |
130 |
+ EOF |
131 |
+ |
132 |
# not an autoconf script |
133 |
- doecho ./configure "${myconf[@]}" |
134 |
+ edo ./configure "${myconf[@]}" |
135 |
} |
136 |
|
137 |
src_compile() { |