diff options
author | Ross Burton <ross@burtonini.com> | 2021-05-26 15:36:04 +0100 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-05-28 06:55:33 -0700 |
commit | 4b6175892985a6016df1a38824ccbb5989f00b33 (patch) | |
tree | 32718c4c55dbaf254632068deb91db73d9a81373 /meta-gnome/recipes-graphics/cogl | |
parent | ba8309fbb7880b1a2782b43e7f8b203aab4d5c11 (diff) | |
download | meta-openembedded-4b6175892985a6016df1a38824ccbb5989f00b33.tar.gz |
meta-gnome: add Cogl/Clutter from oe-core
Nothing in openembedded-core needs Clutter now, and Clutter is abandoned
upstream. Move it to meta-gnome as there are still a few users of
Clutter in Gnome.
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-gnome/recipes-graphics/cogl')
3 files changed, 182 insertions, 0 deletions
diff --git a/meta-gnome/recipes-graphics/cogl/cogl-1.0.inc b/meta-gnome/recipes-graphics/cogl/cogl-1.0.inc new file mode 100644 index 0000000000..d581ad1c04 --- /dev/null +++ b/meta-gnome/recipes-graphics/cogl/cogl-1.0.inc | |||
@@ -0,0 +1,84 @@ | |||
1 | SUMMARY = "Modern 3D graphics API with associated utility APIs" | ||
2 | DESCRIPTION = "Cogl is a small open source library for using 3D graphics \ | ||
3 | hardware for rendering. The API departs from the flat state machine style of \ | ||
4 | OpenGL and is designed to make it easy to write orthogonal components that \ | ||
5 | can render without stepping on each others toes." | ||
6 | HOMEPAGE = "https://gitlab.gnome.org/GNOME/cogl" | ||
7 | LICENSE = "MIT" | ||
8 | |||
9 | inherit clutter features_check upstream-version-is-even gobject-introspection | ||
10 | # cogl-1.0 needs opengl to build | ||
11 | REQUIRED_DISTRO_FEATURES ?= "opengl" | ||
12 | |||
13 | DEPENDS = "glib-2.0 gdk-pixbuf" | ||
14 | PACKAGES =+ "${PN}-examples \ | ||
15 | libcogl libcogl-gles2 libcogl-pango libcogl-path \ | ||
16 | " | ||
17 | AUTOTOOLS_AUXDIR = "${S}/build" | ||
18 | |||
19 | # Extra DEPENDS for PACKAGECONFIG | ||
20 | EDEPENDS_GL = "virtual/libgl libdrm" | ||
21 | EDEPENDS_GLES2 = "virtual/libgles2" | ||
22 | EDEPENDS_KMS = "libdrm virtual/egl" | ||
23 | EDEPENDS_EGL = "virtual/egl" | ||
24 | EDEPENDS_X11 = "virtual/libx11 libxcomposite libxdamage libxfixes libxrandr" | ||
25 | EDEPENDS_WAYLAND = "virtual/egl virtual/libgles2 wayland" | ||
26 | |||
27 | # Extra RDEPENDS for PACKAGECONFIG | ||
28 | # This has to be explictly listed, because cogl dlopens the backends | ||
29 | ERDEPENDS_GL = "libgl" | ||
30 | ERDEPENDS_GLES2 = "libgles2" | ||
31 | |||
32 | # GLESv1 is rarely tested, so disable it | ||
33 | EXTRA_OECONF += "--enable-examples-install \ | ||
34 | --enable-debug \ | ||
35 | --disable-gles1 \ | ||
36 | --disable-cairo \ | ||
37 | " | ||
38 | DEBUG_OPTIMIZATION_append = " -Wno-error=maybe-uninitialized" | ||
39 | |||
40 | # OpenGL/GLX | ||
41 | PACKAGECONFIG[glx] = "--enable-gl --enable-glx,--disable-gl --disable-glx,${EDEPENDS_GL} ${EDEPENDS_X11},${ERDEPENDS_GL}" | ||
42 | |||
43 | # GLESv2 | ||
44 | PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,${EDEPENDS_GLES2}, ${ERDEPENDS_GLES2}" | ||
45 | |||
46 | # EGL backends | ||
47 | PACKAGECONFIG[egl-kms] = "--enable-kms-egl-platform,--disable-kms-egl-platform,${EDEPENDS_KMS}" | ||
48 | PACKAGECONFIG[egl-null] = "--enable-null-egl-platform,--disable-null-egl-platform" | ||
49 | PACKAGECONFIG[egl-x11] = "--enable-xlib-egl-platform,--disable-xlib-egl-platform,${EDEPENDS_X11} ${EDEPENDS_EGL}" | ||
50 | PACKAGECONFIG[egl-wayland] = "--enable-wayland-egl-platform,--disable-wayland-egl-platform,${EDEPENDS_WAYLAND}" | ||
51 | |||
52 | # Wayland (server-side) | ||
53 | PACKAGECONFIG[wayland-server] = "--enable-wayland-egl-server,--disable-wayland-egl-server,${EDEPENDS_WAYLAND}" | ||
54 | |||
55 | # Support rendering text directly with Pango | ||
56 | PACKAGECONFIG[cogl-pango] = "--enable-cogl-pango,--disable-cogl-pango,pango" | ||
57 | |||
58 | # Respect the DISTRO_FEATURES to pull in GLX or Wayland as appropriate by | ||
59 | # default. | ||
60 | PACKAGECONFIG ??= "cogl-pango gles2 \ | ||
61 | ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'egl-wayland', '', d)} \ | ||
62 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx egl-x11', '', d)} \ | ||
63 | " | ||
64 | |||
65 | do_compile_prepend() { | ||
66 | export GIR_EXTRA_LIBS_PATH="${B}/cogl/.libs" | ||
67 | } | ||
68 | |||
69 | FILES_${PN} = "" | ||
70 | FILES_${PN}-examples = "${bindir}/* ${datadir}/cogl/examples-data/*" | ||
71 | FILES_libcogl = "${libdir}/libcogl${SOLIBS} ${libdir}/girepository-1.0/Cogl-*.typelib" | ||
72 | FILES_libcogl-gles2 = "${libdir}/libcogl-gles2${SOLIBS}" | ||
73 | FILES_libcogl-pango = "${libdir}/libcogl-pango${SOLIBS} ${libdir}/girepository-1.0/CoglPango*.typelib" | ||
74 | |||
75 | FILES_libcogl-path = "${libdir}/libcogl-path${SOLIBS}" | ||
76 | |||
77 | # For backwards compatibility after Debian-renaming | ||
78 | RPROVIDES_libcogl = "cogl-1.0" | ||
79 | RCONFLICTS_libcogl = "cogl-1.0" | ||
80 | RREPLACES_libcogl = "cogl-1.0" | ||
81 | |||
82 | RDEPENDS_${PN}-dev = "libcogl" | ||
83 | |||
84 | COMPATIBLE_HOST_armv4 = 'null' | ||
diff --git a/meta-gnome/recipes-graphics/cogl/cogl-1.0/0001-configure.ac-don-t-require-eglmesaext.h.patch b/meta-gnome/recipes-graphics/cogl/cogl-1.0/0001-configure.ac-don-t-require-eglmesaext.h.patch new file mode 100644 index 0000000000..328984a63f --- /dev/null +++ b/meta-gnome/recipes-graphics/cogl/cogl-1.0/0001-configure.ac-don-t-require-eglmesaext.h.patch | |||
@@ -0,0 +1,92 @@ | |||
1 | From bb9765a926588ebfe1eb324fbbe8fc22d419eebe Mon Sep 17 00:00:00 2001 | ||
2 | From: Max Krummenacher <max.krummenacher@toradex.com> | ||
3 | Date: Thu, 25 Jun 2020 11:27:40 +0000 | ||
4 | Subject: [PATCH] configure.ac: don't require eglmesaext.h | ||
5 | |||
6 | E.g. the Vivante EGL implementation does not provide eglmesaext.h. | ||
7 | |||
8 | The commit moves the check for header file existence outside of the | ||
9 | check for existence of a egl packageconfig and makes the existence | ||
10 | of eglmesaext.h optional. | ||
11 | |||
12 | fixes commit fb1acfec ("Fix building against libglvnd-provided EGL headers") | ||
13 | Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> | ||
14 | |||
15 | Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/cogl/-/merge_requests/28] | ||
16 | Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> | ||
17 | --- | ||
18 | configure.ac | 51 ++++++++++++++++++++++++++++++++------------------- | ||
19 | 1 file changed, 32 insertions(+), 19 deletions(-) | ||
20 | |||
21 | diff --git a/configure.ac b/configure.ac | ||
22 | index b7ba95d..0d1d8de 100644 | ||
23 | --- a/configure.ac | ||
24 | +++ b/configure.ac | ||
25 | @@ -1212,22 +1212,6 @@ AS_IF([test "x$NEED_EGL" = "xyes" && test "x$EGL_CHECKED" != "xyes"], | ||
26 | PKG_CHECK_EXISTS([egl], | ||
27 | [COGL_PKG_REQUIRES="$COGL_PKG_REQUIRES egl"], | ||
28 | [ | ||
29 | - AC_CHECK_HEADERS( | ||
30 | - [EGL/egl.h], | ||
31 | - [], | ||
32 | - [AC_MSG_ERROR([Unable to locate required EGL headers])]) | ||
33 | - AC_CHECK_HEADERS( | ||
34 | - [EGL/eglext.h], | ||
35 | - [], | ||
36 | - [AC_MSG_ERROR([Unable to locate required EGL headers])], | ||
37 | - [#include <EGL/egl.h>]) | ||
38 | - AC_CHECK_HEADERS( | ||
39 | - [EGL/eglmesaext.h], | ||
40 | - [], | ||
41 | - [AC_MSG_ERROR([Unable to locate required EGL headers])], | ||
42 | - [#include <EGL/egl.h> | ||
43 | -#include <EGL/eglext.h>]) | ||
44 | - | ||
45 | AC_CHECK_LIB(EGL, [eglInitialize], | ||
46 | [COGL_EXTRA_LDFLAGS="$COGL_EXTRA_LDFLAGS -lEGL"], | ||
47 | [AC_MSG_ERROR([Unable to locate required EGL library])]) | ||
48 | @@ -1236,9 +1220,38 @@ AS_IF([test "x$NEED_EGL" = "xyes" && test "x$EGL_CHECKED" != "xyes"], | ||
49 | ] | ||
50 | ) | ||
51 | |||
52 | - COGL_EGL_INCLUDES="#include <EGL/egl.h> | ||
53 | -#include <EGL/eglext.h> | ||
54 | -#include <EGL/eglmesaext.h>" | ||
55 | +dnl Test for the existence of egl headers. | ||
56 | +dnl egl*.h includes eglplatform.h which on __unix__ defaults to a X11 platform. | ||
57 | +dnl In that case AC_CHECK_HEADERS failes if X11 headers are not available. | ||
58 | +dnl Set the usual include guard define and, if the EGL implementation doesn't | ||
59 | +dnl use that guard fall back to USE_OZONE and EGL_NO_X11 platforms which don't | ||
60 | +dnl require additional headers. | ||
61 | + AC_CHECK_HEADERS( | ||
62 | + [EGL/egl.h], | ||
63 | + [COGL_EGL_INCLUDES="#include <EGL/egl.h>"], | ||
64 | + [AC_MSG_ERROR([Unable to locate required EGL headers])], | ||
65 | + [#define __egl_h_ | ||
66 | + #define USE_OZONE | ||
67 | + #define EGL_NO_X11]) | ||
68 | + AC_CHECK_HEADERS( | ||
69 | + [EGL/eglext.h], | ||
70 | + [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDES | ||
71 | +#include <EGL/eglext.h>"], | ||
72 | + [AC_MSG_ERROR([Unable to locate required EGL headers])], | ||
73 | + [#define __eglext_h_ | ||
74 | + #define USE_OZONE | ||
75 | + #define EGL_NO_X11 | ||
76 | +$COGL_EGL_INCLUDES]) | ||
77 | + AC_CHECK_HEADERS( | ||
78 | + [EGL/eglmesaext.h], | ||
79 | + [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDES | ||
80 | +#include <EGL/eglmesaext.h>"], | ||
81 | + [], | ||
82 | + [#define __eglmesaext_h_ | ||
83 | +#define USE_OZONE | ||
84 | +#define EGL_NO_X11 | ||
85 | +$COGL_EGL_INCLUDES]) | ||
86 | + | ||
87 | AC_SUBST([COGL_EGL_INCLUDES]) | ||
88 | ]) | ||
89 | |||
90 | -- | ||
91 | 2.20.1 | ||
92 | |||
diff --git a/meta-gnome/recipes-graphics/cogl/cogl-1.0_1.22.8.bb b/meta-gnome/recipes-graphics/cogl/cogl-1.0_1.22.8.bb new file mode 100644 index 0000000000..b9446fab38 --- /dev/null +++ b/meta-gnome/recipes-graphics/cogl/cogl-1.0_1.22.8.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | require cogl-1.0.inc | ||
2 | |||
3 | SRC_URI += "file://0001-configure.ac-don-t-require-eglmesaext.h.patch" | ||
4 | SRC_URI[archive.sha256sum] = "a805b2b019184710ff53d0496f9f0ce6dcca420c141a0f4f6fcc02131581d759" | ||
5 | |||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=1b1a508d91d25ca607c83f92f3e31c84" | ||