nvidia-drivers-334.16-r5 updated to use UVM.

This commit is contained in:
Kolan Sh 2014-02-17 19:03:44 +04:00
parent 4abd4fc055
commit 76d2c6c947
1 changed files with 8 additions and 5 deletions

View File

@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation # Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-334.16-r5.ebuild,v 1.1 2014/02/10 16:22:41 jer Exp $ # $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-334.16-r5.ebuild,v 1.3 2014/02/17 14:11:51 jer Exp $
EAPI=5 EAPI=5
@ -25,7 +25,7 @@ SRC_URI="
LICENSE="GPL-2 NVIDIA-r1" LICENSE="GPL-2 NVIDIA-r1"
SLOT="0" SLOT="0"
KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd" KEYWORDS="-* ~amd64 ~x86 ~amd64-fbsd ~x86-fbsd"
IUSE="acpi multilib kernel_FreeBSD kernel_linux pax_kernel +tools +X" IUSE="acpi multilib kernel_FreeBSD kernel_linux pax_kernel +tools +X uvm"
RESTRICT="bindist mirror strip" RESTRICT="bindist mirror strip"
EMULTILIB_PKG="true" EMULTILIB_PKG="true"
@ -117,6 +117,7 @@ pkg_setup() {
if use kernel_linux; then if use kernel_linux; then
linux-mod_pkg_setup linux-mod_pkg_setup
MODULE_NAMES="nvidia(video:${S}/kernel)" MODULE_NAMES="nvidia(video:${S}/kernel)"
use uvm && MODULE_NAMES+=" nvidia-uvm(video:${S}/kernel/uvm)"
BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \ BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} \
SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)" SYSOUT=${KV_OUT_DIR} CC=$(tc-getBUILD_CC)"
# linux-mod_src_compile calls set_arch_to_kernel, which # linux-mod_src_compile calls set_arch_to_kernel, which
@ -149,11 +150,11 @@ pkg_setup() {
} }
src_unpack() { src_unpack() {
if ! use kernel_FreeBSD; then if use kernel_FreeBSD; then
unpack ${A}
elif use kernel_linux; then
cd "${S}" cd "${S}"
unpack_makeself unpack_makeself
else
unpack ${A}
fi fi
} }
@ -191,6 +192,8 @@ src_compile() {
# on FreeBSD there's one and triggers the kernel module build, as we install # on FreeBSD there's one and triggers the kernel module build, as we install
# it by itself, pass this. # it by itself, pass this.
use uvm && append-cppflags -DNV_UVM_ENABLE -DNVIDIA_UVM_LITE_ENABLED
cd "${NV_SRC}" cd "${NV_SRC}"
if use kernel_FreeBSD; then if use kernel_FreeBSD; then
MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \ MAKE="$(get_bmake)" CFLAGS="-Wno-sign-compare" emake CC="$(tc-getCC)" \