Advertisement
Guest User

virtualbox-modules-5.1.21.115049.ebuild

a guest
Apr 25th, 2017
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3.  
  4. # XXX: the tarball here is just the kernel modules split out of the binary
  5. # package that comes from virtualbox-bin
  6.  
  7. EAPI=6
  8.  
  9. inherit eutils linux-mod user
  10.  
  11. MY_P=vbox-kernel-module-src-${PV}
  12. DESCRIPTION="Kernel Modules for Virtualbox"
  13. HOMEPAGE="http://www.virtualbox.org/"
  14. SRC_URI="https://www.virtualbox.org/download/testcase/VirtualBox-5.1.21-115049-Linux_amd64.run"
  15.  
  16. LICENSE="GPL-2"
  17. SLOT="0"
  18. KEYWORDS="~amd64 ~x86"
  19. IUSE="pax_kernel"
  20.  
  21. RDEPEND="!=app-emulation/virtualbox-9999"
  22.  
  23. S=${WORKDIR}
  24.  
  25. BUILD_TARGETS="all"
  26. BUILD_TARGET_ARCH="${ARCH}"
  27. MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S}) vboxpci(misc:${S})"
  28.  
  29. pkg_setup() {
  30. enewgroup vboxusers
  31.  
  32. CONFIG_CHECK="!TRIM_UNUSED_KSYMS"
  33. ERROR_TRIM_UNUSED_KSYMS="The kernel option CONFIG_TRIM_UNUSED_KSYMS removed kernel symbols that are needed by ${PN} to load correctly."
  34.  
  35. linux-mod_pkg_setup
  36.  
  37. BUILD_PARAMS="KERN_DIR=${KV_DIR} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
  38. }
  39.  
  40. src_unpack() {
  41. cd ${T}
  42. bash ${DISTDIR}/${A} --keep --noexec
  43. cd install
  44. tar -xjvf VirtualBox.tar.bz2 src
  45. mv src/vboxhost/* ${WORKDIR}
  46. }
  47.  
  48.  
  49.  
  50.  
  51. src_prepare() {
  52. if kernel_is -ge 2 6 33 ; then
  53. # evil patch for new kernels - header moved
  54. grep -lR linux/autoconf.h * | xargs sed -i -e 's:<linux/autoconf.h>:<generated/autoconf.h>:'
  55. fi
  56.  
  57. if use pax_kernel && kernel_is -ge 3 0 0 ; then
  58. epatch "${FILESDIR}"/${PN}-4.1.4-pax-const.patch
  59. fi
  60.  
  61. default
  62. }
  63.  
  64. src_install() {
  65. linux-mod_src_install
  66. insinto /usr/lib/modules-load.d/
  67. doins "${FILESDIR}"/virtualbox.conf
  68. }
  69.  
  70. pkg_postinst() {
  71. linux-mod_pkg_postinst
  72. elog "If you are using sys-apps/openrc, please add \"vboxdrv\", \"vboxnetflt\","
  73. elog "\"vboxnetadp\" and \"vboxpci\" to:"
  74. elog " /etc/conf.d/modules"
  75. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement