[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][xorg-team/lib/mesa][debian-experimental] really add the patch



Title: GitLab

Timo Aaltonen pushed to branch debian-experimental at X Strike Force / lib / mesa

Commits:

1 changed file:

Changes:

  • debian/patches/meson-fix-logic-for-generating-.pc-files.patch
    1
    +From fafd20f67dec9f5891838435ecde1dedb77ab742 Mon Sep 17 00:00:00 2001
    
    2
    +From: Dylan Baker <dylan@pnwbakers.com>
    
    3
    +Date: Wed, 25 Sep 2019 23:25:27 +0000
    
    4
    +Subject: [PATCH] meson: fix logic for generating .pc files with old glvnd
    
    5
    +
    
    6
    +We want to generate PC files for non-glvnd builds and for builds with
    
    7
    +old glvnd, but the current logic doesn't do that, it builds them
    
    8
    +unconditionally, and for GLES it builds the shared libraries, which is
    
    9
    +also not what we want. This does not generate .pc files for gles1 or
    
    10
    +gles2. Which it we weren't doing before either, making this not a
    
    11
    +regression but a return to status-quo.o
    
    12
    +
    
    13
    +Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1838
    
    14
    +Fixes: 93df862b6affb6b8507e40601212a58012bfa873
    
    15
    +       ("meson: re-add incorrect pkg-config files with GLVND for backward compatibility")
    
    16
    +Reviewed-by: Matt Turner <mattst88@gmail.com>
    
    17
    +---
    
    18
    + meson.build          |  9 +++++----
    
    19
    + src/egl/meson.build  | 30 ++++++++++++++++--------------
    
    20
    + src/mapi/meson.build |  2 +-
    
    21
    + src/meson.build      |  4 ++--
    
    22
    + 4 files changed, 24 insertions(+), 21 deletions(-)
    
    23
    +
    
    24
    +diff --git a/meson.build b/meson.build
    
    25
    +index 0e46fde5edc..da4a07538df 100644
    
    26
    +--- a/meson.build
    
    27
    ++++ b/meson.build
    
    28
    +@@ -100,7 +100,7 @@ endif
    
    29
    + 
    
    30
    + # shared-glapi is required if at least two OpenGL APIs are being built
    
    31
    + if not with_shared_glapi
    
    32
    +-  if ((with_gles1 == 'true' and with_gles2 == 'true') or 
    
    33
    ++  if ((with_gles1 == 'true' and with_gles2 == 'true') or
    
    34
    +       (with_gles1 == 'true' and with_opengl) or
    
    35
    +       (with_gles2 == 'true' and with_opengl))
    
    36
    +     error('shared-glapi required for building two or more of OpenGL, OpenGL ES 1.x, OpenGL ES 2.x')
    
    37
    +@@ -397,7 +397,7 @@ endif
    
    38
    + if with_glx != 'disabled'
    
    39
    +   if not (with_platform_x11 and with_any_opengl)
    
    40
    +     error('Cannot build GLX support without X11 platform support and at least one OpenGL API')
    
    41
    +-  elif with_glx == 'gallium-xlib' 
    
    42
    ++  elif with_glx == 'gallium-xlib'
    
    43
    +     if not with_gallium
    
    44
    +       error('Gallium-xlib based GLX requires at least one gallium driver')
    
    45
    +     elif not with_gallium_softpipe
    
    46
    +@@ -405,7 +405,7 @@ if with_glx != 'disabled'
    
    47
    +     elif with_dri
    
    48
    +       error('gallium-xlib conflicts with any dri driver')
    
    49
    +     endif
    
    50
    +-  elif with_glx == 'xlib' 
    
    51
    ++  elif with_glx == 'xlib'
    
    52
    +     if with_dri
    
    53
    +       error('xlib conflicts with any dri driver')
    
    54
    +     endif
    
    55
    +@@ -1326,6 +1326,7 @@ else
    
    56
    + endif
    
    57
    + 
    
    58
    + dep_glvnd = null_dep
    
    59
    ++glvnd_missing_pc_files = false
    
    60
    + if with_glvnd
    
    61
    +   dep_glvnd = dependency('libglvnd', version : '>= 0.2.0')
    
    62
    +   # GLVND until commit 0dfaea2bcb7cdcc785f9 ("Add pkg-config files for EGL, GL,
    
    63
    +@@ -1462,7 +1463,7 @@ if with_platform_x11
    
    64
    +   if with_glx == 'dri' or with_glx == 'gallium-xlib'
    
    65
    +     dep_glproto = dependency('glproto', version : '>= 1.4.14')
    
    66
    +   endif
    
    67
    +-  if with_glx == 'dri' 
    
    68
    ++  if with_glx == 'dri'
    
    69
    +     if with_dri_platform == 'drm'
    
    70
    +       dep_dri2proto = dependency('dri2proto', version : '>= 2.8')
    
    71
    +       dep_xxf86vm = dependency('xxf86vm')
    
    72
    +diff --git a/src/egl/meson.build b/src/egl/meson.build
    
    73
    +index 7038a68e955..7d738e2ebd1 100644
    
    74
    +--- a/src/egl/meson.build
    
    75
    ++++ b/src/egl/meson.build
    
    76
    +@@ -176,21 +176,23 @@ libegl = shared_library(
    
    77
    + # If using glvnd the pkg-config header should not point to EGL_mesa, it should
    
    78
    + # point to EGL. glvnd is only available on unix like platforms so adding -l
    
    79
    + # should be safe here
    
    80
    +-if with_glvnd and glvnd_missing_pc_files
    
    81
    +-  _egl = '-L${libdir} -lEGL'
    
    82
    +-else
    
    83
    +-  _egl = libegl
    
    84
    +-endif
    
    85
    ++if not with_glvnd or glvnd_missing_pc_files
    
    86
    ++  if glvnd_missing_pc_files
    
    87
    ++    _egl = '-L${libdir} -lEGL'
    
    88
    ++  else
    
    89
    ++    _egl = libegl
    
    90
    ++  endif
    
    91
    + 
    
    92
    +-pkg.generate(
    
    93
    +-  name : 'egl',
    
    94
    +-  description : 'Mesa EGL Library',
    
    95
    +-  version : meson.project_version(),
    
    96
    +-  libraries : _egl,
    
    97
    +-  libraries_private: gl_priv_libs,
    
    98
    +-  requires_private : gl_priv_reqs,
    
    99
    +-  extra_cflags : gl_pkgconfig_c_flags,
    
    100
    +-)
    
    101
    ++  pkg.generate(
    
    102
    ++    name : 'egl',
    
    103
    ++    description : 'Mesa EGL Library',
    
    104
    ++    version : meson.project_version(),
    
    105
    ++    libraries : _egl,
    
    106
    ++    libraries_private: gl_priv_libs,
    
    107
    ++    requires_private : gl_priv_reqs,
    
    108
    ++    extra_cflags : gl_pkgconfig_c_flags,
    
    109
    ++  )
    
    110
    ++endif
    
    111
    + 
    
    112
    + if with_tests and prog_nm.found()
    
    113
    +   if with_glvnd
    
    114
    +diff --git a/src/mapi/meson.build b/src/mapi/meson.build
    
    115
    +index 39c1dba7ce0..2c79a04f1df 100644
    
    116
    +--- a/src/mapi/meson.build
    
    117
    ++++ b/src/mapi/meson.build
    
    118
    +@@ -35,7 +35,7 @@ if with_shared_glapi
    
    119
    + else
    
    120
    +   libglapi = []
    
    121
    + endif
    
    122
    +-if not with_glvnd or glvnd_missing_pc_files
    
    123
    ++if not with_glvnd
    
    124
    +   if with_gles1
    
    125
    +     subdir('es1api')
    
    126
    +   endif
    
    127
    +diff --git a/src/meson.build b/src/meson.build
    
    128
    +index ddbcd7f3ae4..d01f84c0d46 100644
    
    129
    +--- a/src/meson.build
    
    130
    ++++ b/src/meson.build
    
    131
    +@@ -111,12 +111,12 @@ endif
    
    132
    + 
    
    133
    + # This must be after at least mesa, glx, and gallium, since libgl will be
    
    134
    + # defined in one of those subdirs depending on the glx provider.
    
    135
    +-if with_glx != 'disabled'
    
    136
    ++if with_glx != 'disabled' and (not with_glvnd or glvnd_missing_pc_files)
    
    137
    +   # If using glvnd the pkg-config header should not point to GL_mesa, it should
    
    138
    +   # point to GL. glvnd is only available on unix like platforms so adding -l
    
    139
    +   # should be safe here
    
    140
    +   # TODO: in the glvnd case glvnd itself should really be providing this.
    
    141
    +-  if with_glvnd and glvnd_missing_pc_files
    
    142
    ++  if glvnd_missing_pc_files
    
    143
    +     _gl = '-L${libdir} -lGL'
    
    144
    +   else
    
    145
    +     _gl = libgl
    
    146
    +-- 
    
    147
    +2.20.1
    
    148
    +


  • Reply to: