diff options
author | Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> | 2025-05-22 20:13:32 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-05-27 09:01:17 +0100 |
commit | f39d11ea7988e97fe68bfdebd7ea64e4880d0a3e (patch) | |
tree | 24e15e62297efa79c6b383dea902ca374a25e9e5 | |
parent | 3ad50d41db82ef8e1988539e231a8cbc76c5381f (diff) | |
download | poky-f39d11ea7988e97fe68bfdebd7ea64e4880d0a3e.tar.gz |
mesa: sort out PROVIDES for the glvnd case
If mesa is built with GLVND enabled, it doesn't provide GL / GL ES / EGL
libraries directly. Instead it provides two ICD libraries: libEGL_mesa.0
and libGLX_mesa.so.0. Remove virtual provides from the glvnd case
(dropping incorrect virtual/libglx provider while we are at it) and
replace those with runtime providers (to be used by libglvnd in order to
pull corresponding ICDs).
(From OE-Core rev: 9d3b4c9bc40392ba87f110ec5db0dedf381b8c4a)
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/conf/distro/include/default-providers.inc | 3 | ||||
-rw-r--r-- | meta/recipes-graphics/mesa/mesa.inc | 12 |
2 files changed, 11 insertions, 4 deletions
diff --git a/meta/conf/distro/include/default-providers.inc b/meta/conf/distro/include/default-providers.inc index ee91af8796..4f09416354 100644 --- a/meta/conf/distro/include/default-providers.inc +++ b/meta/conf/distro/include/default-providers.inc | |||
@@ -7,8 +7,9 @@ PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xorg" | |||
7 | PREFERRED_PROVIDER_virtual/libsdl2 ?= "libsdl2" | 7 | PREFERRED_PROVIDER_virtual/libsdl2 ?= "libsdl2" |
8 | PREFERRED_PROVIDER_virtual/libsdl2-native ?= "libsdl2-native" | 8 | PREFERRED_PROVIDER_virtual/libsdl2-native ?= "libsdl2-native" |
9 | PREFERRED_PROVIDER_virtual/egl ?= "mesa" | 9 | PREFERRED_PROVIDER_virtual/egl ?= "mesa" |
10 | PREFERRED_PROVIDER_virtual/libegl-icd ?= "mesa" | ||
10 | PREFERRED_PROVIDER_virtual/libgl ?= "mesa" | 11 | PREFERRED_PROVIDER_virtual/libgl ?= "mesa" |
11 | PREFERRED_PROVIDER_virtual/libglx ?= "mesa" | 12 | PREFERRED_PROVIDER_virtual/libglx-icd ?= "mesa" |
12 | PREFERRED_PROVIDER_virtual/libgl-native ?= "mesa-native" | 13 | PREFERRED_PROVIDER_virtual/libgl-native ?= "mesa-native" |
13 | PREFERRED_PROVIDER_virtual/nativesdk-libgl ?= "nativesdk-mesa" | 14 | PREFERRED_PROVIDER_virtual/nativesdk-libgl ?= "nativesdk-mesa" |
14 | PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa" | 15 | PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa" |
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index 012104cef9..f573a6244a 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc | |||
@@ -37,11 +37,13 @@ do_install:append() { | |||
37 | 37 | ||
38 | DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native python3-pyyaml-native" | 38 | DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native python3-pyyaml-native" |
39 | EXTRANATIVEPATH += "chrpath-native" | 39 | EXTRANATIVEPATH += "chrpath-native" |
40 | PROVIDES = " \ | 40 | GLPROVIDES = " \ |
41 | ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \ | 41 | ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \ |
42 | ${@bb.utils.contains('PACKAGECONFIG', 'glvnd', 'virtual/libglx', '', d)} \ | ||
43 | ${@bb.utils.contains('PACKAGECONFIG', 'gles', 'virtual/libgles1 virtual/libgles2 virtual/libgles3', '', d)} \ | 42 | ${@bb.utils.contains('PACKAGECONFIG', 'gles', 'virtual/libgles1 virtual/libgles2 virtual/libgles3', '', d)} \ |
44 | ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \ | 43 | ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \ |
44 | " | ||
45 | PROVIDES = " \ | ||
46 | ${@bb.utils.contains('PACKAGECONFIG', 'glvnd', '', d.getVar('GLPROVIDES'), d)} \ | ||
45 | ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \ | 47 | ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \ |
46 | virtual/mesa \ | 48 | virtual/mesa \ |
47 | " | 49 | " |
@@ -274,7 +276,11 @@ python __anonymous() { | |||
274 | 276 | ||
275 | d.setVar("DEBIAN_NOAUTONAME:%slibopencl-mesa%s" % (mlprefix, suffix), "1") | 277 | d.setVar("DEBIAN_NOAUTONAME:%slibopencl-mesa%s" % (mlprefix, suffix), "1") |
276 | 278 | ||
277 | if 'glvnd' not in pkgconfig: | 279 | if 'glvnd' in pkgconfig: |
280 | for p in ("libegl", "libglx"): | ||
281 | fullp = mlprefix + p + "-mesa" + suffix | ||
282 | d.appendVar("RPROVIDES:" + fullp, '%s-icd' % p) | ||
283 | else: | ||
278 | for p in (("egl", "libegl", "libegl1"), | 284 | for p in (("egl", "libegl", "libegl1"), |
279 | ("opengl", "libgl", "libgl1"), | 285 | ("opengl", "libgl", "libgl1"), |
280 | ("gles", "libgles1", "libglesv1-cm1"), | 286 | ("gles", "libgles1", "libglesv1-cm1"), |