Date: Fri, 19 Aug 2016 23:11:59 +0000 (UTC) From: Alexey Dokuchaev <danfe@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r420499 - head/x11/nvidia-driver Message-ID: <201608192311.u7JNBxcm051101@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: danfe Date: Fri Aug 19 23:11:59 2016 New Revision: 420499 URL: https://svnweb.freebsd.org/changeset/ports/420499 Log: Clean up the Makefile after recent changes: put source code and build logic patching closer together and move OPTIONS-related patching thereafter. Non functional. Modified: head/x11/nvidia-driver/Makefile Modified: head/x11/nvidia-driver/Makefile ============================================================================== --- head/x11/nvidia-driver/Makefile Fri Aug 19 22:45:12 2016 (r420498) +++ head/x11/nvidia-driver/Makefile Fri Aug 19 23:11:59 2016 (r420499) @@ -127,27 +127,7 @@ post-patch: .SILENT # Fix stack buffer overflow in nvidia_sysctl_bus_type() ${REINPLACE_CMD} -e 's/8 bus_type\[4\]/8 bus_type[8]/' \ ${WRKSRC}/src/nvidia_sysctl.c -# Process OPTIONS -.if ${PORT_OPTIONS:MFREEBSD_AGP} - ${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_OS_AGP)/define \1/' \ - ${WRKSRC}/src/nv-freebsd.h -.endif -.if ${PORT_OPTIONS:MACPI_PM} - ${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_ACPI_PM)/define \1/' \ - ${WRKSRC}/src/nv-freebsd.h -.endif -.if ! ${PORT_OPTIONS:MLINUX} - ${REINPLACE_CMD} -E 's/define (NV_SUPPORT_LINUX_COMPAT)/undef \1/' \ - ${WRKSRC}/src/nv-freebsd.h -.endif -.if ${PORT_OPTIONS:MPAE} - ${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_PAE)/define \1/' \ - ${WRKSRC}/src/nv-freebsd.h -.endif -.if ${PORT_OPTIONS:MWBINVD} - ${REINPLACE_CMD} -E 's/undef (NV_USE_WBINVD)/define \1/' \ - ${WRKSRC}/src/nv-freebsd.h -.endif +# Respect WITHOUT_LINUX setting ${REINPLACE_CMD} -e 's/exists(\/.*/& \&\& !defined(WITHOUT_LINUX)/' \ ${WRKSRC}/lib/Makefile # Do not install VDPAU libraries which are provided by `multimedia/libvdpau' @@ -162,10 +142,6 @@ post-patch: .SILENT .if ${NVVERSION} >= 346.016 ${REINPLACE_CMD} -e '/libnvidia-gtk/d' ${WRKSRC}/lib/Makefile .endif -# Conditionally install documentation (but you generally want it) -.if ! ${PORT_OPTIONS:MDOCS} - ${REINPLACE_CMD} -E 's/(x11).*/\1/ ; /doc/d' ${WRKSRC}/Makefile -.endif # Adjust installation paths of some conflicting files (shared also between # libGL, libEGL, libGLESv2, and xorg-server) to ease package manager work ${REINPLACE_CMD} -e '/LIBDIR/s:xorg/modules/extensions:&/.nvidia:' \ @@ -189,6 +165,31 @@ post-patch: .SILENT ${REINPLACE_CMD} -e 's,/usr/share/nvidia,${STAGEDIR}${DOCSDIR},' \ ${WRKSRC}/lib/libGL/Makefile ${WRKSRC}/doc/Makefile .endif +# Finally, process OPTIONS +.if ${PORT_OPTIONS:MFREEBSD_AGP} + ${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_OS_AGP)/define \1/' \ + ${WRKSRC}/src/nv-freebsd.h +.endif +.if ${PORT_OPTIONS:MACPI_PM} + ${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_ACPI_PM)/define \1/' \ + ${WRKSRC}/src/nv-freebsd.h +.endif +.if ! ${PORT_OPTIONS:MLINUX} + ${REINPLACE_CMD} -E 's/define (NV_SUPPORT_LINUX_COMPAT)/undef \1/' \ + ${WRKSRC}/src/nv-freebsd.h +.endif +.if ${PORT_OPTIONS:MPAE} + ${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_PAE)/define \1/' \ + ${WRKSRC}/src/nv-freebsd.h +.endif +.if ${PORT_OPTIONS:MWBINVD} + ${REINPLACE_CMD} -E 's/undef (NV_USE_WBINVD)/define \1/' \ + ${WRKSRC}/src/nv-freebsd.h +.endif +# Conditionally install documentation (but you generally want it) +.if ! ${PORT_OPTIONS:MDOCS} + ${REINPLACE_CMD} -E 's/(x11).*/\1/ ; /doc/d' ${WRKSRC}/Makefile +.endif pre-install: @${MKDIR} ${STAGEDIR}${PREFIX}/${MODULESDIR}/drivers \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608192311.u7JNBxcm051101>