Date: Sat, 11 Feb 2017 16:43:11 +0000 (UTC) From: Koop Mast <kwm@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r433892 - in head: Mk/Scripts graphics/libEGL graphics/libGL graphics/libglesv2 x11/nvidia-driver x11/nvidia-driver-304 x11/nvidia-driver-340 x11/nvidia-driver/files Message-ID: <201702111643.v1BGhBoE063420@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kwm Date: Sat Feb 11 16:43:11 2017 New Revision: 433892 URL: https://svnweb.freebsd.org/changeset/ports/433892 Log: Now that all supported FreeBSD versions support libmap.conf files installed from ports, remove the symlink dance with libGL/libEGL/libgles and the nvidia-driver ports. * Revert libGL/libEGL/libglesv2 ports to normal. * Rename the conflicting libraries from the nvidia-driver ports with a -NVIDIA prefix and install a libmap.conf file to map to these versions. * Remove the special case from Mk/Scripts/qa.sh for libGL and libEGL. * Sadly the symlink dance between nvidia-driver and xorg-server for glx.so need to stay, due to xorg-server opening that file with dlopen(3). Approved by: portmgr@ (mat@ (prio version)) Differential Revision: https://reviews.freebsd.org/D7848 Added: head/x11/nvidia-driver/files/nvidia.conf.in (contents, props changed) Deleted: head/graphics/libEGL/pkg-deinstall head/graphics/libEGL/pkg-install head/graphics/libGL/pkg-deinstall head/graphics/libGL/pkg-install head/graphics/libglesv2/pkg-deinstall head/graphics/libglesv2/pkg-install Modified: head/Mk/Scripts/qa.sh head/graphics/libEGL/Makefile head/graphics/libEGL/pkg-plist head/graphics/libGL/Makefile head/graphics/libGL/pkg-plist head/graphics/libglesv2/Makefile head/graphics/libglesv2/pkg-plist head/x11/nvidia-driver-304/Makefile head/x11/nvidia-driver-340/Makefile head/x11/nvidia-driver/Makefile head/x11/nvidia-driver/files/pkg-deinstall.in head/x11/nvidia-driver/files/pkg-install.in head/x11/nvidia-driver/pkg-plist Modified: head/Mk/Scripts/qa.sh ============================================================================== --- head/Mk/Scripts/qa.sh Sat Feb 11 16:29:35 2017 (r433891) +++ head/Mk/Scripts/qa.sh Sat Feb 11 16:43:11 2017 (r433892) @@ -641,22 +641,6 @@ proxydeps_suggest_uses() { fi } -subst_dep_file() { - local dep_file=$1 - if expr ${dep_file} : "${LOCALBASE}/lib/libGL.so.[0-9]$" > /dev/null; then - if [ -f ${LOCALBASE}/lib/.mesa/libGL.so ]; then - echo ${LOCALBASE}/lib/.mesa/libGL.so - return - fi - elif expr ${dep_file} : "${LOCALBASE}/lib/libEGL.so.[0-9]$" > /dev/null; then - if [ -f ${LOCALBASE}/lib/.mesa/libEGL.so ]; then - echo ${LOCALBASE}/lib/.mesa/libEGL.so - return - fi - fi - echo ${dep_file} -} - proxydeps() { local file dep_file dep_file_pkg already rc @@ -670,7 +654,6 @@ proxydeps() { while read dep_file; do # No results presents a blank line from heredoc. [ -z "${dep_file}" ] && continue - dep_file=$(subst_dep_file ${dep_file}) # Skip files we already checked. if listcontains ${dep_file} "${already}"; then continue Modified: head/graphics/libEGL/Makefile ============================================================================== --- head/graphics/libEGL/Makefile Sat Feb 11 16:29:35 2017 (r433891) +++ head/graphics/libEGL/Makefile Sat Feb 11 16:43:11 2017 (r433892) @@ -3,7 +3,7 @@ PORTNAME= libEGL PORTVERSION= ${MESAVERSION} -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= graphics COMMENT= OpenEGL library @@ -27,9 +27,4 @@ MESA_INSTALL_WRKSRC= src/egl .include "${.CURDIR}/../../graphics/libGL/Makefile.targets" -post-install: - @${MKDIR} ${STAGEDIR}${PREFIX}/lib/.mesa - @${MV} ${STAGEDIR}${PREFIX}/lib/libEGL* \ - ${STAGEDIR}${PREFIX}/lib/.mesa/ - .include <bsd.port.mk> Modified: head/graphics/libEGL/pkg-plist ============================================================================== --- head/graphics/libEGL/pkg-plist Sat Feb 11 16:29:35 2017 (r433891) +++ head/graphics/libEGL/pkg-plist Sat Feb 11 16:43:11 2017 (r433892) @@ -4,7 +4,7 @@ include/EGL/eglextchromium.h include/EGL/eglmesaext.h include/EGL/eglplatform.h include/KHR/khrplatform.h -lib/.mesa/libEGL.so -lib/.mesa/libEGL.so.1 -lib/.mesa/libEGL.so.1.0.0 +lib/libEGL.so +lib/libEGL.so.1 +lib/libEGL.so.1.0.0 libdata/pkgconfig/egl.pc Modified: head/graphics/libGL/Makefile ============================================================================== --- head/graphics/libGL/Makefile Sat Feb 11 16:29:35 2017 (r433891) +++ head/graphics/libGL/Makefile Sat Feb 11 16:43:11 2017 (r433892) @@ -3,7 +3,7 @@ PORTNAME= libGL PORTVERSION= ${MESAVERSION} -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= graphics COMMENT= OpenGL library that renders using GLX or DRI @@ -24,9 +24,6 @@ MESA_INSTALL_WRKSRC= src/glx .include "${.CURDIR}/Makefile.targets" post-install: - @${MKDIR} ${STAGEDIR}${PREFIX}/lib/.mesa - @${MV} ${STAGEDIR}${PREFIX}/lib/libGL* \ - ${STAGEDIR}${PREFIX}/lib/.mesa/ @cd ${WRKSRC}/src && ${SETENV} DESTDIR=${STAGEDIR} \ ${MAKE_CMD} install-pkgconfigDATA install-glHEADERS install-glxHEADERS Modified: head/graphics/libGL/pkg-plist ============================================================================== --- head/graphics/libGL/pkg-plist Sat Feb 11 16:29:35 2017 (r433891) +++ head/graphics/libGL/pkg-plist Sat Feb 11 16:43:11 2017 (r433892) @@ -5,7 +5,7 @@ include/GL/glext.h include/GL/glx.h include/GL/glx_mangle.h include/GL/glxext.h -lib/.mesa/libGL.so -lib/.mesa/libGL.so.1 -lib/.mesa/libGL.so.1.2.0 +lib/libGL.so +lib/libGL.so.1 +lib/libGL.so.1.2.0 libdata/pkgconfig/gl.pc Modified: head/graphics/libglesv2/Makefile ============================================================================== --- head/graphics/libglesv2/Makefile Sat Feb 11 16:29:35 2017 (r433891) +++ head/graphics/libglesv2/Makefile Sat Feb 11 16:43:11 2017 (r433892) @@ -3,7 +3,7 @@ PORTNAME= libglesv2 PORTVERSION= ${MESAVERSION} -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= graphics COMMENT= OpenGL ES v2 library @@ -26,9 +26,4 @@ INSTALL_WRKSRC= ${WRKSRC}/src/mapi .include "${.CURDIR}/../../graphics/libGL/Makefile.targets" -post-install: - @${MKDIR} ${STAGEDIR}${PREFIX}/lib/.mesa - @${MV} ${STAGEDIR}${PREFIX}/lib/libGLESv2.so* \ - ${STAGEDIR}${PREFIX}/lib/.mesa/ - .include <bsd.port.mk> Modified: head/graphics/libglesv2/pkg-plist ============================================================================== --- head/graphics/libglesv2/pkg-plist Sat Feb 11 16:29:35 2017 (r433891) +++ head/graphics/libglesv2/pkg-plist Sat Feb 11 16:43:11 2017 (r433892) @@ -6,9 +6,9 @@ include/GLES3/gl31.h include/GLES3/gl32.h include/GLES3/gl3ext.h include/GLES3/gl3platform.h -lib/.mesa/libGLESv2.so -lib/.mesa/libGLESv2.so.2 -lib/.mesa/libGLESv2.so.2.0.0 +lib/libGLESv2.so +lib/libGLESv2.so.2 +lib/libGLESv2.so.2.0.0 @comment lib/libglapi.so @comment lib/libglapi.so.0 @comment lib/libglapi.so.0.0.0 Modified: head/x11/nvidia-driver-304/Makefile ============================================================================== --- head/x11/nvidia-driver-304/Makefile Sat Feb 11 16:29:35 2017 (r433891) +++ head/x11/nvidia-driver-304/Makefile Sat Feb 11 16:43:11 2017 (r433892) @@ -3,7 +3,7 @@ DISTVERSION= 304.134 # Explicitly set PORTREVISION as it can be overridden by the master port -PORTREVISION= 0 +PORTREVISION= 1 MASTERDIR= ${.CURDIR}/../nvidia-driver PKGNAMESUFFIX= -304 Modified: head/x11/nvidia-driver-340/Makefile ============================================================================== --- head/x11/nvidia-driver-340/Makefile Sat Feb 11 16:29:35 2017 (r433891) +++ head/x11/nvidia-driver-340/Makefile Sat Feb 11 16:43:11 2017 (r433892) @@ -3,7 +3,7 @@ DISTVERSION= 340.101 # Explicitly set PORTREVISION as it can be overridden by the master port -PORTREVISION= 0 +PORTREVISION= 1 MASTERDIR= ${.CURDIR}/../nvidia-driver PKGNAMESUFFIX= -340 Modified: head/x11/nvidia-driver/Makefile ============================================================================== --- head/x11/nvidia-driver/Makefile Sat Feb 11 16:29:35 2017 (r433891) +++ head/x11/nvidia-driver/Makefile Sat Feb 11 16:43:11 2017 (r433892) @@ -12,7 +12,7 @@ PORTNAME= nvidia-driver DISTVERSION?= 375.26 # Always try to set PORTREVISION as it can be overridden by the slave ports -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES= x11 MASTER_SITES= NVIDIA/XFree86/FreeBSD-${ARCH_SUFX}/${DISTVERSION} DISTNAME= NVIDIA-FreeBSD-${ARCH_SUFX}-${DISTVERSION} @@ -40,7 +40,7 @@ USE_LDCONFIG= yes # hack below to universally set NVIDIA_ROOT. Also provide X11BASE value # since it is still used by legacy drivers. MAKE_ENV= NVIDIA_ROOT=${WRKSRC} X11BASE=${LOCALBASE} -SUB_FILES= pkg-deinstall pkg-install pkg-message +SUB_FILES= pkg-deinstall pkg-install pkg-message nvidia.conf DOCSDIR= ${PREFIX}/share/doc/NVIDIA_GLX-1.0 MODULESDIR= lib/xorg/modules PORTDOCS= * @@ -57,6 +57,12 @@ NVVERSION= ${DISTVERSION} . endif .endif +.if ${NVVERSION} >= 331.013 +SUB_LIST= NVGL="" +.else +SUB_LIST= NVGL="# " +.endif + .if ${NVVERSION} < 355.006 EXTRA_PATCHES= ${FILESDIR}/extra-patch-src-Makefile \ ${FILESDIR}/extra-patch-src-nv-freebsd.h \ @@ -166,17 +172,10 @@ post-patch: .SILENT .if ${NVVERSION} >= 346.016 ${REINPLACE_CMD} -e '/libnvidia-gtk/d' ${WRKSRC}/lib/Makefile .endif -# Adjust installation paths of some conflicting files (shared also between -# libGL, libEGL, libGLESv2, and xorg-server) to ease package manager work +# Adjust installation path of a conflicting file (shared between +# nvidia-driver and xorg-server) to ease package manager work ${REINPLACE_CMD} -e '/LIBDIR/s:xorg/modules/extensions:&/.nvidia:' \ ${WRKSRC}/x11/extension/Makefile - ${REINPLACE_CMD} -e '/LIBDIR/s:lib:&/.nvidia:' \ - ${WRKSRC}/lib/libGL/Makefile -.if ${NVVERSION} >= 331.013 - ${REINPLACE_CMD} -e '/LIBDIR/s:lib:&/.nvidia:' \ - ${WRKSRC}/lib/libEGL/Makefile \ - ${WRKSRC}/lib/libGLESv2/Makefile -.endif # Do not execute afterinstall target (prevent automatic module registration # and "smart" installation of conflicting files heuristics) ${REINPLACE_CMD} -e 's/afterinstall/&_dontexecute/' ${WRKSRC}/Makefile @@ -264,6 +263,24 @@ post-install: .SILENT ${REINPLACE_CMD} -E '/\/lib\/libGLESv[12](_CM)?(\.so)?(_nvidia.so(\.[0-9]|\.[0-9]+\.[0-9]+)?)?$$/d ; \ /libEGL_nvidia\.so\.${PORTVERSION}/d' ${TMPPLIST} .endif +# rename libGL.so, libEGL.so and libGLESv2.so + ${MV} -f ${STAGEDIR}${PREFIX}/lib/libGL.so \ + ${STAGEDIR}${PREFIX}/lib/libGL-NVIDIA.so + ${MV} -f ${STAGEDIR}${PREFIX}/lib/libGL.so.1 \ + ${STAGEDIR}${PREFIX}/lib/libGL-NVIDIA.so.1 +.if ${NVVERSION} >= 331.013 + ${MV} -f ${STAGEDIR}${PREFIX}/lib/libEGL.so \ + ${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 \ + ${STAGEDIR}${PREFIX}/lib/libGLESv2-NVIDIA.so + ${MV} -f ${STAGEDIR}${PREFIX}/lib/libGLESv2.so.2 \ + ${STAGEDIR}${PREFIX}/lib/libGLESv2-NVIDIA.so.2 +.endif + @${MKDIR} ${STAGEDIR}${PREFIX}/etc/libmap.d/ + ${INSTALL_DATA} ${WRKDIR}/nvidia.conf \ + ${STAGEDIR}${PREFIX}/etc/libmap.d/ # Target below can be used instead of standard `makesum' to correctly # update distinfo (i.e., keeping other driver version entries intact) Added: head/x11/nvidia-driver/files/nvidia.conf.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11/nvidia-driver/files/nvidia.conf.in Sat Feb 11 16:43:11 2017 (r433892) @@ -0,0 +1,11 @@ +# libmap.conf file for nvidia provide libraries + +libGL.so libGL-NVIDIA.so +libGL.so.1 libGL-NVIDIA.so.1 + +%%NVGL%%libEGL.so libEGL-NVIDIA.so +%%NVGL%%libEGL.so.1 libEGL-NVIDIA.so.1 + +%%NVGL%%libGLESv2.so libGLESv2-NVIDIA.so +%%NVGL%%libGLESv2.so.2 libGLESv2-NVIDIA.so.2 + Modified: head/x11/nvidia-driver/files/pkg-deinstall.in ============================================================================== --- head/x11/nvidia-driver/files/pkg-deinstall.in Sat Feb 11 16:29:35 2017 (r433891) +++ head/x11/nvidia-driver/files/pkg-deinstall.in Sat Feb 11 16:43:11 2017 (r433892) @@ -7,27 +7,9 @@ PREFIX=${PKG_PREFIX-/usr/local} case $2 in DEINSTALL) - /bin/rm -f ${PREFIX}/lib/libGL.so* /bin/rm -f ${PREFIX}/lib/xorg/modules/extensions/libglx.so* - /bin/ln -f ${PREFIX}/lib/.mesa/libGL.so.1.2.0 ${PREFIX}/lib/libGL.so - /bin/ln -f ${PREFIX}/lib/.mesa/libGL.so.1.2.0 ${PREFIX}/lib/libGL.so.1 - /bin/ln -f ${PREFIX}/lib/.mesa/libGL.so.1.2.0 ${PREFIX}/lib/libGL.so.1.2.0 /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.xorg/libglx.so \ ${PREFIX}/lib/xorg/modules/extensions/libglx.so - - - if [ -f ${PREFIX}/lib/.mesa/libEGL.so.1 ]; then - /bin/rm -f ${PREFIX}/lib/libEGL.so* - /bin/ln -f ${PREFIX}/lib/.mesa/libEGL.so.1.0.0 ${PREFIX}/lib/libEGL.so - /bin/ln -f ${PREFIX}/lib/.mesa/libEGL.so.1.0.0 ${PREFIX}/lib/libEGL.so.1 - /bin/ln -f ${PREFIX}/lib/.mesa/libEGL.so.1.0.0 ${PREFIX}/lib/libEGL.so.1.0.0 - fi - if [ -f ${PREFIX}/lib/.mesa/libGLESv2.so.2 ]; then - /bin/rm -f ${PREFIX}/lib/libGLESv2.so* - /bin/ln -f ${PREFIX}/lib/.mesa/libGLESv2.so.2.0.0 ${PREFIX}/lib/libGLESv2.so - /bin/ln -f ${PREFIX}/lib/.mesa/libGLESv2.so.2.0.0 ${PREFIX}/lib/libGLESv2.so.2 - /bin/ln -f ${PREFIX}/lib/.mesa/libGLESv2.so.2.0.0 ${PREFIX}/lib/libGLESv2.so.2.0.0 - fi ;; esac Modified: head/x11/nvidia-driver/files/pkg-install.in ============================================================================== --- head/x11/nvidia-driver/files/pkg-install.in Sat Feb 11 16:29:35 2017 (r433891) +++ head/x11/nvidia-driver/files/pkg-install.in Sat Feb 11 16:43:11 2017 (r433892) @@ -7,19 +7,6 @@ PREFIX=${PKG_PREFIX-/usr/local} case $2 in POST-INSTALL) - /bin/rm -f ${PREFIX}/lib/libGL.so* - /bin/ln -f ${PREFIX}/lib/.nvidia/libGL.so.1 ${PREFIX}/lib/libGL.so - /bin/ln -f ${PREFIX}/lib/.nvidia/libGL.so.1 ${PREFIX}/lib/libGL.so.1 - if [ -f ${PREFIX}/lib/.nvidia/libEGL.so.1 ]; then - /bin/rm -f ${PREFIX}/lib/libEGL.so* - /bin/ln -f ${PREFIX}/lib/.nvidia/libEGL.so.1 ${PREFIX}/lib/libEGL.so - /bin/ln -f ${PREFIX}/lib/.nvidia/libEGL.so.1 ${PREFIX}/lib/libEGL.so.1 - fi - if [ -f ${PREFIX}/lib/.nvidia/libGLESv2.so.2 ]; then - /bin/rm -f ${PREFIX}/lib/libGLESv2.so* - /bin/ln -f ${PREFIX}/lib/.nvidia/libGLESv2.so.2 ${PREFIX}/lib/libGLESv2.so - /bin/ln -f ${PREFIX}/lib/.nvidia/libGLESv2.so.2 ${PREFIX}/lib/libGLESv2.so.2 - fi /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 \ ${PREFIX}/lib/xorg/modules/extensions/libglx.so ;; Modified: head/x11/nvidia-driver/pkg-plist ============================================================================== --- head/x11/nvidia-driver/pkg-plist Sat Feb 11 16:29:35 2017 (r433891) +++ head/x11/nvidia-driver/pkg-plist Sat Feb 11 16:43:11 2017 (r433892) @@ -1,14 +1,15 @@ bin/nvidia-bug-report.sh bin/nvidia-debugdump bin/nvidia-smi -lib/.nvidia/libEGL.so -lib/.nvidia/libEGL.so.1 -lib/.nvidia/libGL.so -lib/.nvidia/libGL.so.1 -lib/.nvidia/libGLESv2.so -lib/.nvidia/libGLESv2.so.2 +etc/libmap.d/nvidia.conf +lib/libGL-NVIDIA.so +lib/libGL-NVIDIA.so.1 +lib/libEGL-NVIDIA.so +lib/libEGL-NVIDIA.so.1 lib/libGLESv1_CM.so lib/libGLESv1_CM.so.1 +lib/libGLESv2-NVIDIA.so +lib/libGLESv2-NVIDIA.so.2 lib/libXvMCNVIDIA.a lib/libXvMCNVIDIA.so lib/libXvMCNVIDIA.so.1
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702111643.v1BGhBoE063420>