Skip to contentSkip to conversation

mesa: fix RPROVIDEd package names

PATCH Superseded Dmitry Baryshkov 2 participants 5 messages Jun 13, 2025 – Jun 15, 2025

v2 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/3 mesa: fix RPROVIDEd package names

The BCP for virtual runtime package names is virtual-foo. Make mesa follow the established convention and change the names of the provied packages to virtual-foo-icd.

Fixes 9d3b4c9bc403 ("mesa: sort out PROVIDES for the glvnd case")
---
 meta/recipes-graphics/mesa/mesa.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/mesa/mesa.inc +1 -1
index b222e72fdddd..b13222b66b87 100644
@@ -284,7 +284,7 @@ python __anonymous() {
     if 'glvnd' in pkgconfig:
         for p in ("libegl", "libglx"):
             fullp = mlprefix + p + "-mesa" + suffix
-            d.appendVar("RPROVIDES:" + fullp, '%s-icd' % p)
+            d.appendVar("RPROVIDES:" + fullp, ' virtual-%s-icd' % p)
     else:
         for p in (("egl", "libegl", "libegl1"),
                   ("opengl", "libgl", "libgl1"),
Signature · 1 line
2.39.5
#1 lore raw

PATCH v2 2/3 default-providers: fix GLVND providers to be selected at runtime

The virtual-{libegl,libglx}-icd names are RPROVIDES, not PROVIDES, because they are a runtime dependency of libglvnd. Make default-providers follow that and specify PREFERRED_RPROVIDER instead of PREFERRED_PROVIDER for those names.

Fixes 9d3b4c9bc403 ("mesa: sort out PROVIDES for the glvnd case")
---
 meta/conf/distro/include/default-providers.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/conf/distro/include/default-providers.inc +2 -2
index 4f094163546c..274ad0c4f630 100644
@@ -7,9 +7,7 @@ PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xorg"
 PREFERRED_PROVIDER_virtual/libsdl2 ?= "libsdl2"
 PREFERRED_PROVIDER_virtual/libsdl2-native ?= "libsdl2-native"
 PREFERRED_PROVIDER_virtual/egl ?= "mesa"
-PREFERRED_PROVIDER_virtual/libegl-icd ?= "mesa"
 PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
-PREFERRED_PROVIDER_virtual/libglx-icd ?= "mesa"
 PREFERRED_PROVIDER_virtual/libgl-native ?= "mesa-native"
 PREFERRED_PROVIDER_virtual/nativesdk-libgl ?= "nativesdk-mesa"
 PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa"
@@ -68,4 +66,6 @@ PREFERRED_RPROVIDER_initd-functions ?= "initscripts"
 PREFERRED_PROVIDER_nativesdk-mesa ?= "nativesdk-mesa"
 PREFERRED_PROVIDER_virtual/nativesdk-libsdl2 ?= "nativesdk-libsdl2"
 
+PREFERRED_RPROVIDER_virtual-libegl-icd ?= "mesa"
+PREFERRED_RPROVIDER_virtual-libglx-icd ?= "mesa"
 PREFERRED_RPROVIDER_virtual-x-terminal-emulator ?= "rxvt-unicode"
Signature · 1 line
2.39.5
#2 lore raw

PATCH v2 3/3 libglvnd: migrate from meta-oe

In reply to Dmitry Baryshkov

libglvnd is a vendor-neutral approach to handling OpenGL / OpenGL ES / EGL / GLX libraries. It has been proposed and initially implemented by NVIDIA in order to simplify coinstallation of GL drivers provided by different vendors. Major Linux distributions (Debian, Ubuntu, Fedora, etc.) have already switched to libglvnd.

Having libglvnd in OE-Core simplifies integration of this ABI into distro and BSP layers (e.g. it will help meta-tegra, which currently provides its own version of the recipe).

Import recipe for libglvnd from the meta-oe layer (changes: fix virtual package names, add add the SUMMARY data, drop git@ from SRC_URI).

---
 meta/conf/distro/include/maintainers.inc      |  1 +
 .../libglvnd/libglvnd_1.7.0.bb                | 39 +++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 meta/recipes-graphics/libglvnd/libglvnd_1.7.0.bb
meta/conf/distro/include/maintainers.inc +1 -0
index 5c315d58cf56..dbe9623de1dd 100644
@@ -353,6 +353,7 @@ RECIPE_MAINTAINER:pn-libgcrypt = "Hongxu Jia <[email protected]>"
 RECIPE_MAINTAINER:pn-libgfortran = "Khem Raj <[email protected]>"
 RECIPE_MAINTAINER:pn-libgit2 = "Unassigned <[email protected]>"
 RECIPE_MAINTAINER:pn-libgloss = "Alejandro Hernandez <[email protected]>"
+RECIPE_MAINTAINER:pn-libglvnd = "Dmitry Baryshkov <[email protected]>"
 RECIPE_MAINTAINER:pn-libglu = "Ross Burton <[email protected]>"
 RECIPE_MAINTAINER:pn-libgpg-error = "Hongxu Jia <[email protected]>"
 RECIPE_MAINTAINER:pn-libgudev = "Ross Burton <[email protected]>"
meta/recipes-graphics/libglvnd/libglvnd_1.7.0.bb new file +39 -0
new file mode 100644
index 000000000000..aefe62001148
@@ -0,0 +1,39 @@
+SUMMARY = "the GL Vendor-Neutral Dispatch library"
+DESCRIPTION = "libglvnd is a vendor-neutral dispatch layer for arbitrating \
+OpenGL API calls between multiple vendors."
+HOMEPAGE = "https://gitlab.freedesktop.org/glvnd/libglvnd"
+LICENSE = "MIT & BSD-1-Clause & BSD-3-Clause & GPL-3.0-with-autoconf-exception"
+LIC_FILES_CHKSUM = "file://README.md;beginline=323;md5=7ac5f0111f648b92fe5427efeb08e8c4"
+
+SRC_URI = "git://gitlab.freedesktop.org/glvnd/libglvnd.git;protocol=https;branch=master"
+
+SRCREV = "faa23f21fc677af5792825dc30cb1ccef4bf33a6"
+
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+inherit meson pkgconfig features_check
+
+S = "${WORKDIR}/git"
+
+PACKAGECONFIG ?= "\
+  ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+  ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'egl gles1 gles2', '', d)} \
+  ${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'glx', '', d)} \
+  "
+
+PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,libx11 libxext xorgproto"
+PACKAGECONFIG[glx] = "-Dglx=enabled,-Dglx=disabled,libx11 libxext xorgproto,,virtual-libglx-icd"
+PACKAGECONFIG[egl] = "-Degl=true,-Degl=false,,virtual-libegl-icd"
+PACKAGECONFIG[gles1] = "-Dgles1=true,-Dgles1=false,"
+PACKAGECONFIG[gles2] = "-Dgles2=true,-Dgles2=false,"
+
+BBCLASSEXTEND = "native nativesdk"
+
+PROVIDES = " \
+    ${@bb.utils.contains('PACKAGECONFIG', 'glx', 'virtual/libgl', '', d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'gles1', 'virtual/libgles1', '', d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'gles2', 'virtual/libgles2 virtual/libgles3', '', d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \
+"
+
+RPROVIDES:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'egl', 'libegl', '', d)}"
Signature · 1 line
2.39.5
#3 lore raw

Re: [OE-core] [PATCH v2 3/3] libglvnd: migrate from meta-oe

Quoted 10 lines · Dmitry Baryshkov via lists.openembedded.org

libglvnd is a vendor-neutral approach to handling OpenGL / OpenGL ES / EGL / GLX libraries. It has been proposed and initially implemented by NVIDIA in order to simplify coinstallation of GL drivers provided by different vendors. Major Linux distributions (Debian, Ubuntu, Fedora, etc.) have already switched to libglvnd.

Having libglvnd in OE-Core simplifies integration of this ABI into distro and BSP layers (e.g. it will help meta-tegra, which currently provides its own version of the recipe).

Quoted 5 lines

Import recipe for libglvnd from the meta-oe layer (changes: fix virtual package names, add add the SUMMARY data, drop git@ from SRC_URI).

---

Hi Dmitry,

Thanks for your patch.

Quoted 1 line

+PACKAGECONFIG[glx] = "-Dglx=enabled,-Dglx=disabled,libx11 libxext xorgproto,,virtual-libglx-icd"

It looks like this dependency is not present in oe-core:

WARNING: Nothing RPROVIDES 'nativesdk-virtual-libglx-icd' (but virtual:nativesdk:/srv/pokybuild/yocto-worker/a-full/build/meta/recipes-graphics/libglvnd/libglvnd_1.7.0.bb RDEPENDS on or otherwise requires it)

https://autobuilder.yoctoproject.org/valkyrie/#/builders/29/builds/1799/steps/13/logs/stdio

Signature · 3 lines
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

Re: [OE-core] [PATCH v2 3/3] libglvnd: migrate from meta-oe

Quoted 19 lines · Mathieu Dubois-Briand
Quoted 10 lines · Dmitry Baryshkov via lists.openembedded.org

libglvnd is a vendor-neutral approach to handling OpenGL / OpenGL ES / EGL / GLX libraries. It has been proposed and initially implemented by NVIDIA in order to simplify coinstallation of GL drivers provided by different vendors. Major Linux distributions (Debian, Ubuntu, Fedora, etc.) have already switched to libglvnd.

Having libglvnd in OE-Core simplifies integration of this ABI into distro and BSP layers (e.g. it will help meta-tegra, which currently provides its own version of the recipe).

Quoted 5 lines

Import recipe for libglvnd from the meta-oe layer (changes: fix virtual package names, add add the SUMMARY data, drop git@ from SRC_URI).

---

Hi Dmitry,

Quoted 7 lines

Thanks for your patch.

Quoted 1 line

+PACKAGECONFIG[glx] = "-Dglx=enabled,-Dglx=disabled,libx11 libxext xorgproto,,virtual-libglx-icd"

It looks like this dependency is not present in oe-core:

WARNING: Nothing RPROVIDES 'nativesdk-virtual-libglx-icd' (but virtual:nativesdk:/srv/pokybuild/yocto-worker/a-full/build/meta/recipes-graphics/libglvnd/libglvnd_1.7.0.bb RDEPENDS on or otherwise requires it)

I see. I had a plan to convert glvnd to DISTRO_FEATURE later, but let's include it in, so that we can block glvnd globally.

Quoted 9 lines

https://autobuilder.yoctoproject.org/valkyrie/#/builders/29/builds/1799/steps/13/logs/stdio

Signature · 3 lines
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Signature · 2 lines
With best wishes
Dmitry