Message ID | 20250609122826.2775354-1-dmitry.baryshkov@oss.qualcomm.com |
---|---|
State | New |
Headers | show |
Series | libglvnd: migrate from meta-oe | expand |
> -----Original Message----- > From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Dmitry Baryshkov via lists.openembedded.org > Sent: den 9 juni 2025 14:28 > To: openembedded-core@lists.openembedded.org > Subject: [OE-core] [PATCH] libglvnd: migrate from meta-oe > > 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 (the only change was > to add the SUMMARY data). > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> > --- > meta/conf/distro/include/maintainers.inc | 1 + > .../libglvnd/libglvnd_1.7.0.bb | 40 +++++++++++++++++++ > 2 files changed, 41 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 6c19e306cfae..d608a9b21271 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..962719158f5a > --- /dev/null > +++ b/meta/recipes-graphics/libglvnd/libglvnd_1.7.0.bb > @@ -0,0 +1,40 @@ > +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://git@gitlab.freedesktop.org/glvnd/libglvnd.git;protocol=https;branch=master" > + > +# v1.5.0 tag Remove the comment since it is (hopefully) incorrect. Instead add a tag=v${PV} to the SRC_URI. > +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,,libglx-icd" > +PACKAGECONFIG[egl] = "-Degl=true,-Degl=false,,libegl-icd" Wouldn't it make more sense for these to depend on virtual-libglx-icd and virtual-libegl-icd? (See my mail from earlier today in response to "[PATCH v3 09/11] mesa: sort out PROVIDES for the glvnd case".) > +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 //Peter
On 9 Jun 2025, at 13:39, Peter Kjellerstedt via lists.openembedded.org <peter.kjellerstedt=axis.com@lists.openembedded.org> wrote: > > Remove the comment since it is (hopefully) incorrect. Instead add a > tag=v${PV} to the SRC_URI. As Peter Marko pointed out, tag= should be added on upgrades as existing shallow clones won’t have the tags. Ross
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index 6c19e306cfae..d608a9b21271 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..962719158f5a --- /dev/null +++ b/meta/recipes-graphics/libglvnd/libglvnd_1.7.0.bb @@ -0,0 +1,40 @@ +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://git@gitlab.freedesktop.org/glvnd/libglvnd.git;protocol=https;branch=master" + +# v1.5.0 tag +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,,libglx-icd" +PACKAGECONFIG[egl] = "-Degl=true,-Degl=false,,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)}"
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 (the only change was to add the SUMMARY data). Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> --- meta/conf/distro/include/maintainers.inc | 1 + .../libglvnd/libglvnd_1.7.0.bb | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 meta/recipes-graphics/libglvnd/libglvnd_1.7.0.bb