diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2019-05-08 16:11:30 +0200 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2019-05-08 16:12:20 +0200 |
commit | 426405cb9a0da711324777e15a3b6c78ffa3bc24 (patch) | |
tree | 2fdf8ea0d23ba612135422b15f142a4e11baf50f /app-emulation | |
parent | dev-vcs/cssc: Version 1.4.1 (diff) | |
download | gentoo-426405cb9a0da711324777e15a3b6c78ffa3bc24.tar.gz gentoo-426405cb9a0da711324777e15a3b6c78ffa3bc24.tar.bz2 gentoo-426405cb9a0da711324777e15a3b6c78ffa3bc24.zip |
app-emulation/virtualbox-guest-additions: Overhauled kernel mod build
Package-Manager: Portage-2.3.66, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.6.ebuild | 39 |
1 files changed, 13 insertions, 26 deletions
diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.6.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.6.ebuild index 5256fbb5d67c..36da1068f38c 100644 --- a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.6.ebuild +++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.0.6.ebuild @@ -48,34 +48,30 @@ BUILD_TARGETS="all" BUILD_TARGET_ARCH="${ARCH}" S="${WORKDIR}/${MY_P}" +VBOX_MOD_SRC_DIR="${S}/out/linux.${ARCH}/release/bin/additions/src" pkg_setup() { export DISTCC_DISABLE=1 #674256 - MODULE_NAMES="vboxguest(misc:${WORKDIR}/vboxguest:${WORKDIR}/vboxguest) - vboxsf(misc:${WORKDIR}/vboxsf:${WORKDIR}/vboxsf)" - use X && MODULE_NAMES+=" vboxvideo(misc:${WORKDIR}/vboxvideo::${WORKDIR}/vboxvideo)" + MODULE_NAMES="vboxguest(misc:${VBOX_MOD_SRC_DIR}/vboxguest:${VBOX_MOD_SRC_DIR}/vboxguest) + vboxsf(misc:${VBOX_MOD_SRC_DIR}/vboxsf:${VBOX_MOD_SRC_DIR}/vboxsf)" + use X && MODULE_NAMES+=" vboxvideo(misc:${VBOX_MOD_SRC_DIR}/vboxvideo::${VBOX_MOD_SRC_DIR}/vboxvideo)" linux-mod_pkg_setup BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build KERNOUT=${KV_OUT_DIR}" } -src_unpack() { - unpack ${A} - - # Create and unpack a tarball with the sources of the Linux guest - # kernel modules, to include all the needed files - "${S}"/src/VBox/Additions/linux/export_modules.sh \ - "${WORKDIR}/vbox-kmod.tar.gz" &>/dev/null || die - unpack ./vbox-kmod.tar.gz - - # Remove shipped binaries (kBuild,yasm), see bug #232775 - cd "${S}" || die +src_prepare() { rm -r kBuild/bin tools || die -} -src_prepare() { + # Provide kernel sources + pushd src/VBox/Additions &>/dev/null || die + ebegin "Extracting guest kernel module sources" + kmk GuestDrivers-src vboxguest-src vboxsf-src vboxvideo-src &>/dev/null || die + eend + popd &>/dev/null || die + # PaX fixes (see bug #298988) - pushd "${WORKDIR}" &>/dev/null || die + pushd "${VBOX_MOD_SRC_DIR}" &>/dev/null || die eapply "${FILESDIR}"/vboxguest-6.0.6-log-use-c99.patch popd &>/dev/null || die @@ -83,15 +79,6 @@ src_prepare() { cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die use X || echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk - # stupid new header references... - local vboxheader mdir - for vboxheader in {product,revision,version}-generated.h ; do - for mdir in vbox{guest,sf} ; do - ln -sf "${S}"/out/linux.${ARCH}/release/${vboxheader} \ - "${WORKDIR}/${mdir}/${vboxheader}" - done - done - # Remove pointless GCC version check sed -e '/^check_gcc$/d' -i configure || die |