meson: revert glvnd workaround

This effectively reverts MR !2112.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
This commit is contained in:
Eric Engestrom
2019-09-25 17:38:49 +01:00
parent 0f201e9dbc
commit 6e21dcc5a3
4 changed files with 5 additions and 28 deletions

View File

@@ -22,7 +22,7 @@ inc_include = include_directories('.')
inc_d3d9 = include_directories('D3D9') inc_d3d9 = include_directories('D3D9')
inc_haikugl = include_directories('HaikuGL') inc_haikugl = include_directories('HaikuGL')
if not glvnd_has_headers_and_pc_files if not with_glvnd
if with_gles1 or with_gles2 or with_opengl or with_egl if with_gles1 or with_gles2 or with_opengl or with_egl
install_headers('KHR/khrplatform.h', subdir : 'KHR') install_headers('KHR/khrplatform.h', subdir : 'KHR')
endif endif

View File

@@ -1447,12 +1447,8 @@ else
endif endif
dep_glvnd = null_dep dep_glvnd = null_dep
glvnd_has_headers_and_pc_files = false
if with_glvnd if with_glvnd
dep_glvnd = dependency('libglvnd', version : '>= 1.2.0') dep_glvnd = dependency('libglvnd', version : '>= 1.2.0')
# GLVND before 1.2 was missing its pkg-config and header files, forcing every
# vendor to provide them and the distro maintainers to resolve the conflict.
glvnd_has_headers_and_pc_files = dep_glvnd.version().version_compare('>= 1.2.0')
pre_args += '-DUSE_LIBGLVND=1' pre_args += '-DUSE_LIBGLVND=1'
endif endif

View File

@@ -173,21 +173,12 @@ libegl = shared_library(
version : egl_lib_version, version : egl_lib_version,
) )
# If using glvnd the pkg-config header should not point to EGL_mesa, it should if not with_glvnd
# point to EGL. glvnd is only available on unix like platforms so adding -l
# should be safe here
if not with_glvnd or not glvnd_has_headers_and_pc_files
if not glvnd_has_headers_and_pc_files
_egl = '-L${libdir} -lEGL'
else
_egl = libegl
endif
pkg.generate( pkg.generate(
name : 'egl', name : 'egl',
description : 'Mesa EGL Library', description : 'Mesa EGL Library',
version : meson.project_version(), version : meson.project_version(),
libraries : _egl, libraries : libegl,
libraries_private: gl_priv_libs, libraries_private: gl_priv_libs,
requires_private : gl_priv_reqs, requires_private : gl_priv_reqs,
extra_cflags : gl_pkgconfig_c_flags, extra_cflags : gl_pkgconfig_c_flags,

View File

@@ -112,22 +112,12 @@ endif
# This must be after at least mesa, glx, and gallium, since libgl will be # This must be after at least mesa, glx, and gallium, since libgl will be
# defined in one of those subdirs depending on the glx provider. # defined in one of those subdirs depending on the glx provider.
if with_glx != 'disabled' and (not with_glvnd or not glvnd_has_headers_and_pc_files) if with_glx != 'disabled' and not with_glvnd
# If using glvnd the pkg-config header should not point to GL_mesa, it should
# point to GL. glvnd is only available on unix like platforms so adding -l
# should be safe here
# TODO: in the glvnd case glvnd itself should really be providing this.
if not glvnd_has_headers_and_pc_files
_gl = '-L${libdir} -lGL'
else
_gl = libgl
endif
pkg.generate( pkg.generate(
name : 'gl', name : 'gl',
description : 'Mesa OpenGL Library', description : 'Mesa OpenGL Library',
version : meson.project_version(), version : meson.project_version(),
libraries : _gl, libraries : libgl,
libraries_private : gl_priv_libs, libraries_private : gl_priv_libs,
requires_private : gl_priv_reqs, requires_private : gl_priv_reqs,
variables : ['glx_tls=yes'], variables : ['glx_tls=yes'],