summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/mesa.inc
diff options
context:
space:
mode:
authorDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>2025-05-22 20:13:32 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-05-27 09:01:17 +0100
commitf39d11ea7988e97fe68bfdebd7ea64e4880d0a3e (patch)
tree24e15e62297efa79c6b383dea902ca374a25e9e5 /meta/recipes-graphics/mesa/mesa.inc
parent3ad50d41db82ef8e1988539e231a8cbc76c5381f (diff)
downloadpoky-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>
Diffstat (limited to 'meta/recipes-graphics/mesa/mesa.inc')
-rw-r--r--meta/recipes-graphics/mesa/mesa.inc12
1 files changed, 9 insertions, 3 deletions
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
38DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native python3-pyyaml-native" 38DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native python3-pyyaml-native"
39EXTRANATIVEPATH += "chrpath-native" 39EXTRANATIVEPATH += "chrpath-native"
40PROVIDES = " \ 40GLPROVIDES = " \
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"
45PROVIDES = " \
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"),