Add library suffix to avoid conflict with mesa-libs + mesa-dri.
Library selection is handled by libglvnd and/or libmap.conf.

--- meson.build.orig	2024-04-06 18:40:47 UTC
+++ meson.build
@@ -100,7 +100,7 @@ if dri_drivers_path == ''
 
 dri_drivers_path = get_option('dri-drivers-path')
 if dri_drivers_path == ''
-  dri_drivers_path = join_paths(get_option('prefix'), get_option('libdir'), 'dri')
+  dri_drivers_path = join_paths(get_option('prefix'), get_option('libdir'), 'dri' + get_option('egl-lib-suffix'))
 endif
 dri_search_path = get_option('dri-search-path')
 if dri_search_path == ''
@@ -550,8 +550,7 @@ _glvnd = get_option('glvnd') \
            error_message: 'Cannot build glvnd support for GLX that is not DRI based.') \
   .require(with_glx != 'disabled' or with_egl,
            error_message: 'glvnd requires DRI based GLX and/or EGL') \
-  .require(get_option('egl-lib-suffix') == '',
-           error_message: '''EGL lib suffix can't be used with libglvnd''')
+
 dep_glvnd = dependency('libglvnd', version : '>= 1.3.2', required : _glvnd)
 with_glvnd = dep_glvnd.found()
 if with_glvnd
@@ -739,7 +738,7 @@ if va_drivers_path == ''
 
 va_drivers_path = get_option('va-libs-path')
 if va_drivers_path == ''
-  va_drivers_path = join_paths(get_option('libdir'), 'dri')
+  va_drivers_path = join_paths(get_option('libdir'), 'dri' + get_option('egl-lib-suffix'))
 endif
 
 with_gallium_xa = get_option('gallium-xa') \
--- src/amd/vulkan/meson.build.orig	2026-06-03 18:25:19 UTC
+++ src/amd/vulkan/meson.build
@@ -31,7 +31,7 @@ radv_drirc = custom_target(
 
 radv_drirc = custom_target(
   'radv_drirc',
-  input  : [files('radv_drirc_gen.py'), drirc_gen, join_paths(dir_source_root, 'src/util/00-radv-defaults.conf')],
+  input  : [files('radv_drirc_gen.py'), drirc_gen, join_paths(dir_source_root, 'src/util/00-radv@0@-defaults.conf'.format(get_option('egl-lib-suffix')))],
   output : ['radv_drirc.c', 'radv_drirc.h'],
   command : [
     prog_python, '@INPUT0@',
@@ -250,7 +250,7 @@ libvulkan_radeon = shared_library(
 endif
 
 libvulkan_radeon = shared_library(
-  'vulkan_radeon',
+  'vulkan_radeon' + get_option('egl-lib-suffix'),
   [libradv_files, radv_entrypoints, radv_drirc, sha1_h, radix_sort_spv, bvh_spv, radv_annotate_layer],
   vs_module_defs : vulkan_api_def,
   include_directories : [
--- src/egl/meson.build.orig	2020-12-03 22:36:27 UTC
+++ src/egl/meson.build
@@ -144,7 +144,7 @@ if not with_glvnd
   egl_lib_name = 'EGL' + get_option('egl-lib-suffix')
   egl_lib_version = '1.0.0'
 else
-  egl_lib_name = 'EGL_@0@'.format(glvnd_vendor_name)
+  egl_lib_name = 'EGL_@0@'.format(glvnd_vendor_name) + get_option('egl-lib-suffix')
   egl_lib_version = '0.0.0'
   deps_for_egl += dep_glvnd
   files_egl += [g_egldispatchstubs_h, g_egldispatchstubs_c]
--- src/gallium/targets/dri/meson.build.orig	2024-08-31 18:55:15 UTC
+++ src/gallium/targets/dri/meson.build
@@ -29,7 +29,7 @@ libgallium_dri = shared_library(
 endif
 
 libgallium_dri = shared_library(
-  libgallium_name,
+  libgallium_name + get_option('egl-lib-suffix'),
   files('dri_target.c'),
   include_directories : [
     inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_util, inc_gallium_drivers,
--- src/gbm/backends/dri/meson.build.orig	2024-11-27 22:48:04 UTC
+++ src/gbm/backends/dri/meson.build
@@ -9,7 +9,7 @@ shared_library(
 endif
 
 shared_library(
-  'dri_gbm',
+  'dri' + get_option('egl-lib-suffix') + '_gbm',
   files('gbm_dri.c', 'gbm_driint.h'),
   include_directories : [incs_gbm, incs_gbm_dri, inc_st_dri, inc_gallium_aux],
   link_args : [ld_args_gc_sections],
--- src/gbm/meson.build.orig	2022-09-12 22:59:56 UTC
+++ src/gbm/meson.build
@@ -52,7 +52,7 @@ libgbm = shared_library(
 endif
 
 libgbm = shared_library(
-  libgbm_name,
+  libgbm_name + get_option('egl-lib-suffix'),
   files_gbm,
   include_directories : incs_gbm,
   c_args : [args_gbm],
--- src/glx/meson.build.orig	2020-12-03 22:36:27 UTC
+++ src/glx/meson.build
@@ -108,10 +108,10 @@ elif with_dri_platform == 'windows'
 endif
 
 if not with_glvnd
-  gl_lib_name = 'GL'
+  gl_lib_name = 'GL' + get_option('egl-lib-suffix')
   gl_lib_version = '1.2.0'
 else
-  gl_lib_name = 'GLX_@0@'.format(glvnd_vendor_name)
+  gl_lib_name = 'GLX_@0@'.format(glvnd_vendor_name) + get_option('egl-lib-suffix')
   gl_lib_version = '0.0.0'
   files_libglx += files(
     'g_glxglvnddispatchfuncs.c',
--- src/intel/vulkan/meson.build.orig	2026-06-03 18:25:19 UTC
+++ src/intel/vulkan/meson.build
@@ -95,7 +95,7 @@ libanv_drirc_files = custom_target(
 
 libanv_drirc_files = custom_target(
   'libanv_drirc',
-  input : ['anv_drirc_gen.py', drirc_gen, join_paths(dir_source_root, 'src/util/00-anv-defaults.conf')],
+  input : ['anv_drirc_gen.py', drirc_gen, join_paths(dir_source_root, 'src/util/00-anv@0@-defaults.conf'.format(get_option('egl-lib-suffix')))],
   output : ['anv_drirc.c', 'anv_drirc.h'],
   command : [prog_python, '@INPUT0@',
              '-p', join_paths(dir_source_root, 'src/util/'),
@@ -302,7 +302,7 @@ libvulkan_intel = shared_library(
 )
 
 libvulkan_intel = shared_library(
-  'vulkan_intel',
+  'vulkan_intel' + get_option('egl-lib-suffix'),
   [files('anv_gem.c'), anv_entrypoints[0], bvh_spv],
   include_directories : [
     inc_include, inc_src, inc_intel,
--- src/mesa/glapi/es1api/meson.build.orig	2025-08-06 21:21:09 UTC
+++ src/mesa/glapi/es1api/meson.build
@@ -23,7 +23,7 @@ libglesv1_cm = shared_library(
 )
 
 libglesv1_cm = shared_library(
-  'GLESv1_CM' + get_option('gles-lib-suffix'),
+  'GLESv1_CM' + get_option('egl-lib-suffix') + get_option('gles-lib-suffix'),
   ['libgles1_public.c', es1_glapi_mapi_tmp_h],
   vs_module_defs : gles1_def,
   c_args : [
--- src/mesa/glapi/es2api/meson.build.orig	2025-08-06 21:21:09 UTC
+++ src/mesa/glapi/es2api/meson.build
@@ -23,7 +23,7 @@ libgles2 = shared_library(
 )
 
 libgles2 = shared_library(
-  'GLESv2' + get_option('gles-lib-suffix'),
+  'GLESv2' + get_option('egl-lib-suffix') + get_option('gles-lib-suffix'),
   ['libgles2_public.c', es2_glapi_mapi_tmp_h],
   vs_module_defs : gles2_def,
   c_args : [
--- src/mesa/glapi/shared-glapi/meson.build.orig	2025-08-06 21:21:09 UTC
+++ src/mesa/glapi/shared-glapi/meson.build
@@ -11,7 +11,7 @@ libglapi = static_library(
 )
 
 libglapi = static_library(
-  'glapi',
+  'glapi' + get_option('egl-lib-suffix'),
   ['core.c', shared_glapi_mapi_tmp_h],
   c_args : [
     c_msvc_compat_args,
--- src/util/meson.build.orig	2026-06-10 20:57:35 UTC
+++ src/util/meson.build
@@ -211,36 +211,36 @@ endif
   files_mesa_util += files('cache_ops_null.c')
 endif
 
-files_drirc = files('00-mesa-defaults.conf')
+files_drirc = files('00-mesa@0@-defaults.conf'.format(get_option('egl-lib-suffix')))
 
 foreach i : [
-  [with_amd_vk, '00-radv-defaults.conf'],
-  [with_intel_vk, '00-anv-defaults.conf'],
-  [with_intel_hasvk, '00-hasvk-defaults.conf'],
-  [with_nouveau_vk, '00-nvk-defaults.conf'],
-  [with_microsoft_vk, '00-dzn-defaults.conf'],
-  [with_imagination_vk, '00-pvr-defaults.conf'],
-  [with_broadcom_vk, '00-v3dv-defaults.conf'],
-  [with_freedreno_vk, '00-turnip-defaults.conf'],
-  [with_virtio_vk, '00-venus-defaults.conf'],
-  [with_gallium_r300, '00-r300-defaults.conf'],
-  [with_gallium_iris, '00-iris-defaults.conf'],
-  [with_gallium_crocus, '00-crocus-defaults.conf'],
-  [with_gallium_asahi, '00-asahi-defaults.conf'],
-  [with_gallium_v3d, '00-v3d-defaults.conf'],
-  [with_asahi_vk, '00-hk-defaults.conf'],
-  [with_panfrost_vk, '00-panvk-defaults.conf'],
-  [with_gallium_virgl, '00-virtio_gpu-defaults.conf'],
-  [with_gallium_panfrost, '00-panfrost-defaults.conf'],
-  [with_gallium_radeonsi, '00-radeonsi-defaults.conf'],
-  [with_gallium_zink, '00-zink-defaults.conf'],
-  [with_gallium_r600, '00-r600-defaults.conf'],
-  [with_gallium_freedreno, '00-msm-defaults.conf'],
-  [with_gallium_d3d12, '00-d3d12-defaults.conf'],
-  [with_gallium_svga, '00-vmwgfx-defaults.conf'],
+  [with_amd_vk, '00-radv@0@-defaults.conf'],
+  [with_intel_vk, '00-anv@0@-defaults.conf'],
+  [with_intel_hasvk, '00-hasvk@0@-defaults.conf'],
+  [with_nouveau_vk, '00-nvk@0@-defaults.conf'],
+  [with_microsoft_vk, '00-dzn@0@-defaults.conf'],
+  [with_imagination_vk, '00-pvr@0@-defaults.conf'],
+  [with_broadcom_vk, '00-v3dv@0@-defaults.conf'],
+  [with_freedreno_vk, '00-turnip@0@-defaults.conf'],
+  [with_virtio_vk, '00-venus@0@-defaults.conf'],
+  [with_gallium_r300, '00-r300@0@-defaults.conf'],
+  [with_gallium_iris, '00-iris@0@-defaults.conf'],
+  [with_gallium_crocus, '00-crocus@0@-defaults.conf'],
+  [with_gallium_asahi, '00-asahi@0@-defaults.conf'],
+  [with_gallium_v3d, '00-v3d@0@-defaults.conf'],
+  [with_asahi_vk, '00-hk@0@-defaults.conf'],
+  [with_panfrost_vk, '00-panvk@0@-defaults.conf'],
+  [with_gallium_virgl, '00-virtio_gpu@0@-defaults.conf'],
+  [with_gallium_panfrost, '00-panfrost@0@-defaults.conf'],
+  [with_gallium_radeonsi, '00-radeonsi@0@-defaults.conf'],
+  [with_gallium_zink, '00-zink@0@-defaults.conf'],
+  [with_gallium_r600, '00-r600@0@-defaults.conf'],
+  [with_gallium_freedreno, '00-msm@0@-defaults.conf'],
+  [with_gallium_d3d12, '00-d3d12@0@-defaults.conf'],
+  [with_gallium_svga, '00-vmwgfx@0@-defaults.conf'],
 ]
   if i[0]
-    files_drirc += files(i[1])
+    files_drirc += files(i[1].format(get_option('egl-lib-suffix')))
   endif
 endforeach
 
