aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-01-10 02:24:00 -0800
committerArmin Kuster <akuster808@gmail.com>2023-09-23 13:38:46 -0400
commitdd5003603b47bff937123c85f27e03e0eb34a15c (patch)
treea4cf419333a789cdca4c072cef32013c9141d3af
parent919a2074586ff957362ae2dbd3438fa648bb9bee (diff)
downloadmeta-openembedded-contrib-dd5003603b47bff937123c85f27e03e0eb34a15c.tar.gz
freeglut: Add packageconfigs for x11/wayland/gles
helps it compiling on on different openGL implementations which may not implement fulll openGL specs Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit a9212722c1b1a2ab29215651063ca94fb114c39b) Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/recipes-graphics/freeglut/freeglut_3.2.1.bb18
1 files changed, 14 insertions, 4 deletions
diff --git a/meta-oe/recipes-graphics/freeglut/freeglut_3.2.1.bb b/meta-oe/recipes-graphics/freeglut/freeglut_3.2.1.bb
index 6ef9f74c70..2f4f16589d 100644
--- a/meta-oe/recipes-graphics/freeglut/freeglut_3.2.1.bb
+++ b/meta-oe/recipes-graphics/freeglut/freeglut_3.2.1.bb
@@ -7,14 +7,24 @@ SRC_URI = "https://sourceforge.net/projects/${BPN}/files/${BPN}/${PV}/${BPN}-${P
SRC_URI[md5sum] = "cd5c670c1086358598a6d4a9d166949d"
SRC_URI[sha256sum] = "d4000e02102acaf259998c870e25214739d1f16f67f99cb35e4f46841399da68"
-inherit cmake features_check
+inherit cmake features_check pkgconfig
-# depends on virtual/libx11, virtual/libgl
-REQUIRED_DISTRO_FEATURES = "x11 opengl"
+# depends on virtual/libgl
+REQUIRED_DISTRO_FEATURES = "opengl"
+PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}"
+PACKAGECONFIG[gles] = "-DFREEGLUT_GLES=ON,-DFREEGLUT_GLES=OFF,"
+PACKAGECONFIG[wayland] = "-DFREEGLUT_WAYLAND=ON,-DFREEGLUT_WAYLAND=OFF,libxkbcommon"
+PACKAGECONFIG[demos] = "-DFREEGLUT_BUILD_DEMOS=ON,-DFREEGLUT_BUILD_DEMOS=OFF,"
+PACKAGECONFIG[x11] = ",,virtual/libx11 libice libxmu libglu libxrandr libxext"
# Do not use -fno-common, check back when upgrading to new version it might not be needed
CFLAGS += "-fcommon"
PROVIDES += "mesa-glut"
-DEPENDS = "virtual/libx11 libxmu libxi virtual/libgl libglu libxrandr"
+DEPENDS = "virtual/libgl libxi"
+
+do_install:append() {
+ # Remove buildpaths
+ sed -i "s#${RECIPE_SYSROOT}##g" ${D}${libdir}/cmake/FreeGLUT/FreeGLUTTargets.cmake
+}