From f7735c92047224a327fcca6bb74881038945bfec Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Mon, 8 Jun 2026 14:12:01 +0300 Subject: [PATCH] freeglut: split normal and gles packages The freeglut and freeglut-gles libraries are not really compatible, they have different SOnames, different ABI, etc. Some tools (e.g. OpenCL CTS) expect the classical FreeGLUT rather than a GL ES version. Restore original freeglut recipe and add freeglut-gles for the software that needs it. Fixes: 0b0cbd4c3ce1 ("freeglut: version 3.4.0 -> 3.8.0") Signed-off-by: Dmitry Baryshkov Signed-off-by: Khem Raj --- .../0001-Add-support-for-legacy-OpenGL.patch | 0 meta-oe/recipes-graphics/freeglut/freeglut-gles_3.8.0.bb | 5 +++++ meta-oe/recipes-graphics/freeglut/freeglut_3.8.0.bb | 5 ++--- 3 files changed, 7 insertions(+), 3 deletions(-) rename meta-oe/recipes-graphics/freeglut/{freeglut => files}/0001-Add-support-for-legacy-OpenGL.patch (100%) create mode 100644 meta-oe/recipes-graphics/freeglut/freeglut-gles_3.8.0.bb diff --git a/meta-oe/recipes-graphics/freeglut/freeglut/0001-Add-support-for-legacy-OpenGL.patch b/meta-oe/recipes-graphics/freeglut/files/0001-Add-support-for-legacy-OpenGL.patch similarity index 100% rename from meta-oe/recipes-graphics/freeglut/freeglut/0001-Add-support-for-legacy-OpenGL.patch rename to meta-oe/recipes-graphics/freeglut/files/0001-Add-support-for-legacy-OpenGL.patch diff --git a/meta-oe/recipes-graphics/freeglut/freeglut-gles_3.8.0.bb b/meta-oe/recipes-graphics/freeglut/freeglut-gles_3.8.0.bb new file mode 100644 index 0000000000..3101bfe63b --- /dev/null +++ b/meta-oe/recipes-graphics/freeglut/freeglut-gles_3.8.0.bb @@ -0,0 +1,5 @@ +require freeglut_${PV}.bb + +PACKAGECONFIG:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles', '', d)}" + +S = "${UNPACKDIR}/freeglut-${PV}" diff --git a/meta-oe/recipes-graphics/freeglut/freeglut_3.8.0.bb b/meta-oe/recipes-graphics/freeglut/freeglut_3.8.0.bb index 5c6ab1a1d7..a00519f0d7 100644 --- a/meta-oe/recipes-graphics/freeglut/freeglut_3.8.0.bb +++ b/meta-oe/recipes-graphics/freeglut/freeglut_3.8.0.bb @@ -5,7 +5,7 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=89c0b58a3e01ce3d8254c9f59e78adfb" SRC_URI = "\ - https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BPN}-${PV}.tar.gz \ + https://github.com/freeglut/freeglut/releases/download/v${PV}/freeglut-${PV}.tar.gz \ file://0001-Add-support-for-legacy-OpenGL.patch \ " SRC_URI[sha256sum] = "674dcaff25010e09e450aec458b8870d9e98c46f99538db457ab659b321d9989" @@ -15,8 +15,7 @@ inherit cmake features_check pkgconfig # depends on virtual/libgl and libxi REQUIRED_DISTRO_FEATURES = "opengl x11" -PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11 glvnd', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles', '', d)}" +PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11 glvnd', d)}" PACKAGECONFIG[glvnd] = "-DOpenGL_GL_PREFERENCE=GLVND,-DOpenGL_GL_PREFERENCE=LEGACY, libglvnd" PACKAGECONFIG[gles] = "-DFREEGLUT_GLES=ON,-DFREEGLUT_GLES=OFF," PACKAGECONFIG[wayland] = "-DFREEGLUT_WAYLAND=ON,-DFREEGLUT_WAYLAND=OFF,libxkbcommon"