From owner-svn-ports-head@freebsd.org Fri Aug 19 23:12:00 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5EA52BC03D3; Fri, 19 Aug 2016 23:12:00 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 350AA1BE2; Fri, 19 Aug 2016 23:12:00 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7JNBxEu051102; Fri, 19 Aug 2016 23:11:59 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7JNBxcm051101; Fri, 19 Aug 2016 23:11:59 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <201608192311.u7JNBxcm051101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Fri, 19 Aug 2016 23:11:59 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r420499 - head/x11/nvidia-driver X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2016 23:12:00 -0000 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 \