Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox/
Date: Wed, 06 Jul 2022 03:01:47
Message-Id: 1657073983.9a09586677da244bdd6db9c8196cf0f49f5e2a66.sam@gentoo
1 commit: 9a09586677da244bdd6db9c8196cf0f49f5e2a66
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jul 6 02:19:43 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 6 02:19:43 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a095866
7
8 app-emulation/virtualbox: minor ebuild tidying
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 .../virtualbox/virtualbox-6.1.34-r3.ebuild | 31 ++++++++++++++--------
13 1 file changed, 20 insertions(+), 11 deletions(-)
14
15 diff --git a/app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild b/app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild
16 index 3920e11b0d57..388c4e9cc7c0 100644
17 --- a/app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild
18 +++ b/app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild
19 @@ -4,7 +4,7 @@
20 EAPI=8
21
22 PYTHON_COMPAT=( python3_{8..10} )
23 -inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg
24 +inherit desktop edo java-pkg-opt-2 linux-info multilib pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg
25
26 MY_PN="VirtualBox"
27 MY_PV="${PV/beta/BETA}"
28 @@ -161,17 +161,13 @@ pkg_pretend() {
29 pkg_setup() {
30 java-pkg-opt-2_pkg_setup
31 python-single-r1_pkg_setup
32 -
33 - tc-ld-disable-gold #bug 488176
34 - tc-export CC CXX LD AR RANLIB
35 - export HOST_CC="$(tc-getBUILD_CC)"
36 }
37
38 src_prepare() {
39 # Remove shipped binaries (kBuild,yasm), see bug #232775
40 rm -r kBuild/bin tools || die
41
42 - # Replace pointless GCC version check with something less stupid.
43 + # Replace pointless GCC version check with something more sensible.
44 # This is needed for the qt5 version check.
45 sed -e 's@^check_gcc$@cc_maj="$(${CC} -dumpversion | cut -d. -f1)" ; cc_min="$(${CC} -dumpversion | cut -d. -f2)"@' \
46 -i configure || die
47 @@ -227,11 +223,17 @@ src_prepare() {
48 }
49
50 src_configure() {
51 + tc-ld-disable-gold # bug #488176
52 + tc-export CC CXX LD AR RANLIB
53 + export HOST_CC="$(tc-getBUILD_CC)"
54 +
55 local myconf=(
56 --with-gcc="$(tc-getCC)"
57 --with-g++="$(tc-getCXX)"
58 +
59 --disable-dbus
60 --disable-kmods
61 +
62 $(usex alsa '' --disable-alsa)
63 $(usex debug --build-debug '')
64 $(usex doc '' --disable-docs)
65 @@ -243,6 +245,7 @@ src_configure() {
66 $(usex vboxwebsrv --enable-webservice '')
67 $(usex vnc --enable-vnc '')
68 )
69 +
70 if ! use headless ; then
71 myconf+=(
72 $(usex opengl '' --disable-opengl)
73 @@ -254,10 +257,12 @@ src_configure() {
74 --disable-opengl
75 )
76 fi
77 +
78 if use amd64 && ! has_multilib_profile ; then
79 myconf+=( --disable-vmmraw )
80 fi
81
82 + # bug #843437
83 cat >> LocalConfig.kmk <<-EOF || die
84 CFLAGS=${CFLAGS}
85 CXXFLAGS=${CXXFLAGS}
86 @@ -271,14 +276,18 @@ src_compile() {
87 source ./env.sh || die
88
89 # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
90 - MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #'
91 - MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #'
92 + MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
93 + MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
94 MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
95 +
96 MAKE="kmk" emake \
97 VBOX_BUILD_PUBLISHER=_Gentoo \
98 - TOOL_GXX3_CC="$(tc-getCC)" TOOL_GXX3_CXX="$(tc-getCXX)" \
99 - TOOL_GXX3_LD="$(tc-getCXX)" VBOX_GCC_OPT="${CXXFLAGS}" \
100 - TOOL_YASM_AS=yasm KBUILD_VERBOSE=2 \
101 + TOOL_GXX3_CC="$(tc-getCC)" \
102 + TOOL_GXX3_CXX="$(tc-getCXX)" \
103 + TOOL_GXX3_LD="$(tc-getCXX)" \
104 + VBOX_GCC_OPT="${CXXFLAGS}" \
105 + TOOL_YASM_AS=yasm \
106 + KBUILD_VERBOSE=2 \
107 VBOX_WITH_VBOXIMGMOUNT=1 \
108 all
109 }