- Stagify

- Mark -71 and -173 broken on FreeBSD 10+, they do not build there
- Remove check for FreeBSD 7.2-

Approved by:	portmgr (infrastructure blanket)
This commit is contained in:
Rene Ladan 2014-01-31 17:59:24 +00:00
parent 0707cb5aaf
commit 59289cf450
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=342050
4 changed files with 55 additions and 14 deletions

View file

@ -19,7 +19,7 @@ LICENSE_FILE= ${WRKSRC}/doc/license.txt
LICENSE_PERMS= dist-mirror no-dist-sell pkg-mirror no-pkg-sell auto-accept
ARCH_SUFX= ${ARCH:S/i386//:S/amd/_/}
USES= kmod
USES= kmod uidfix
USE_XORG= xorg-server
USE_GL= gl
USE_LDCONFIG= yes
@ -52,6 +52,20 @@ ONLY_FOR_ARCHS= i386
.if ${NVVERSION} <= 1904200
EXTRA_PATCHES= ${FILESDIR}/legacy-patch-nvidia.lib.mk
.else
EXTRA_PATCHES= ${FILESDIR}/extra-patch-mk__nvidia.lib.mk
.endif
.if ${NVVERSION} >= 3312000
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-x11__driver__Makefile
.else
EXTRA_PATCHES+= ${FILESDIR}/legacy-patch-x11__driver__Makefile
.endif
.if ${OSVERSION} >= 1000000
.if ${NVVERSION} == 1731435 || ${NVVERSION} == 718615
BROKEN= does not compile
.endif
.endif
# Fix recent arbitrary memory access vulnerability in legacy drivers
@ -78,7 +92,6 @@ OPTIONS_DEFINE+= WBINVD
WBINVD_DESC= Flush CPU caches directly with WBINVD
.endif
NO_STAGE= yes
.include <bsd.port.pre.mk>
PLIST_SUB+= LINUXBASE=${LINUXBASE} SHLIB_VERSION=${PORTVERSION} \
@ -94,10 +107,6 @@ PLIST_SUB+= LINUX="@comment "
MAKE_ENV+= WITHOUT_LINUX=yes
.endif
.if ${OSVERSION} < 702106 && ${NVVERSION} >= 1952200
IGNORE= requires fairly recent FreeBSD-STABLE, or FreeBSD-CURRENT
.endif
.if ${NVVERSION} < 1952200
# ABI version is hardcoded inside the binary, so specify it explicitly here
LIB_DEPENDS= libm.so.3:${PORTSDIR}/misc/compat5x
@ -217,10 +226,11 @@ pre-su-install:
# While this port silently assumes PREFIX == LOCALBASE, at least try to
# pretend we support different paths thereof and make sure these directories
# exist
@cd ${PREFIX}/${MODULESDIR} && ${MKDIR} drivers extensions
@cd ${STAGEDIR}${PREFIX} && ${MKDIR} ${MODULESDIR}
@cd ${STAGEDIR}${PREFIX}/${MODULESDIR} && ${MKDIR} drivers extensions
post-install: .SILENT
${INSTALL_SCRIPT} ${WRKSRC}/obj/nvidia-bug-report.sh ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/obj/nvidia-bug-report.sh ${STAGEDIR}${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}
@ -241,18 +251,14 @@ post-install: .SILENT
.if ${NVVERSION} >= 3101900
${REINPLACE_CMD} -e '/libXvMCNVIDIA/d' ${TMPPLIST}
.else # some applications need this symlink (see PR ports/72877)
${LN} -sf libXvMCNVIDIA.so.1 ${PREFIX}/lib/libXvMCNVIDIA_dynamic.so.1
${LN} -sf libXvMCNVIDIA.so.1 ${STAGEDIR}${PREFIX}/lib/libXvMCNVIDIA_dynamic.so.1
.endif
.if ${NVVERSION} < 3311300
.if ${NVVERSION} < 3311300 || ${ARCH} == amd64
${REINPLACE_CMD} -E '/lib(nvidia-)?(EGL|eglcore|GLESv|glsi)/d' \
${TMPPLIST}
.endif
.if ${NVVERSION} >= 1952200
${REINPLACE_CMD} -e '/does not support PAE/,+1d' ${PKGMESSAGE}
.endif
PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
${ECHO_MSG}
${CAT} ${PKGMESSAGE}
${ECHO_MSG}
.include <bsd.port.post.mk>

View file

@ -0,0 +1,13 @@
--- mk/nvidia.lib.mk.orig 2013-08-16 10:53:30.000000000 +0200
+++ mk/nvidia.lib.mk 2014-01-27 16:55:39.000000000 +0100
@@ -46,8 +46,8 @@
.endif
.endif
.if defined(AUXLINK_TGT)
- @rm -f ${AUXLINK_LINK}
- @ln -fs ${AUXLINK_TGT} ${AUXLINK_LINK}
+ @rm -f ${DESTDIR}${AUXLINK_LINK}
+ @ln -fs ${AUXLINK_TGT} ${DESTDIR}${AUXLINK_LINK}
.endif
.if defined(STATICLIB_NAME)
@rm -f ${DESTDIR}${LIBDIR}/${STATICLIB_NAME}

View file

@ -0,0 +1,11 @@
--- x11/driver/Makefile.orig 2013-08-16 10:53:30.000000000 +0200
+++ x11/driver/Makefile 2014-01-27 18:25:14.000000000 +0100
@@ -5,7 +5,7 @@
.endif
DRIVERS= nvidia_drv.o nvidia_drv.so
-.if exists(${LOCALBASE}/lib/xorg/modules/drivers)
+.if exists(${DESTDIR}${LOCALBASE}/lib/xorg/modules/drivers)
DRIVERDIR= ${LOCALBASE}/lib/xorg/modules/drivers
.else
DRIVERDIR= ${LOCALBASE}/lib/modules/drivers

View file

@ -0,0 +1,11 @@
--- x11/driver/Makefile.orig 2012-12-12 15:39:41.000000000 +0100
+++ x11/driver/Makefile 2014-01-28 22:28:05.000000000 +0100
@@ -5,7 +5,7 @@
.endif
DRIVERS= nvidia_drv.o nvidia_drv.so
-.if exists(${X11BASE}/lib/xorg/modules/drivers)
+.if exists(${DESTDIR}${X11BASE}/lib/xorg/modules/drivers)
DRIVERDIR= ${X11BASE}/lib/xorg/modules/drivers
.else
DRIVERDIR= ${X11BASE}/lib/modules/drivers