Recreate symlinks instead of renaming them, so they point to the right

file.

PR:		226403
Submitted by:	Tatu Kilappa <tatu.kilappa@iki.fi>
Approved by:	maintainer timeout (10 months)
This commit is contained in:
Tijl Coosemans 2019-01-18 17:52:59 +00:00
parent b7f55e20e4
commit 5ed30a038c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=490643
3 changed files with 11 additions and 7 deletions

View File

@ -3,7 +3,7 @@
DISTVERSION= 304.137
# Explicitly set PORTREVISION as it can be overridden by the master port
PORTREVISION= 2
PORTREVISION= 3
MASTERDIR= ${.CURDIR}/../nvidia-driver
PKGNAMESUFFIX= -304

View File

@ -3,7 +3,7 @@
DISTVERSION= 340.107
# Explicitly set PORTREVISION as it can be overridden by the master port
PORTREVISION= 2
PORTREVISION= 3
MASTERDIR= ${.CURDIR}/../nvidia-driver
PKGNAMESUFFIX= -340

View File

@ -12,7 +12,7 @@
PORTNAME= nvidia-driver
DISTVERSION?= 390.87
# Always try to set PORTREVISION as it can be overridden by the slave ports
PORTREVISION?= 1
PORTREVISION?= 2
CATEGORIES= x11
MASTER_SITES= NVIDIA/XFree86/FreeBSD-${ARCH_SUFX}/${DISTVERSION}
DISTNAME= NVIDIA-FreeBSD-${ARCH_SUFX}-${DISTVERSION}
@ -546,20 +546,24 @@ post-install: .SILENT
/libEGL_nvidia\.so\.${PORTVERSION}/d;}' ${TMPPLIST}
.endif
${REINPLACE_CMD} -E ${PLIST_RE:S/^/-e /} ${TMPPLIST}
# rename libGL.so, libEGL.so and libGLESv2.so
${MV} -f ${STAGEDIR}${PREFIX}/lib/libGL.so \
# Rename some libraries and install a libmap file to resolve conflict with
# Mesa libraries.
${LN} -sf libGL-NVIDIA.so.1 \
${STAGEDIR}${PREFIX}/lib/libGL-NVIDIA.so
${MV} -f ${STAGEDIR}${PREFIX}/lib/libGL.so.1 \
${STAGEDIR}${PREFIX}/lib/libGL-NVIDIA.so.1
${RM} -f ${STAGEDIR}${PREFIX}/lib/libGL.so
.if ${NVVERSION} >= 331.013
${MV} -f ${STAGEDIR}${PREFIX}/lib/libEGL.so \
${LN} -sf libEGL-NVIDIA.so.1 \
${STAGEDIR}${PREFIX}/lib/libEGL-NVIDIA.so
${MV} -f ${STAGEDIR}${PREFIX}/lib/libEGL.so.1 \
${STAGEDIR}${PREFIX}/lib/libEGL-NVIDIA.so.1
${MV} -f ${STAGEDIR}${PREFIX}/lib/libGLESv2.so \
${RM} -f ${STAGEDIR}${PREFIX}/lib/libEGL.so
${LN} -sf libGLESv2-NVIDIA.so.2 \
${STAGEDIR}${PREFIX}/lib/libGLESv2-NVIDIA.so
${MV} -f ${STAGEDIR}${PREFIX}/lib/libGLESv2.so.2 \
${STAGEDIR}${PREFIX}/lib/libGLESv2-NVIDIA.so.2
${RM} -f ${STAGEDIR}${PREFIX}/lib/libGLESv2.so
.endif
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/libmap.d/
${INSTALL_DATA} ${WRKDIR}/nvidia.conf \