diff options
author | Sam James <sam@gentoo.org> | 2022-07-06 03:19:43 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-07-06 03:19:43 +0100 |
commit | 9a09586677da244bdd6db9c8196cf0f49f5e2a66 (patch) | |
tree | 3652fd071867f3d1a60b63ce9facf6e263387114 /app-emulation | |
parent | app-emulation/virtualbox: fix build w/o PAM; respect CFLAGS (diff) | |
download | gentoo-9a09586677da244bdd6db9c8196cf0f49f5e2a66.tar.gz gentoo-9a09586677da244bdd6db9c8196cf0f49f5e2a66.tar.bz2 gentoo-9a09586677da244bdd6db9c8196cf0f49f5e2a66.zip |
app-emulation/virtualbox: minor ebuild tidying
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild b/app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild index 3920e11b0d57..388c4e9cc7c0 100644 --- a/app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild +++ b/app-emulation/virtualbox/virtualbox-6.1.34-r3.ebuild @@ -4,7 +4,7 @@ EAPI=8 PYTHON_COMPAT=( python3_{8..10} ) -inherit desktop edo flag-o-matic java-pkg-opt-2 linux-info pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg +inherit desktop edo java-pkg-opt-2 linux-info multilib pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg MY_PN="VirtualBox" MY_PV="${PV/beta/BETA}" @@ -161,17 +161,13 @@ pkg_pretend() { pkg_setup() { java-pkg-opt-2_pkg_setup python-single-r1_pkg_setup - - tc-ld-disable-gold #bug 488176 - tc-export CC CXX LD AR RANLIB - export HOST_CC="$(tc-getBUILD_CC)" } src_prepare() { # Remove shipped binaries (kBuild,yasm), see bug #232775 rm -r kBuild/bin tools || die - # Replace pointless GCC version check with something less stupid. + # Replace pointless GCC version check with something more sensible. # This is needed for the qt5 version check. sed -e 's@^check_gcc$@cc_maj="$(${CC} -dumpversion | cut -d. -f1)" ; cc_min="$(${CC} -dumpversion | cut -d. -f2)"@' \ -i configure || die @@ -227,11 +223,17 @@ src_prepare() { } src_configure() { + tc-ld-disable-gold # bug #488176 + tc-export CC CXX LD AR RANLIB + export HOST_CC="$(tc-getBUILD_CC)" + local myconf=( --with-gcc="$(tc-getCC)" --with-g++="$(tc-getCXX)" + --disable-dbus --disable-kmods + $(usex alsa '' --disable-alsa) $(usex debug --build-debug '') $(usex doc '' --disable-docs) @@ -243,6 +245,7 @@ src_configure() { $(usex vboxwebsrv --enable-webservice '') $(usex vnc --enable-vnc '') ) + if ! use headless ; then myconf+=( $(usex opengl '' --disable-opengl) @@ -254,10 +257,12 @@ src_configure() { --disable-opengl ) fi + if use amd64 && ! has_multilib_profile ; then myconf+=( --disable-vmmraw ) fi + # bug #843437 cat >> LocalConfig.kmk <<-EOF || die CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS} @@ -271,14 +276,18 @@ src_compile() { source ./env.sh || die # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529) - MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #' - MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #' + MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) + MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) MAKEOPTS="${MAKEJOBS} ${MAKELOAD}" + MAKE="kmk" emake \ VBOX_BUILD_PUBLISHER=_Gentoo \ - TOOL_GXX3_CC="$(tc-getCC)" TOOL_GXX3_CXX="$(tc-getCXX)" \ - TOOL_GXX3_LD="$(tc-getCXX)" VBOX_GCC_OPT="${CXXFLAGS}" \ - TOOL_YASM_AS=yasm KBUILD_VERBOSE=2 \ + TOOL_GXX3_CC="$(tc-getCC)" \ + TOOL_GXX3_CXX="$(tc-getCXX)" \ + TOOL_GXX3_LD="$(tc-getCXX)" \ + VBOX_GCC_OPT="${CXXFLAGS}" \ + TOOL_YASM_AS=yasm \ + KBUILD_VERBOSE=2 \ VBOX_WITH_VBOXIMGMOUNT=1 \ all } |