Update `x11/nvidia-driver' to version 390.87, which fixed a resource

leak introduced in the 390 series of drivers that could lead to reduced
performance after starting and stopping several OpenGL and/or Vulkan
applications.  While here, replace deprecated @[un]exec keywords which
do not specify when they should be executed with @post[un]exec and move
KPI-related patching to a better place within the Makefile.

PR:	231721
This commit is contained in:
Alexey Dokuchaev 2018-09-30 14:18:44 +00:00
parent 99d5330d1e
commit e07e1e0087
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=480954
3 changed files with 15 additions and 13 deletions

View File

@ -10,9 +10,9 @@
# slave ports instead (`x11/nvidia-driver-340' or `x11/nvidia-driver-304').
PORTNAME= nvidia-driver
DISTVERSION?= 390.77
DISTVERSION?= 390.87
# Always try to set PORTREVISION as it can be overridden by the slave ports
PORTREVISION?= 2
PORTREVISION?= 0
CATEGORIES= x11
MASTER_SITES= NVIDIA/XFree86/FreeBSD-${ARCH_SUFX}/${DISTVERSION}
DISTNAME= NVIDIA-FreeBSD-${ARCH_SUFX}-${DISTVERSION}
@ -113,11 +113,6 @@ MAKE_ENV+= WITHOUT_LINUX=yes
.endif
post-patch: .SILENT
# KPI of kmem_alloc_contig(),kmem_free() changed in FreeBSD src r338143,r338318
.if ${OSVERSION} >= 1200079
${REINPLACE_CMD} -e 's/kmem_alloc_contig(kmem_arena, /kmem_alloc_contig(/' ${WRKSRC}/src/${NVSRC}/nvidia_subr.c
${REINPLACE_CMD} -e 's/kmem_free(kmem_arena, /kmem_free(/' ${WRKSRC}/src/${NVSRC}/nvidia_subr.c
.endif
# We should support -CURRENT: kill the check
${REINPLACE_CMD} -e '24,26d' ${WRKSRC}/src/${NVSRC}/nv-freebsd.h
# Adjust Linux headers #include's after FreeBSD src r246085
@ -134,6 +129,13 @@ post-patch: .SILENT
${REINPLACE_CMD} -e 's:sys/capability\.h:sys/capsicum.h:' \
${WRKSRC}/src/nvidia-modeset/nvidia-modeset-freebsd.c
.endif
# KPI of kmem_alloc_contig(),kmem_free() changed in FreeBSD src r338143,r338318
.if ${OSVERSION} >= 1200079
${REINPLACE_CMD} \
-e 's/kmem_alloc_contig(kmem_arena, /kmem_alloc_contig(/' \
-e 's/kmem_free(kmem_arena, /kmem_free(/' \
${WRKSRC}/src/${NVSRC}/nvidia_subr.c
.endif
# Respect WITHOUT_LINUX setting
${REINPLACE_CMD} -e 's/exists(\/.*/& \&\& !defined(WITHOUT_LINUX)/' \
${WRKSRC}/lib/Makefile

View File

@ -1,8 +1,8 @@
TIMESTAMP = 1482026038
SHA256 (NVIDIA-FreeBSD-x86_64-390.77.tar.gz) = d255909aa7dc7be8b6c832f309206ea31fd0eb274a4f44f6872ff61fda443b7b
SIZE (NVIDIA-FreeBSD-x86_64-390.77.tar.gz) = 63638514
SHA256 (NVIDIA-FreeBSD-x86-390.77.tar.gz) = a0971e042806fc431d15a26fe1415f00f893ca1a452e31783a81b533d29de85a
SIZE (NVIDIA-FreeBSD-x86-390.77.tar.gz) = 64315405
SHA256 (NVIDIA-FreeBSD-x86_64-390.87.tar.gz) = 221c80982378a333f541646d5d2030c72311c491f5a0f98b93fdd95cd5be11fc
SIZE (NVIDIA-FreeBSD-x86_64-390.87.tar.gz) = 63648591
SHA256 (NVIDIA-FreeBSD-x86-390.87.tar.gz) = a2e61b0c541aa9bdcde7de43cd88a7ce5ff3de9fdafe60fa7d6e10942186d7d4
SIZE (NVIDIA-FreeBSD-x86-390.87.tar.gz) = 64326801
SHA256 (NVIDIA-FreeBSD-x86_64-340.107.tar.gz) = 047efae28cc81e4d56c64d2a0c15d9b7ff07f09bba22696464de8276334a4df7
SIZE (NVIDIA-FreeBSD-x86_64-340.107.tar.gz) = 61179967
SHA256 (NVIDIA-FreeBSD-x86-340.107.tar.gz) = 1978ae48512d8a693979b153463c76954d2aec91a6b2a568b3aa1198e5b3d199

View File

@ -71,8 +71,8 @@ man/man1/nvidia-smi.1.gz
%%LINUX%%%%LINUXBASE%%/usr/lib/vdpau/libvdpau_nvidia.so.1
%%LINUX%%%%LINUXBASE%%/usr/lib/vdpau/libvdpau_trace.so.%%SHLIB_VERSION%%
%%LINUX%%%%LINUXBASE%%/usr/lib/vdpau/libvdpau_trace.so.1
%%LINUX%%@exec %%LINUXBASE%%/sbin/ldconfig -r %%LINUXBASE%%
%%LINUX%%@unexec %%LINUXBASE%%/sbin/ldconfig -r %%LINUXBASE%%
%%LINUX%%@postexec %%LINUXBASE%%/sbin/ldconfig -r %%LINUXBASE%%
%%LINUX%%@postunexec %%LINUXBASE%%/sbin/ldconfig -r %%LINUXBASE%%
%%LINUX%%@dir %%LINUXBASE%%/usr/lib/vdpau
%%LINUX%%@dir %%LINUXBASE%%/usr/lib
%%LINUX%%@dir %%LINUXBASE%%/usr