From 0349b4bb986e6df9f0c894362e269de5d563ba0b Mon Sep 17 00:00:00 2001 From: Tyson Whitehead Date: Thu, 25 Feb 2021 15:10:46 -0500 Subject: [PATCH] opengl: Only apply VirtualGL fixup when we are a runtime dependency --- pkgs/opengl/insert-virtualgl.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/opengl/insert-virtualgl.sh b/pkgs/opengl/insert-virtualgl.sh index bd68de1..22dc89a 100755 --- a/pkgs/opengl/insert-virtualgl.sh +++ b/pkgs/opengl/insert-virtualgl.sh @@ -240,6 +240,8 @@ EOF # Find all executables that depend on libGL and replace with a wrapper script that either executes the original # executable or a copy with an added libvglfaker.so dependency depending on whether VGL_DISPLAY is set or not. # +# Only run when we are a runtime dependency (i.e., our host matches). +# VGL_autoAddVGL() { declare opts=$(shopt -p) output set +o pipefail @@ -255,4 +257,7 @@ VGL_autoAddVGL() { eval "$opts" } -postFixupHooks+=(VGL_autoAddVGL) + +if (( hostOffset == 0 )); then + fixupOutputHooks+=(VGL_autoAddVGL) +fi