]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
mesa: don't add extra tags to the libopencl-mesa package
authorDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Thu, 22 May 2025 17:13:29 +0000 (20:13 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 27 May 2025 07:50:19 +0000 (08:50 +0100)
The libopencl-mesa package provides OpenCL ICDs (Installable Client
Drivers). As such, there is no conflict between several packages
providing ICDs for different vendors. Split the loop that modifies
package metadata and stop adding extra RPROVIDES / RCONFLICTS /
RREPLACES tags to the libopencl-mesa package.

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>
meta/recipes-graphics/mesa/mesa.inc

index f7058107cd17212ef634ce2a761d6bd2fdcc7113..a0ab5b21d5d480f19b8d8c52379248e49b04de5e 100644 (file)
@@ -263,28 +263,31 @@ do_install:append () {
 # RPROVIDEs/RCONFLICTs on the generic libgl name.
 python __anonymous() {
     pkgconfig = (d.getVar('PACKAGECONFIG') or "").split()
+    mlprefix = d.getVar("MLPREFIX")
     suffix = ""
     if "-native" in d.getVar("PN"):
         suffix = "-native"
+
+    for p in ("libegl", "libgl", "libglx", "libgles1", "libgles2", "libgles3", "libopencl"):
+        fullp = mlprefix + p + "-mesa" + suffix
+        d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}mesa-megadriver" + suffix)
+
+    d.setVar("DEBIAN_NOAUTONAME:%slibopencl-mesa%s" % (mlprefix, suffix), "1")
+
     for p in (("egl", "libegl", "libegl1"),
               ("opengl", "libgl", "libgl1"),
               ("glvnd", "libglx",),
               ("gles", "libgles1", "libglesv1-cm1"),
-              ("gles", "libgles2", "libglesv2-2", "libgles3"),
-              ("opencl", "libopencl",)):
+              ("gles", "libgles2", "libglesv2-2", "libgles3")):
         if not p[0] in pkgconfig:
             continue
-        mlprefix = d.getVar("MLPREFIX")
         fullp = mlprefix + p[1] + "-mesa" + suffix
-        mlprefix = d.getVar("MLPREFIX")
         pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:])
         d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
         d.appendVar("RREPLACES:" + fullp, pkgs)
         d.appendVar("RPROVIDES:" + fullp, pkgs)
         d.appendVar("RCONFLICTS:" + fullp, pkgs)
 
-        d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}mesa-megadriver" + suffix)
-
         # For -dev, the first element is both the Debian and original name
         fullp = mlprefix + p[1] + "-mesa-dev" + suffix
         pkgs = " " + mlprefix + p[1] + "-dev" + suffix