Patchwork [2/2] gstreamer1.0-plugins-bad: set correct EGL defines for Vivante GPUs

login
register
mail settings
Submitter Carlos Rafael Giani
Date June 25, 2014, 9:33 p.m.
Message ID <1403731990-31558-2-git-send-email-dv@pseudoterminal.org>
Download mbox | patch
Permalink /patch/74399/
State Changes Requested
Delegated to: Otavio Salvador
Headers show

Comments

Carlos Rafael Giani - June 25, 2014, 9:33 p.m.
Without these, the package will not be built with the correct EGL
types and definitions

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
---
 .../gstreamer/gstreamer1.0-plugins-bad_%.bbappend    | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
Otavio Salvador - June 26, 2014, 1:47 p.m.
On Wed, Jun 25, 2014 at 6:33 PM, Carlos Rafael Giani
<dv@pseudoterminal.org> wrote:
> Without these, the package will not be built with the correct EGL
> types and definitions
>
> Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>

This can be set using same code of cairo[1] bbappend.

1. http://git.yoctoproject.org/cgit/cgit.cgi/meta-fsl-arm/tree/recipes-graphics/cairo/cairo_%25.bbappend

The package arch can be set only for i.MX6 as the others can not apply
the changes.

Patch

diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
new file mode 100644
index 0000000..da59b09
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
@@ -0,0 +1,20 @@ 
+# Vivante EGL headers require the correct preprocessor
+# defines to be set for each platform
+python() {
+    extra_cflags = ' -DLINUX'
+    x11_present = bb.utils.contains('DISTRO_FEATURES', 'x11', True, False, d)
+    wayland_present = bb.utils.contains('DISTRO_FEATURES', 'wayland', True, False, d)
+
+    if x11_present:
+        extra_cflags += ''
+    elif wayland_present:
+        extra_cflags += ' -DEGL_API_FB -DWL_EGL_PLATFORM'
+    else:
+        extra_cflags += ' -DEGL_API_FB'
+
+    d.appendVar('CFLAGS', extra_cflags)
+}
+
+PACKAGE_ARCH_mxs = "${MACHINE_SOCARCH}"
+PACKAGE_ARCH_mx5 = "${MACHINE_SOCARCH}"
+PACKAGE_ARCH_mx6 = "${MACHINE_SOCARCH}"