All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/3] mesa: fix RPROVIDEd package names
@ 2025-06-13 12:03 Dmitry Baryshkov
  2025-06-13 12:03 ` [PATCH v2 2/3] default-providers: fix GLVND providers to be selected at runtime Dmitry Baryshkov
  2025-06-13 12:03 ` [PATCH v2 3/3] libglvnd: migrate from meta-oe Dmitry Baryshkov
  0 siblings, 2 replies; 5+ messages in thread
From: Dmitry Baryshkov @ 2025-06-13 12:03 UTC (permalink / raw)
  To: openembedded-core

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")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
 meta/recipes-graphics/mesa/mesa.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index b222e72fdddd..b13222b66b87 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -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"),
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 2/3] default-providers: fix GLVND providers to be selected at runtime
  2025-06-13 12:03 [PATCH v2 1/3] mesa: fix RPROVIDEd package names Dmitry Baryshkov
@ 2025-06-13 12:03 ` Dmitry Baryshkov
  2025-06-13 12:03 ` [PATCH v2 3/3] libglvnd: migrate from meta-oe Dmitry Baryshkov
  1 sibling, 0 replies; 5+ messages in thread
From: Dmitry Baryshkov @ 2025-06-13 12:03 UTC (permalink / raw)
  To: openembedded-core

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")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
 meta/conf/distro/include/default-providers.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/conf/distro/include/default-providers.inc b/meta/conf/distro/include/default-providers.inc
index 4f094163546c..274ad0c4f630 100644
--- a/meta/conf/distro/include/default-providers.inc
+++ b/meta/conf/distro/include/default-providers.inc
@@ -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"
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 3/3] libglvnd: migrate from meta-oe
  2025-06-13 12:03 [PATCH v2 1/3] mesa: fix RPROVIDEd package names Dmitry Baryshkov
  2025-06-13 12:03 ` [PATCH v2 2/3] default-providers: fix GLVND providers to be selected at runtime Dmitry Baryshkov
@ 2025-06-13 12:03 ` Dmitry Baryshkov
  2025-06-14 13:11   ` [OE-core] " Mathieu Dubois-Briand
  1 sibling, 1 reply; 5+ messages in thread
From: Dmitry Baryshkov @ 2025-06-13 12:03 UTC (permalink / raw)
  To: openembedded-core

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).

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
 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

diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index 5c315d58cf56..dbe9623de1dd 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -353,6 +353,7 @@ RECIPE_MAINTAINER:pn-libgcrypt = "Hongxu Jia <hongxu.jia@windriver.com>"
 RECIPE_MAINTAINER:pn-libgfortran = "Khem Raj <raj.khem@gmail.com>"
 RECIPE_MAINTAINER:pn-libgit2 = "Unassigned <unassigned@yoctoproject.org>"
 RECIPE_MAINTAINER:pn-libgloss = "Alejandro Hernandez <alejandro@enedino.org>"
+RECIPE_MAINTAINER:pn-libglvnd = "Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>"
 RECIPE_MAINTAINER:pn-libglu = "Ross Burton <ross.burton@arm.com>"
 RECIPE_MAINTAINER:pn-libgpg-error = "Hongxu Jia <hongxu.jia@windriver.com>"
 RECIPE_MAINTAINER:pn-libgudev = "Ross Burton <ross.burton@arm.com>"
diff --git a/meta/recipes-graphics/libglvnd/libglvnd_1.7.0.bb b/meta/recipes-graphics/libglvnd/libglvnd_1.7.0.bb
new file mode 100644
index 000000000000..aefe62001148
--- /dev/null
+++ b/meta/recipes-graphics/libglvnd/libglvnd_1.7.0.bb
@@ -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)}"
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [OE-core] [PATCH v2 3/3] libglvnd: migrate from meta-oe
  2025-06-13 12:03 ` [PATCH v2 3/3] libglvnd: migrate from meta-oe Dmitry Baryshkov
@ 2025-06-14 13:11   ` Mathieu Dubois-Briand
  2025-06-15 14:43     ` Dmitry Baryshkov
  0 siblings, 1 reply; 5+ messages in thread
From: Mathieu Dubois-Briand @ 2025-06-14 13:11 UTC (permalink / raw)
  To: dmitry.baryshkov, openembedded-core

On Fri Jun 13, 2025 at 2:03 PM CEST, Dmitry Baryshkov via lists.openembedded.org wrote:
> 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).
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---

Hi Dmitry,

Thanks for your patch.

> +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

-- 
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OE-core] [PATCH v2 3/3] libglvnd: migrate from meta-oe
  2025-06-14 13:11   ` [OE-core] " Mathieu Dubois-Briand
@ 2025-06-15 14:43     ` Dmitry Baryshkov
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Baryshkov @ 2025-06-15 14:43 UTC (permalink / raw)
  To: Mathieu Dubois-Briand; +Cc: openembedded-core

On Sat, Jun 14, 2025 at 03:11:03PM +0200, Mathieu Dubois-Briand wrote:
> On Fri Jun 13, 2025 at 2:03 PM CEST, Dmitry Baryshkov via lists.openembedded.org wrote:
> > 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).
> >
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> > ---
> 
> Hi Dmitry,
> 
> Thanks for your patch.
> 
> > +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.

> 
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/29/builds/1799/steps/13/logs/stdio
> 
> -- 
> Mathieu Dubois-Briand, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
> 
> 

-- 
With best wishes
Dmitry


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-06-15 14:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-13 12:03 [PATCH v2 1/3] mesa: fix RPROVIDEd package names Dmitry Baryshkov
2025-06-13 12:03 ` [PATCH v2 2/3] default-providers: fix GLVND providers to be selected at runtime Dmitry Baryshkov
2025-06-13 12:03 ` [PATCH v2 3/3] libglvnd: migrate from meta-oe Dmitry Baryshkov
2025-06-14 13:11   ` [OE-core] " Mathieu Dubois-Briand
2025-06-15 14:43     ` Dmitry Baryshkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.