mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-18 00:10:04 +00:00
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
This commit is contained in:
parent
9364b8e3a3
commit
50a34a0774
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=433892
@ -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
|
||||
|
@ -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>
|
||||
|
@ -1,12 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PREFIX="${PKG_PREFIX-/usr/local}"
|
||||
|
||||
case $2 in
|
||||
DEINSTALL)
|
||||
/bin/rm -f ${PREFIX}/lib/libEGL.so*
|
||||
;;
|
||||
esac
|
@ -1,19 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PREFIX="${PKG_PREFIX-/usr/local}"
|
||||
|
||||
case $2 in
|
||||
POST-INSTALL)
|
||||
if [ -f ${PREFIX}/lib/.nvidia/libEGL.so.1 ]; then
|
||||
/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
|
||||
else
|
||||
/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
|
||||
;;
|
||||
esac
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,12 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PREFIX="${PKG_PREFIX-/usr/local}"
|
||||
|
||||
case $2 in
|
||||
DEINSTALL)
|
||||
/bin/rm -f ${PREFIX}/lib/libGL.so*
|
||||
;;
|
||||
esac
|
@ -1,19 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PREFIX="${PKG_PREFIX-/usr/local}"
|
||||
|
||||
case $2 in
|
||||
POST-INSTALL)
|
||||
if [ -f ${PREFIX}/lib/.nvidia/libGL.so.1 ]; then
|
||||
/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
|
||||
else
|
||||
/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
|
||||
fi
|
||||
;;
|
||||
esac
|
@ -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
|
||||
|
@ -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>
|
||||
|
@ -1,12 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PREFIX="${PKG_PREFIX-/usr/local}"
|
||||
|
||||
case $2 in
|
||||
DEINSTALL)
|
||||
/bin/rm -f ${PREFIX}/lib/libGLESv2.so*
|
||||
;;
|
||||
esac
|
@ -1,19 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PREFIX="${PKG_PREFIX-/usr/local}"
|
||||
|
||||
case $2 in
|
||||
POST-INSTALL)
|
||||
if [ -f ${PREFIX}/lib/.nvidia/libGLESv2.so.2 ]; then
|
||||
/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
|
||||
else
|
||||
/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
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
11
x11/nvidia-driver/files/nvidia.conf.in
Normal file
11
x11/nvidia-driver/files/nvidia.conf.in
Normal file
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
;;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user