[OE-core] [PATCH v2] gst-plugins-gl: make it work for both openGL and openGL ESv2

Koen Kooi koen at dominion.thruhere.net
Thu Apr 25 10:20:54 UTC 2013

Those are mutually exclusive, but PACKAGECONFIG doesn't seem to handle that yet, so use this slightly ugly construct.

Tested on FRI2/angstrom and Minnowboard/angstrom. 'glimagesink' and 'glupload' work, but anything else (filters, gldownload) will throw an FBO error. This is most likely a problem with the EMGD drivers.

Signed-off-by: Koen Kooi <koen at dominion.thruhere.net>
 meta/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bb | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bb b/meta/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bb
index a6c74fb..7925448 100644
--- a/meta/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bb
@@ -8,15 +8,13 @@ SRC_URI[sha256sum] = "48340b6a4b8abce16344a7bc33e74a94fdcce4f57ef6342cdf2f941c42
 SRC_URI += " file://0001-conditional-gl-framebuffer-undefined-use.patch"
-DEPENDS += "gst-plugins-base virtual/libgles2 virtual/egl jpeg"
+DEPENDS += "gst-plugins-base jpeg libpng"
 inherit gettext gconf
-# This package doesn't have a configure switch for EGL or GL, so forcibly tell
-# configure that it can't find gl.h so it always uses EGL.  If/when we have some
-# way for machines to specify their preferred GL flavour this can be
-# automatically adapted.
-EXTRA_OECONF += "ac_cv_header_GL_gl_h=no"
+PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'opengl', 'opengl', 'openglesv2', d)}"
+PACKAGECONFIG[opengl] = ",ac_cv_header_GL_gl_h=no,virtual/libgl glew"
+PACKAGECONFIG[openglesv2] = "ac_cv_header_GL_gl_h=no,,virtual/libgles2 virtual/egl"
 ALLOW_EMPTY_${PN} = "1"
 ALLOW_EMPTY_${PN}-apps = "1"

More information about the Openembedded-core mailing list