summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/recipes-graphics/cogl
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-graphics/cogl')
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0.inc75
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0/test-backface-culling.c-fix-may-be-used-uninitialize.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0_1.22.0.bb7
3 files changed, 117 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0.inc b/import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0.inc
new file mode 100644
index 000000000..690ea3b86
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0.inc
@@ -0,0 +1,75 @@
+SUMMARY = "Modern 3D graphics API with associated utility APIs"
+HOMEPAGE = "http://wiki.clutter-project.org/wiki/Cogl"
+LICENSE = "MIT"
+
+inherit clutter distro_features_check upstream-version-is-even gobject-introspection
+# cogl-1.0 needs opengl to build
+REQUIRED_DISTRO_FEATURES ?= "opengl"
+
+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 += "--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)} \
+ "
+
+do_compile_prepend() {
+ export GIR_EXTRA_LIBS_PATH="${B}/cogl/.libs"
+}
+
+FILES_${PN} = ""
+FILES_${PN}-examples = "${bindir}/* ${datadir}/cogl/examples-data/*"
+FILES_libcogl = "${libdir}/libcogl${SOLIBS} ${libdir}/girepository-1.0/Cogl-*.typelib"
+FILES_libcogl-gles2 = "${libdir}/libcogl-gles2${SOLIBS}"
+FILES_libcogl-pango = "${libdir}/libcogl-pango${SOLIBS} ${libdir}/girepository-1.0/CoglPango*.typelib"
+
+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/import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0/test-backface-culling.c-fix-may-be-used-uninitialize.patch b/import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0/test-backface-culling.c-fix-may-be-used-uninitialize.patch
new file mode 100644
index 000000000..479a0ff4b
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0/test-backface-culling.c-fix-may-be-used-uninitialize.patch
@@ -0,0 +1,35 @@
+From a51f61d675a0e7d6649182c6a1325ceab8342df2 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Mon, 4 Jan 2016 22:47:29 -0800
+Subject: [PATCH] test-backface-culling.c: fix may be used uninitialized error
+
+Fixed when gcc -O:
+test-backface-culling.c:206:7: error: 'cull_front' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+| validate_part (framebuffer,
+| ^
+| cc1: some warnings being treated as errors
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ tests/conform/test-backface-culling.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/tests/conform/test-backface-culling.c b/tests/conform/test-backface-culling.c
+index e90c2f5..7c45592 100644
+--- a/tests/conform/test-backface-culling.c
++++ b/tests/conform/test-backface-culling.c
+@@ -164,7 +164,8 @@ validate_result (CoglFramebuffer *framebuffer, int y_offset)
+
+ for (draw_num = 0; draw_num < 16; draw_num++)
+ {
+- CoglBool cull_front, cull_back;
++ CoglBool cull_front = FALSE;
++ CoglBool cull_back = FALSE;
+ CoglPipelineCullFaceMode cull_mode;
+
+ if (USE_LEGACY_STATE (draw_num))
+--
+1.7.9.5
+
diff --git a/import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0_1.22.0.bb b/import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0_1.22.0.bb
new file mode 100644
index 000000000..ed10c7a39
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0_1.22.0.bb
@@ -0,0 +1,7 @@
+require cogl-1.0.inc
+
+SRC_URI += "file://test-backface-culling.c-fix-may-be-used-uninitialize.patch"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=1b1a508d91d25ca607c83f92f3e31c84"
+SRC_URI[archive.md5sum] = "ab684ec96848d79d22757fb3064820c8"
+SRC_URI[archive.sha256sum] = "689dfb5d14fc1106e9d2ded0f7930dcf7265d0bc84fa846b4f03941633eeaa91"
OpenPOWER on IntegriCloud