diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2011-07-06 09:59:58 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2011-07-06 09:59:58 +0000 |
commit | 86560de87a784eb5150f2912d85b0a74739934d0 (patch) | |
tree | 7644d5d12dac5beda683ec7cf29552b6c2c23d4b /x11 | |
parent | d3ed95f27866c8e764639035035ba4170ceec633 (diff) | |
download | ports-86560de87a784eb5150f2912d85b0a74739934d0.tar.gz ports-86560de87a784eb5150f2912d85b0a74739934d0.zip |
- Fix the build against Clang (also GCC with -Wformat-security, see PR
ports/157255)
- Drop long gone ports from CONFLICTS line and refine some comments
while I'm here
Submitted by: Garrett Cooper (modified)
Notes
Notes:
svn path=/head/; revision=277169
Diffstat (limited to 'x11')
-rw-r--r-- | x11/nvidia-driver/Makefile | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/x11/nvidia-driver/Makefile b/x11/nvidia-driver/Makefile index 05dd690e6521..1fdeaf43f6c6 100644 --- a/x11/nvidia-driver/Makefile +++ b/x11/nvidia-driver/Makefile @@ -75,8 +75,7 @@ PLIST_SUB+= XSERVVERSION=${XSERVVERSION} LIBGLVERSION=${LIBGLVERSION} \ MODULESDIR=${MODULESDIR} .if !defined(WITHOUT_LINUX) -CONFLICTS= linux-dri-[0-9]* linux-f10-dri-[0-9]* linux-f8-dri-[0-9]* \ - linux_dri-[0-9]* linux_dri-devel-[0-9]* +CONFLICTS= linux[-_]dri-[0-9]* linux-f10-dri-[0-9]* USE_LINUX= yes PLIST_SUB+= LINUX="" .else @@ -103,6 +102,15 @@ post-patch: .SILENT s/int nprot/&, vm_memattr_t *memattr/' \ ${WRKSRC}/src/nvidia_dev.c .endif +# Fix the build against Clang (also GCC with -Wformat-security) +.if ${NVVERSION} >= 2704106 + ${REINPLACE_CMD} -E \ + 's/(^ +)snprintf(\(.+)(, .+)(, .+)\)/\1strlcpy\2\4\3)/' \ + ${WRKSRC}/src/nvidia_os.c +.endif +# Fix an apparent typo (present in several versions since 260.19.12) + ${REINPLACE_CMD} -e 's/status != status/status != RM_OK/' \ + ${WRKSRC}/src/nvidia_os.c .if defined(WITH_FREEBSD_AGP) ${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_OS_AGP)/define \1/' \ ${WRKSRC}/src/nv-freebsd.h @@ -125,7 +133,8 @@ post-patch: .SILENT ${REINPLACE_CMD} -e '/libvdpau[[:blank:]_][^n]/d ; \ s/name libvdpau/&_nvidia/' ${WRKSRC}/lib/Makefile .endif -# Don't build any binaries (nvidia-settings and nvidia-xconfig) and manuals +# Don't build any binaries (native nvidia-settings and nvidia-xconfig are +# provided by corresponding ports) and manuals .if ${NVVERSION} < 974600 || ${NVVERSION} >= 1952200 ${REINPLACE_CMD} -E 's/(extension).*/\1/' ${WRKSRC}/x11/Makefile .else @@ -141,7 +150,8 @@ post-patch: .SILENT pre-su-install: # While this port silently assumes PREFIX == LOCALBASE, at least try to -# pretend we support different paths thereof +# pretend we support different paths thereof and make sure these directories +# exist @cd ${PREFIX}/${MODULESDIR} && ${MKDIR} drivers extensions post-install: .SILENT |