mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-26 09:46:09 +00:00
- Fix stack buffer overflow in nvidia_sysctl_bus_type()
- While here, install nvidia-bug-report.sh per popular demand and assume that everyone now has sed(1) that supports "addr1,+N" range syntax - Spell X as X11 in port description Submitted by: glebius
This commit is contained in:
parent
4d8561d457
commit
ac39d3261d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=316497
@ -3,7 +3,7 @@
|
||||
|
||||
DISTVERSION= 173.14.35
|
||||
# Explicitly set PORTREVISION as it can be overridden by the master port
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../nvidia-driver
|
||||
NO_LATEST_LINK= yes
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
DISTVERSION= 304.88
|
||||
# Explicitly set PORTREVISION as it can be overridden by the master port
|
||||
PORTREVISION= 0
|
||||
PORTREVISION= 1
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../nvidia-driver
|
||||
NO_LATEST_LINK= yes
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
DISTVERSION= 71.86.15
|
||||
# Explicitly set PORTREVISION as it can be overridden by the master port
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../nvidia-driver
|
||||
NO_LATEST_LINK= yes
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
DISTVERSION= 96.43.23
|
||||
# Explicitly set PORTREVISION as it can be overridden by the master port
|
||||
PORTREVISION= 0
|
||||
PORTREVISION= 1
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../nvidia-driver
|
||||
NO_LATEST_LINK= yes
|
||||
|
@ -13,7 +13,7 @@
|
||||
PORTNAME= nvidia-driver
|
||||
DISTVERSION?= 310.44
|
||||
# Always try to set PORTREVISION as it can be overridden by the slave ports
|
||||
PORTREVISION?= 0
|
||||
PORTREVISION?= 1
|
||||
CATEGORIES= x11 kld
|
||||
MASTER_SITES= ${MASTER_SITE_NVIDIA}
|
||||
# MASTER_SITE_SUBDIR it set later because it depends on NVVERSION
|
||||
@ -144,6 +144,11 @@ post-patch: .SILENT
|
||||
${REINPLACE_CMD} -E 's/(VM_OBJECT_)(UN)?(LOCK)/\1W\2\3/' \
|
||||
${WRKSRC}/src/nvidia_subr.c
|
||||
.endif
|
||||
# Fix stack buffer overflow in nvidia_sysctl_bus_type()
|
||||
${REINPLACE_CMD} -E '/bus_type\[4\]/d ; \
|
||||
s/sprintf\(bus_type, (".+")/return SYSCTL_OUT(req, \1, sizeof(\1)/ ; \
|
||||
/return SYSCTL_OUT\(req, bus_type/d' \
|
||||
${WRKSRC}/src/nvidia_sysctl.c
|
||||
# Process OPTIONS
|
||||
.if ${PORT_OPTIONS:MFREEBSD_AGP}
|
||||
${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_OS_AGP)/define \1/' \
|
||||
@ -200,6 +205,7 @@ pre-su-install:
|
||||
@cd ${PREFIX}/${MODULESDIR} && ${MKDIR} drivers extensions
|
||||
|
||||
post-install: .SILENT
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/obj/nvidia-bug-report.sh ${PREFIX}/bin
|
||||
# pkg-plist is already overbloated, so use these hacks instead of PLIST_SUB's
|
||||
.if ${NVVERSION} < 817400
|
||||
${REINPLACE_CMD} -e '/libnvidia-cfg/d' ${TMPPLIST}
|
||||
@ -223,11 +229,7 @@ post-install: .SILENT
|
||||
${LN} -sf libXvMCNVIDIA.so.1 ${PREFIX}/lib/libXvMCNVIDIA_dynamic.so.1
|
||||
.endif
|
||||
.if ${NVVERSION} >= 1952200
|
||||
. if ${OSVERSION} > 800090
|
||||
${REINPLACE_CMD} -e '/does not support PAE/,+1d' ${PKGMESSAGE}
|
||||
. else # when sed(1) does not support "addr1,+N" ranges, use line numbers
|
||||
${REINPLACE_CMD} -e '26,27d' ${PKGMESSAGE}
|
||||
. endif
|
||||
.endif
|
||||
PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
||||
${ECHO_MSG}
|
||||
|
@ -1,4 +1,4 @@
|
||||
These are the official NVidia binary drivers for hardware OpenGL rendering
|
||||
in X, using the GLX extensions.
|
||||
in X11, using the GLX extensions.
|
||||
|
||||
WWW: http://www.nvidia.com/object/unix.html
|
||||
|
@ -1,3 +1,4 @@
|
||||
bin/nvidia-bug-report.sh
|
||||
lib/.nvidia/libGL.so
|
||||
lib/.nvidia/libGL.so.1
|
||||
@dirrm lib/.nvidia
|
||||
|
Loading…
Reference in New Issue
Block a user