From 94b70fa157c1b96c375ddbf4de906277ade3c2c0 Mon Sep 17 00:00:00 2001
From: Britney Fransen <brfransen@gmail.com>
Date: Mon, 5 May 2014 20:59:55 +0000
Subject: nvidia & nvidia-utils: update to 337.12

---
 abs/core/nvidia-utils/PKGBUILD | 58 ++++++++++++++++++++++++++++++++++++------
 abs/core/nvidia/PKGBUILD       | 16 +++++++-----
 2 files changed, 60 insertions(+), 14 deletions(-)

diff --git a/abs/core/nvidia-utils/PKGBUILD b/abs/core/nvidia-utils/PKGBUILD
index e38a75a..a890901 100644
--- a/abs/core/nvidia-utils/PKGBUILD
+++ b/abs/core/nvidia-utils/PKGBUILD
@@ -3,7 +3,7 @@
 # Contributor: James Rayner <iphitus@gmail.com>
 pkgbase=nvidia-utils
 pkgname=('nvidia-utils' 'nvidia-libgl' 'opencl-nvidia')
-pkgver=331.49
+pkgver=337.12
 pkgrel=1
 arch=('i686' 'x86_64')
 url="http://www.nvidia.com/"
@@ -11,8 +11,8 @@ license=('custom')
 options=('!strip')
 source=("ftp://download.nvidia.com/XFree86/Linux-x86/${pkgver}/NVIDIA-Linux-x86-${pkgver}.run"
         "ftp://download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run")
-sha1sums=('3ab5c9e3b206cdb93baf6ea17dafe1486dbaa03f'
-          '72f7c25ba94041a80f81a8d8bf025ef680ed1f4f')
+sha1sums=('a99cd207d55fabeda424441c3eac23867f843b33'
+          '265178244fd20dd9a4fff740d0a02c072efc1f18')
 
 [[ "$CARCH" = "i686" ]] && _pkg="NVIDIA-Linux-x86-${pkgver}"
 [[ "$CARCH" = "x86_64" ]] && _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
@@ -64,6 +64,18 @@ package_nvidia-libgl() {
     ln -s "libGL.so.${pkgver}" "${pkgdir}/usr/lib/libGL.so.1"
     ln -s "libGL.so.${pkgver}" "${pkgdir}/usr/lib/libGL.so"
 
+    ln -s "/usr/lib/nvidia/libEGL.so.${pkgver}" "${pkgdir}/usr/lib/libEGL.so.${pkgver}"
+    ln -s "libEGL.so.${pkgver}" "${pkgdir}/usr/lib/libEGL.so.1"
+    ln -s "libEGL.so.${pkgver}" "${pkgdir}/usr/lib/libEGL.so"
+
+    ln -s "/usr/lib/nvidia/libGLESv1_CM.so.${pkgver}" "${pkgdir}/usr/lib/libGLESv1_CM.so.${pkgver}"
+    ln -s "libGLESv1_CM.so.${pkgver}" "${pkgdir}/usr/lib/libGLESv1_CM.so.1"
+    ln -s "libGLESv1_CM.so.${pkgver}" "${pkgdir}/usr/lib/libGLESv1_CM.so"
+
+    ln -s "/usr/lib/nvidia/libGLESv2.so.${pkgver}" "${pkgdir}/usr/lib/libGLESv2.so.${pkgver}"
+    ln -s "libGLESv2.so.${pkgver}" "${pkgdir}/usr/lib/libGLESv2.so.2"
+    ln -s "libGLESv2.so.${pkgver}" "${pkgdir}/usr/lib/libGLESv2.so"
+
     mkdir -p "${pkgdir}/usr/share/licenses"
     ln -s nvidia "${pkgdir}/usr/share/licenses/nvidia-libgl"
 }
@@ -72,47 +84,77 @@ package_nvidia-utils() {
     pkgdesc="NVIDIA drivers utilities"
     depends=('xorg-server')
     optdepends=('gtk2: nvidia-settings'
+                'xorg-server-devel: nvidia-xconfig'
                 'opencl-nvidia: OpenCL support')
     cd "${srcdir}/${_pkg}"
 
     # X driver
     install -D -m755 nvidia_drv.so "${pkgdir}/usr/lib/xorg/modules/drivers/nvidia_drv.so"
+
     # GLX extension module for X
     install -D -m755 "libglx.so.${pkgver}" "${pkgdir}/usr/lib/nvidia/xorg/modules/extensions/libglx.so.${pkgver}"
     ln -s "libglx.so.${pkgver}" "${pkgdir}/usr/lib/nvidia/xorg/modules/extensions/libglx.so"	# X doesn't find glx otherwise
-    # OpenGL library
+
+    # OpenGL libraries
     install -D -m755 "libGL.so.${pkgver}" "${pkgdir}/usr/lib/nvidia/libGL.so.${pkgver}"
+    install -D -m755 "libEGL.so.${pkgver}" "${pkgdir}/usr/lib/nvidia/libEGL.so.${pkgver}"
+    install -D -m755 "libGLESv1_CM.so.${pkgver}" "${pkgdir}/usr/lib/nvidia/libGLESv1_CM.so.${pkgver}"
+    install -D -m755 "libGLESv2.so.${pkgver}" "${pkgdir}/usr/lib/nvidia/libGLESv2.so.${pkgver}"
+
     # OpenGL core library
     install -D -m755 "libnvidia-glcore.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-glcore.so.${pkgver}"
+    install -D -m755 "libnvidia-eglcore.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-eglcore.so.${pkgver}"
+    install -D -m755 "libnvidia-glsi.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-glsi.so.${pkgver}"
+    
+    # misc
+    install -D -m755 "libnvidia-ifr.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-ifr.so.${pkgver}"
+    install -D -m755 "libnvidia-fbc.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-fbc.so.${pkgver}"
+    install -D -m755 "libnvidia-encode.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-encode.so.${pkgver}"
+    install -D -m755 "libnvidia-cfg.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-cfg.so.${pkgver}"
+    install -D -m755 "libnvidia-ml.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-ml.so.${pkgver}"
+
     # VDPAU
     install -D -m755 "libvdpau_nvidia.so.${pkgver}" "${pkgdir}/usr/lib/vdpau/libvdpau_nvidia.so.${pkgver}"
+
     # nvidia-tls library
     install -D -m755 "tls/libnvidia-tls.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-tls.so.${pkgver}"
-    install -D -m755 "libnvidia-cfg.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-cfg.so.${pkgver}"
 
-    install -D -m755 "libnvidia-ml.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-ml.so.${pkgver}"
     # CUDA
     install -D -m755 "libcuda.so.${pkgver}" "${pkgdir}/usr/lib/libcuda.so.${pkgver}"
     install -D -m755 "libnvcuvid.so.${pkgver}" "${pkgdir}/usr/lib/libnvcuvid.so.${pkgver}"
-    #install -D -m755 nvidia-cuda-proxy-server "${pkgdir}/usr/bin/nvidia-cuda-proxy-server"
-    #install -D -m644 nvidia-cuda-proxy-control.1.gz "${pkgdir}/usr/share/man/man1/nvidia-cuda-proxy-control.1.gz"
+
     # DEBUG
     install -D -m755 nvidia-debugdump "${pkgdir}/usr/bin/nvidia-debugdump"
+
     # nvidia-xconfig
     install -D -m755 nvidia-xconfig "${pkgdir}/usr/bin/nvidia-xconfig"
     install -D -m644 nvidia-xconfig.1.gz "${pkgdir}/usr/share/man/man1/nvidia-xconfig.1.gz"
+
     # nvidia-settings
     install -D -m755 nvidia-settings "${pkgdir}/usr/bin/nvidia-settings"
     install -D -m644 nvidia-settings.1.gz "${pkgdir}/usr/share/man/man1/nvidia-settings.1.gz"
     install -D -m644 nvidia-settings.desktop "${pkgdir}/usr/share/applications/nvidia-settings.desktop"
     install -D -m644 nvidia-settings.png "${pkgdir}/usr/share/pixmaps/nvidia-settings.png"
     sed -e 's:__UTILS_PATH__:/usr/bin:' -e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' -i "${pkgdir}/usr/share/applications/nvidia-settings.desktop"
+
     # nvidia-bug-report
     install -D -m755 nvidia-bug-report.sh "${pkgdir}/usr/bin/nvidia-bug-report.sh"
+
     # nvidia-smi
     install -D -m755 nvidia-smi "${pkgdir}/usr/bin/nvidia-smi"
     install -D -m644 nvidia-smi.1.gz "${pkgdir}/usr/share/man/man1/nvidia-smi.1.gz"
 
+    # nvidia-cuda-mps
+    install -D -m755 nvidia-cuda-mps-server "${pkgdir}/usr/bin/nvidia-cuda-mps-server"
+    install -D -m644 nvidia-cuda-mps-control.1.gz "${pkgdir}/usr/share/man/man1/nvidia-cuda-mps-control.1.gz"
+
+    # nvidia-modprobe
+    # This should be removed if nvidia fixed their uvm module!
+    install -D -m4755 nvidia-modprobe "${pkgdir}/usr/bin/nvidia-modprobe"
+
+    # application profiles
+    install -D -m644 nvidia-application-profiles-${pkgver}-rc "${pkgdir}/usr/share/nvidia/nvidia-application-profiles-${pkgver}-rc"
+    install -D -m644 nvidia-application-profiles-${pkgver}-key-documentation "${pkgdir}/usr/share/nvidia/nvidia-application-profiles-${pkgver}-key-documentation"
 
     install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/nvidia/LICENSE"
     ln -s nvidia "${pkgdir}/usr/share/licenses/nvidia-utils"
diff --git a/abs/core/nvidia/PKGBUILD b/abs/core/nvidia/PKGBUILD
index cafec22..30ce01e 100644
--- a/abs/core/nvidia/PKGBUILD
+++ b/abs/core/nvidia/PKGBUILD
@@ -2,7 +2,7 @@
 # Maintainer : Thomas Baechler <thomas@archlinux.org>
 
 pkgname=nvidia
-pkgver=331.49
+pkgver=337.12
 _extramodules=extramodules-3.13-ARCH
 pkgrel=1
 pkgdesc="NVIDIA drivers for linux"
@@ -16,14 +16,13 @@ install=nvidia.install
 options=(!strip)
 source=("ftp://download.nvidia.com/XFree86/Linux-x86/${pkgver}/NVIDIA-Linux-x86-${pkgver}.run"
         "ftp://download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run")
-md5sums=('176c77f9a10eaa652860dbc24042bff2'
-         'd0c944466a36cae8b1e23330b27a721c')
+md5sums=('c610d5bff8f7f758dc25fdd51b1b65eb'
+         '4c2aaac75c1ff01a09ac8f4ff84084cd')
 
 [[ "$CARCH" = "i686" ]] && _pkg="NVIDIA-Linux-x86-${pkgver}"
 [[ "$CARCH" = "x86_64" ]] && _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
 
 prepare() {
-    cd "${srcdir}"
     sh "${_pkg}.run" --extract-only
     cd "${_pkg}"
     # patches here
@@ -31,15 +30,20 @@ prepare() {
 
 build() {
     _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
-    cd "${srcdir}"/"${_pkg}"/kernel
+    cd "${_pkg}"/kernel
+    make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
+
+    cd uvm
     make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
 }
 
 package() {
     install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
         "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
+    install -D -m644 "${srcdir}/${_pkg}/kernel/uvm/nvidia-uvm.ko" \
+        "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-uvm.ko"
+    gzip "${pkgdir}/usr/lib/modules/${_extramodules}/"*.ko
     install -d -m755 "${pkgdir}/usr/lib/modprobe.d"
     echo "blacklist nouveau" >> "${pkgdir}/usr/lib/modprobe.d/nvidia.conf"
     sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
-    gzip "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
 }
-- 
cgit v0.12