1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-10 07:04:03 +00:00

x11/nvidia-driver: unbreak the build of two legacy driver versions

- Limit the scope of the K&R prototype fix to versions which
  actually have that `nvlink_freebsd.c' file
- Adjust the version check for `lib/libnvidia-wayland-client.so'
  which had first appeared in 515.43.04 beta release and add a
  comment on the PLIST_FILES usage there

Reported by:	pkg-fallout
This commit is contained in:
Alexey Dokuchaev 2023-05-29 10:05:20 +00:00
parent 5ffeb848e5
commit 167434b654

View File

@ -139,7 +139,8 @@ PLIST_SUB+= LIBGLDIR=${LIBGLDIR} LIBGLMAP="@comment "
PLIST_SUB+= LIBGLDIR="@comment " LIBGLMAP=""
.endif
.if ${NVVERSION} >= 515.08601
# Not part of the pkg-plist because DISTVERSION is not on PLIST_SUB
.if ${NVVERSION} >= 515.04304
PLIST_FILES+= lib/libnvidia-wayland-client.so.${DISTVERSION}
.endif
@ -267,8 +268,10 @@ post-patch: .SILENT
${WRKSRC}/src/${NVSRC}/nvidia_subr.c
.endif
# Fix a K&R prototype
.if ${NVVERSION:R} >= 390
${REINPLACE_CMD} -e '/nvlink_allocLock/s,(),(void),' \
${WRKSRC}/src/${NVSRC}/nvlink_freebsd.c
.endif
# Finally, process OPTIONS
.if ${PORT_OPTIONS:MFREEBSD_AGP}
${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_OS_AGP)/define \1/' \