summaryrefslogtreecommitdiff
path: root/yocto-poky/meta/recipes-graphics/cogl
diff options
context:
space:
mode:
Diffstat (limited to 'yocto-poky/meta/recipes-graphics/cogl')
-rw-r--r--yocto-poky/meta/recipes-graphics/cogl/cogl-1.0.inc70
-rw-r--r--yocto-poky/meta/recipes-graphics/cogl/cogl-1.0/cogl-framebuffer-gl-Work-again-on-GLESv2.patch41
-rw-r--r--yocto-poky/meta/recipes-graphics/cogl/cogl-1.0_1.20.0.bb8
3 files changed, 119 insertions, 0 deletions
diff --git a/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0.inc b/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0.inc
new file mode 100644
index 000000000..3da31c85f
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0.inc
@@ -0,0 +1,70 @@
+SUMMARY = "Modern 3D graphics API with associated utility APIs"
+HOMEPAGE = "http://wiki.clutter-project.org/wiki/Cogl"
+LICENSE = "MIT"
+
+inherit clutter
+
+DEPENDS = "glib-2.0 gdk-pixbuf"
+PACKAGES =+ "${PN}-examples \
+ libcogl libcogl-gles2 libcogl-pango libcogl-path \
+ "
+AUTOTOOLS_AUXDIR = "${S}/build"
+
+# Extra DEPENDS for PACKAGECONFIG
+EDEPENDS_GL = "virtual/libgl libdrm"
+EDEPENDS_GLES2 = "virtual/libgles2"
+EDEPENDS_KMS = "libdrm virtual/egl"
+EDEPENDS_EGL = "virtual/egl"
+EDEPENDS_X11 = "virtual/libx11 libxcomposite libxfixes libxi libxrandr"
+EDEPENDS_WAYLAND = "virtual/mesa wayland"
+
+# Extra RDEPENDS for PACKAGECONFIG
+# This has to be explictly listed, because cogl dlopens the backends
+ERDEPENDS_GL = "libgl"
+ERDEPENDS_GLES2 = "libgles2"
+
+# GLESv1 is rarely tested, so disable it
+EXTRA_OECONF += "--disable-introspection \
+ --enable-examples-install \
+ --enable-debug \
+ --disable-gles1 \
+ --disable-cairo \
+ "
+
+# OpenGL/GLX
+PACKAGECONFIG[glx] = "--enable-gl --enable-glx,--disable-gl --disable-glx,${EDEPENDS_GL} ${EDEPENDS_X11},${ERDEPENDS_GL}"
+
+# GLESv2
+PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,${EDEPENDS_GLES2}, ${ERDEPENDS_GLES2}"
+
+# EGL backends
+PACKAGECONFIG[egl-kms] = "--enable-kms-egl-platform,--disable-kms-egl-platform,${EDEPENDS_KMS}"
+PACKAGECONFIG[egl-null] = "--enable-null-egl-platform,--disable-null-egl-platform"
+PACKAGECONFIG[egl-x11] = "--enable-xlib-egl-platform,--disable-xlib-egl-platform,${EDEPENDS_X11} ${EDEPENDS_EGL}"
+PACKAGECONFIG[egl-wayland] = "--enable-wayland-egl-platform,--disable-wayland-egl-platform,${EDEPENDS_WAYLAND}"
+
+# Wayland (server-side)
+PACKAGECONFIG[wayland-server] = "--enable-wayland-egl-server,--disable-wayland-egl-server,${EDEPENDS_WAYLAND}"
+
+# Support rendering text directly with Pango
+PACKAGECONFIG[cogl-pango] = "--enable-cogl-pango,--disable-cogl-pango,pango"
+
+# Respect the DISTRO_FEATURES to pull in GLX or Wayland as appropriate by
+# default.
+PACKAGECONFIG ??= "cogl-pango gles2 \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'egl-wayland', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx egl-x11', '', d)} \
+ "
+
+
+FILES_${PN}-examples = "${bindir}/* ${datadir}/cogl/examples-data/*"
+FILES_libcogl = "${libdir}/libcogl${SOLIBS}"
+FILES_libcogl-gles2 = "${libdir}/libcogl-gles2${SOLIBS}"
+FILES_libcogl-pango = "${libdir}/libcogl-pango${SOLIBS}"
+
+FILES_libcogl-path = "${libdir}/libcogl-path${SOLIBS}"
+
+# For backwards compatibility after Debian-renaming
+RPROVIDES_libcogl = "cogl-1.0"
+RCONFLICTS_libcogl = "cogl-1.0"
+RREPLACES_libcogl = "cogl-1.0"
diff --git a/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0/cogl-framebuffer-gl-Work-again-on-GLESv2.patch b/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0/cogl-framebuffer-gl-Work-again-on-GLESv2.patch
new file mode 100644
index 000000000..8e839579f
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0/cogl-framebuffer-gl-Work-again-on-GLESv2.patch
@@ -0,0 +1,41 @@
+Upstream-Status: Backport
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+
+
+From f8cce5f6cb2958a4074f87cd345bfe46e0dda6e1 Mon Sep 17 00:00:00 2001
+From: "Jasper St. Pierre" <jstpierre@mecheye.net>
+Date: Mon, 20 Apr 2015 12:08:29 -0700
+Subject: cogl-framebuffer-gl: Work again on GLESv2
+
+
+diff --git a/cogl/driver/gl/cogl-framebuffer-gl.c b/cogl/driver/gl/cogl-framebuffer-gl.c
+index 793b10b..609cfb3 100644
+--- a/cogl/driver/gl/cogl-framebuffer-gl.c
++++ b/cogl/driver/gl/cogl-framebuffer-gl.c
+@@ -107,6 +107,12 @@
+ #ifndef GL_PACK_INVERT_MESA
+ #define GL_PACK_INVERT_MESA 0x8758
+ #endif
++#ifndef GL_BACK_LEFT
++#define GL_BACK_LEFT 0x0402
++#endif
++#ifndef GL_BACK_RIGHT
++#define GL_BACK_RIGHT 0x0403
++#endif
+
+ #ifndef GL_COLOR
+ #define GL_COLOR 0x1800
+@@ -245,6 +251,9 @@ _cogl_framebuffer_gl_flush_stereo_mode_state (CoglFramebuffer *framebuffer)
+ if (framebuffer->type == COGL_FRAMEBUFFER_TYPE_OFFSCREEN)
+ return;
+
++ if (!ctx->glDrawBuffer)
++ return;
++
+ /* The one-shot default draw buffer setting in _cogl_framebuffer_gl_bind
+ * must have already happened. If not it would override what we set here. */
+ g_assert (ctx->was_bound_to_onscreen);
+--
+cgit v0.10.2
+
diff --git a/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0_1.20.0.bb b/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0_1.20.0.bb
new file mode 100644
index 000000000..d20b814e8
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0_1.20.0.bb
@@ -0,0 +1,8 @@
+require cogl-1.0.inc
+
+SRC_URI += "file://cogl-framebuffer-gl-Work-again-on-GLESv2.patch"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=1b1a508d91d25ca607c83f92f3e31c84"
+SRC_URI[archive.md5sum] = "5b28897194d9ff76a574a9493d1f7ee0"
+SRC_URI[archive.sha256sum] = "729e35495829e7d31fafa3358e47b743ba21a2b08ff9b6cd28fb74c0de91192b"
+