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
new file mode 100644
@@ -0,0 +1,5 @@
+require freeglut_${PV}.bb
+
+PACKAGECONFIG:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles', '', d)}"
+
+S = "${UNPACKDIR}/freeglut-${PV}"
@@ -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"
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 <dmitry.baryshkov@oss.qualcomm.com> --- .../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