nvidia390: switch to glvnd

This commit is contained in:
Juan RP 2019-12-01 15:54:09 +01:00
parent 6a06b41658
commit d7908726e9
1 changed files with 8 additions and 54 deletions

View File

@ -4,7 +4,7 @@ _desc="NVIDIA drivers (GeForce 400, 500 series)"
pkgname=nvidia390
version=390.132
revision=1
revision=2
maintainer="Andrew Benson <abenson+void@gmail.com>"
license="custom:NVIDIA Proprietary"
homepage="http://www.nvidia.com"
@ -15,13 +15,9 @@ repository="nonfree"
create_wrksrc=yes
short_desc="${_desc} - Libraries and Utilities"
depends="nvidia390-libs-${version}_${revision} nvidia390-gtklibs-${version}_${revision}
nvidia390-dkms-${version}_${revision} pkg-config"
nvidia390-dkms-${version}_${revision} pkg-config libglvnd"
conflicts="catalyst>=0 xserver-abi-video>24_1"
build_options="glvnd"
desc_option_glvnd="Add support for NVIDIA's GL Vendor Neutral Dispatch implementation"
build_options_default="glvnd"
if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then
_pkg="NVIDIA-Linux-x86-${version}"
distfiles="http://uk.download.nvidia.com/XFree86/Linux-x86/${version}/${_pkg}.run"
@ -55,56 +51,19 @@ do_install() {
# GLX extension module for X
vinstall libglx.so.${version} 755 usr/lib/xorg/modules/extensions
ln -sf libglx.so.${version} ${DESTDIR}/usr/lib/xorg/modules/extensions/libglx.so
ln -sf libglx.so.${version} ${DESTDIR}/usr/lib/xorg/modules/extensions/libglx-nvidia.so
# GLX client libs
if [ "${build_option_glvnd}" ]; then
# ----- Also provided by the libglvnd package (todo)
vinstall libGL.so.1.7.0 755 usr/lib
ln -sf libGL.so.1.7.0 ${DESTDIR}/usr/lib/libGL.so
ln -sf libGL.so.1.7.0 ${DESTDIR}/usr/lib/libGL.so.1
vinstall libGLX.so.0 755 usr/lib
ln -sf libGLX.so.0 ${DESTDIR}/usr/lib/libGLX.so
# --------------------------------------------------
# Required for GLVND option
vinstall libGLX_nvidia.so.${version} 755 usr/lib
ln -sf libGLX_nvidia.so.${version} ${DESTDIR}/usr/lib/libGLX_nvidia.so.0
ln -sf libGLX_nvidia.so.${version} ${DESTDIR}/usr/lib/libGLX_indirect.so.0
else
vinstall libGL.so.${version} 755 usr/lib
ln -sf libGL.so.${version} ${DESTDIR}/usr/lib/libGL.so
ln -sf libGL.so.${version} ${DESTDIR}/usr/lib/libGL.so.1
# Not required for non-GLVND option but recommended
# more info: https://devtalk.nvidia.com/default/topic/915640/multiple-glx-client-libraries-in-the-nvidia-linux-driver-installer-package/
vinstall libGLX_nvidia.so.${version} 755 usr/lib
ln -sf libGLX_nvidia.so.${version} ${DESTDIR}/usr/lib/libGLX_nvidia.so.0
ln -sf libGLX_nvidia.so.${version} ${DESTDIR}/usr/lib/libGLX_indirect.so.0
fi
# Required for GLVND option
vinstall libGLX_nvidia.so.${version} 755 usr/lib
ln -sf libGLX_nvidia.so.${version} ${DESTDIR}/usr/lib/libGLX_nvidia.so.0
ln -sf libGLX_nvidia.so.${version} ${DESTDIR}/usr/lib/libGLX_indirect.so.0
# OpenGL core library
vinstall libnvidia-glcore.so.${version} 755 usr/lib
vinstall libnvidia-eglcore.so.${version} 755 usr/lib
vinstall libnvidia-glsi.so.${version} 755 usr/lib
# EGL
# ----- Also provided by the libglvnd package (todo)
vinstall libOpenGL.so.0 755 usr/lib
ln -sf libOpenGL.so.0 ${DESTDIR}/usr/lib/libOpenGL.so
vinstall libGLdispatch.so.0 755 usr/lib
vinstall libGLESv1_CM.so.1.2.0 755 usr/lib
ln -sf libGLESv1_CM.so.1.2.0 ${DESTDIR}/usr/lib/libGLESv1_CM.so
ln -sf libGLESv1_CM.so.1.2.0 ${DESTDIR}/usr/lib/libGLESv1_CM.so.1
vinstall libGLESv2.so.2.1.0 755 usr/lib
ln -sf libGLESv2.so.2.1.0 ${DESTDIR}/usr/lib/libGLESv2.so
ln -sf libGLESv2.so.2.1.0 ${DESTDIR}/usr/lib/libGLESv2.so.2
vinstall libnvidia-egl-wayland.so.1.0.2 755 usr/lib
ln -sf libnvidia-egl-wayland.so.1.0.2 ${DESTDIR}/usr/lib/libnvidia-egl-wayland.so.1
@ -112,10 +71,6 @@ do_install() {
vinstall 10_nvidia_wayland.json 755 usr/share/egl/egl_external_platform.d
# --------------------------------------------------
vinstall libEGL.so.1.1.0 755 usr/lib
ln -sf libEGL.so.1.1.0 ${DESTDIR}/usr/lib/libEGL.so
ln -sf libEGL.so.1.1.0 ${DESTDIR}/usr/lib/libEGL.so.1
vinstall libEGL_nvidia.so.${version} 755 usr/lib
ln -sf libEGL_nvidia.so.${version} ${DESTDIR}/usr/lib/libEGL_nvidia.so.0
@ -267,8 +222,7 @@ nvidia390-gtklibs_package() {
}
nvidia390-libs_package() {
short_desc="${_desc} - common libraries"
provides="libEGL-${version}_${revision} libGL-${version}_${revision} libGLES-${version}_${revision}"
replaces="libEGL>=0 libGL>=0 libGLES>=0"
conflicts="libGL>10_1<19.2.5_2 libEGL>10_1<19.2.5_2 libGLES>10_1<19.2.5_2"
pkg_install() {
vmove usr/lib
}