Add library suffix to avoid conflict with mesa-libs + mesa-dri. Library selection is handled by libglvnd and/or libmap.conf. --- meson.build.orig 2020-05-30 21:28:01 UTC +++ meson.build @@ -79,7 +79,7 @@ with_imgui = with_intel_tools or with_vulkan_overlay_l 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 == '' @@ -427,9 +427,6 @@ if with_glvnd elif with_glx == 'disabled' and not with_egl error('glvnd requires DRI based GLX and/or EGL') endif - if get_option('egl-lib-suffix') != '' - error('''EGL lib suffix can't be used with libglvnd''') - endif endif if with_vulkan_icd_dir == '' @@ -491,7 +488,7 @@ if with_gallium_vdpau endif vdpau_drivers_path = get_option('vdpau-libs-path') if vdpau_drivers_path == '' - vdpau_drivers_path = join_paths(get_option('libdir'), 'vdpau') + vdpau_drivers_path = join_paths(get_option('libdir'), 'vdpau' + get_option('egl-lib-suffix')) endif if with_gallium_zink @@ -638,7 +635,7 @@ endif 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 _xa = get_option('gallium-xa') --- src/amd/vulkan/meson.build.orig 2022-08-08 22:10:24 UTC +++ src/amd/vulkan/meson.build @@ -97,7 +97,7 @@ libradv_files = files( 'vk_format.h', ) -files_drirc = files('00-radv-defaults.conf') +files_drirc = files('00-radv@0@-defaults.conf'.format(get_option('egl-lib-suffix'))) install_data(files_drirc, install_dir : join_paths(get_option('datadir'), 'drirc.d')) @@ -163,7 +163,7 @@ libvulkan_radeon = shared_library( endif libvulkan_radeon = shared_library( - 'vulkan_radeon', + 'vulkan_radeon' + get_option('egl-lib-suffix'), [libradv_files, radv_entrypoints, sha1_h, radix_sort_spv, bvh_spv], 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/gbm/backends/dri/gbm_dri.c.orig 2020-05-30 21:28:01 UTC +++ src/gbm/backends/dri/gbm_dri.c @@ -307,14 +307,6 @@ dri_bind_extensions(struct gbm_dri_device *dri, static const __DRIextension ** dri_open_driver(struct gbm_dri_device *dri) { - /* Temporarily work around dri driver libs that need symbols in libglapi - * but don't automatically link it in. - */ - /* XXX: Library name differs on per platforms basis. Update this as - * osx/cygwin/windows/bsd gets support for GBM.. - */ - dlopen("libglapi.so.0", RTLD_LAZY | RTLD_GLOBAL); - static const char *search_path_vars[] = { /* Read GBM_DRIVERS_PATH first for compatibility, but LIBGL_DRIVERS_PATH * is recommended over GBM_DRIVERS_PATH. --- src/gbm/meson.build.orig 2020-05-30 21:28:01 UTC +++ src/gbm/meson.build @@ -44,7 +44,7 @@ if with_platform_wayland endif libgbm = shared_library( - 'gbm', + 'gbm' + get_option('egl-lib-suffix'), files_gbm, include_directories : incs_gbm, c_args : [c_vis_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 2021-02-06 23:04:35 UTC +++ src/intel/vulkan/meson.build @@ -170,7 +170,7 @@ libanv_common = static_library( ) libvulkan_intel = shared_library( - 'vulkan_intel', + 'vulkan_intel' + get_option('egl-lib-suffix'), [files('anv_gem.c'), anv_entrypoints[0]], include_directories : [ inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel, inc_compiler, inc_vulkan_wsi, --- src/intel/vulkan_hasvk/meson.build.orig 2022-09-03 20:27:51 UTC +++ src/intel/vulkan_hasvk/meson.build @@ -181,7 +181,7 @@ libvulkan_intel_hasvk = shared_library( ) libvulkan_intel_hasvk = shared_library( - 'vulkan_intel_hasvk', + 'vulkan_intel_hasvk' + get_option('egl-lib-suffix'), [files('anv_gem.c'), anv_hasvk_entrypoints[0]], include_directories : [ inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel, inc_compiler, --- src/mapi/es1api/meson.build.orig 2020-05-30 21:28:01 UTC +++ src/mapi/es1api/meson.build @@ -33,7 +33,7 @@ if with_platform_windows endif libglesv1_cm = shared_library( - 'GLESv1_CM' + get_option('gles-lib-suffix'), + 'GLESv1_CM' + get_option('egl-lib-suffix') + get_option('gles-lib-suffix'), ['../entry.c', es1_glapi_mapi_tmp_h], c_args : [ c_msvc_compat_args, --- src/mapi/es2api/meson.build.orig 2020-05-30 21:28:01 UTC +++ src/mapi/es2api/meson.build @@ -33,7 +33,7 @@ if with_platform_windows endif libgles2 = shared_library( - 'GLESv2' + get_option('gles-lib-suffix'), + 'GLESv2' + get_option('egl-lib-suffix') + get_option('gles-lib-suffix'), ['../entry.c', es2_glapi_mapi_tmp_h], c_args : [ c_msvc_compat_args, --- src/mapi/shared-glapi/meson.build.orig 2020-05-30 21:28:01 UTC +++ src/mapi/shared-glapi/meson.build @@ -42,7 +42,7 @@ if with_platform_windows endif libglapi = shared_library( - 'glapi', + 'glapi' + get_option('egl-lib-suffix'), [files_mapi_glapi, files_mapi_util, shared_glapi_mapi_tmp_h], c_args : [ _glapi_c_args, --- src/util/meson.build.orig 2021-02-24 18:55:02 UTC +++ src/util/meson.build @@ -135,7 +135,7 @@ files_mesa_util = files( 'xxhash.h', ) -files_drirc = files('00-mesa-defaults.conf') +files_drirc = files('00-mesa@0@-defaults.conf'.format(get_option('egl-lib-suffix'))) install_data(files_drirc, install_dir : join_paths(get_option('datadir'), 'drirc.d')) @@ -158,7 +158,7 @@ files_xmlconfig = files( files_xmlconfig += custom_target( 'driconf_static.h', - input: ['driconf_static.py', '00-mesa-defaults.conf'], + input: ['driconf_static.py', '00-mesa@0@-defaults.conf'.format(get_option('egl-lib-suffix'))], output: 'driconf_static.h', command: [ prog_python, '@INPUT0@', '@INPUT1@', '@OUTPUT@'