From 3e60f458d44c592f7b2f0d45ba6081a564a30862 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Wed, 21 May 2025 17:46:19 +0200 Subject: [PATCH] mesa: fix logic error in glvnd selection Commit 9d2001f14ec7 ("Add Generic-gl device") introduced a subtle error in the glvnd enablement logic that lead to the Generic-Legacy image being built without glvnd which breaks nvidia support. Unlike most programming languages "||" and "&&" have the same precedence in shell and "A || B && C" get evaluated as "(A || B) && C" instead of the intended "A || (B && C)". Fix this by moving the "AND not-X11" check into the "GL" test and adjust formatting to make the intention clear. Signed-off-by: Matthias Reichl --- packages/graphics/mesa/package.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/graphics/mesa/package.mk b/packages/graphics/mesa/package.mk index d230a3adae..3d2bc91349 100644 --- a/packages/graphics/mesa/package.mk +++ b/packages/graphics/mesa/package.mk @@ -69,8 +69,7 @@ if listcontains "${GRAPHIC_DRIVERS}" "(iris|panfrost)"; then fi if listcontains "${GRAPHIC_DRIVERS}" "(nvidia|nvidia-ng)" || - [ "${OPENGL_SUPPORT}" = "yes" ] && - [ "${DISPLAYSERVER}" != "x11" ]; then + [ "${OPENGL_SUPPORT}" = "yes" -a "${DISPLAYSERVER}" != "x11" ]; then PKG_DEPENDS_TARGET+=" libglvnd" PKG_MESON_OPTS_TARGET+=" -Dglvnd=enabled" else