]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
gstreamer1.0-plugins-bad: Fix GL/GLES configuration
authorCarlos Rafael Giani <dv@pseudoterminal.org>
Wed, 27 Aug 2014 14:47:03 +0000 (16:47 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 28 Aug 2014 14:11:10 +0000 (15:11 +0100)
* Replace --disable/enable-gl with the individual EGL, GLES, GL switches
  (--disable-gl turns off GL support entirely)
* Put the default opengl packageconfig into its own variable to make it
  easier for distros and BSP layers to define what to use (GL, GLES,
  or neither)
* Add libglu as a dependency for desktop GL
* Patch configure.ac to ensure libraries are only searched and linked to
  if the corresponding API isn't disabled (this prevents cases where
  libgstgl is linked to GLU even though desktop GL is dis- and GLES
  enabled)

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch [new file with mode: 0644]
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.4.0.bb

index 8a7c5c1d6223372c74a73a6bd1dcdb4e1da4b937..52ef3b8486f0c7d8b3a435c1e2a6305f241d6049 100644 (file)
@@ -8,19 +8,24 @@ S = "${WORKDIR}/gst-plugins-bad-${PV}"
 
 inherit gettext
 
+# opengl packageconfig factored out to make it easy for distros
+# and BSP layers to pick either (desktop) opengl, gles2, or no GL
+PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2', '', d)}"
 
 PACKAGECONFIG ??= " \
+    ${PACKAGECONFIG_GL} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
     orc curl uvch264 neon sndfile \
     hls sbc dash bz2 smoothstreaming \
     "
+
 # dash = Dynamic Adaptive Streaming over HTTP
 PACKAGECONFIG[assrender]       = "--enable-assrender,--disable-assrender,libass"
 PACKAGECONFIG[curl]            = "--enable-curl,--disable-curl,curl"
-PACKAGECONFIG[gl]              = "--enable-gl,--disable-gl,virtual/egl virtual/libgles2"
+PACKAGECONFIG[gles2]           = "--enable-gles2 --enable-egl,--disable-gles2 --disable-egl,virtual/libgles2 virtual/egl"
+PACKAGECONFIG[opengl]          = "--enable-opengl,--disable-opengl,virtual/libgl libglu"
 PACKAGECONFIG[faac]            = "--enable-faac,--disable-faac,faac"
 PACKAGECONFIG[faad]            = "--enable-faad,--disable-faad,faad2"
 PACKAGECONFIG[libmms]          = "--enable-libmms,--disable-libmms,libmms"
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch
new file mode 100644 (file)
index 0000000..042a32c
--- /dev/null
@@ -0,0 +1,41 @@
+From deba0da45ec821209a7ed148a4521d562e6512cd Mon Sep 17 00:00:00 2001
+From: Carlos Rafael Giani <dv@pseudoterminal.org>
+Date: Wed, 27 Aug 2014 14:47:25 +0200
+Subject: [PATCH] gl: do not check for GL/GLU/EGL/GLES2 libs if disabled in
+ configuration
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=735522]
+
+Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
+---
+ configure.ac | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1a46afb..e85d4ba 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -661,10 +661,16 @@ case $host in
+     fi
+   ;;
+   *)
+-    AG_GST_CHECK_LIBHEADER(GL, GL, glTexImage2D,, GL/gl.h)
+-    AG_GST_CHECK_LIBHEADER(GLU, GLU, gluSphere,, GL/glu.h)
+-    AG_GST_CHECK_LIBHEADER(GLES2, GLESv2, glTexImage2D,, GLES2/gl2.h)
+-    AG_GST_CHECK_LIBHEADER(EGL, EGL, eglGetError,, EGL/egl.h)
++    if test "x$NEED_GL" != "xno"; then
++      AG_GST_CHECK_LIBHEADER(GL, GL, glTexImage2D,, GL/gl.h)
++      AG_GST_CHECK_LIBHEADER(GLU, GLU, gluSphere,, GL/glu.h)
++    fi
++    if test "x$NEED_GLES2" != "xno"; then
++      AG_GST_CHECK_LIBHEADER(GLES2, GLESv2, glTexImage2D,, GLES2/gl2.h)
++    fi
++    if test "x$NEED_EGL" != "xno"; then
++      AG_GST_CHECK_LIBHEADER(EGL, EGL, eglGetError,, EGL/egl.h)
++    fi
+     old_LIBS=$LIBS
+     old_CFLAGS=$CFLAGS
+-- 
+1.8.3.2
+
index e6edb267363be8ffec9cd4dace5e0e3748f6f3d3..ff92f097f488fadbbd754ec0e4c9a54212ecb000 100644 (file)
@@ -4,6 +4,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
                     file://gst/tta/filters.h;beginline=12;endline=29;md5=8a08270656f2f8ad7bb3655b83138e5a \
                     file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 \
                     file://gst/tta/crc32.h;beginline=12;endline=29;md5=27db269c575d1e5317fffca2d33b3b50"
+
+SRC_URI += "file://0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch"
+
 SRC_URI[md5sum] = "3bc0fcfe8d16ad1295f0454c1fcb4ba3"
 SRC_URI[sha256sum] = "ff2cb754f7725b205aec66002b1406e440f3a03194b6cad2d126ef5cd00902f9"
 S = "${WORKDIR}/gst-plugins-bad-${PV}"