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 (changes: fix virtual
package names, add add the SUMMARY data, drop git@ from SRC_URI, require
glvnd DISTRO_FEATURE).

(From OE-Core rev: 621e9be9663e448dde3f6b6a02b413fd65983e6c)

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Dmitry Baryshkov 2025-06-20 22:14:55 +03:00 committed by Richard Purdie
parent 9941e6f292
commit e9d69043cf
3 changed files with 41 additions and 1 deletions

View File

@ -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>"

View File

@ -56,7 +56,7 @@ but their recipes claim otherwise by setting UPSTREAM_VERSION_UNKNOWN. Please re
def is_maintainer_exception(entry):
exceptions = ["musl", "newlib", "picolibc", "linux-yocto", "linux-dummy", "mesa-gl", "libgfortran", "libx11-compose-data",
"cve-update-nvd2-native", "barebox"]
"cve-update-nvd2-native", "barebox", "libglvnd"]
for i in exceptions:
if i in entry:
return True

View File

@ -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 glvnd"
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)}"