blob: 7a79aa789aa91e6eb0f05abe3ccbef9269d1cb2f [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Modern 3D graphics API with associated utility APIs"
2HOMEPAGE = "http://wiki.clutter-project.org/wiki/Cogl"
3LICENSE = "MIT"
4
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05005inherit clutter distro_features_check upstream-version-is-even gobject-introspection
6# cogl-1.0 needs opengl to build
7REQUIRED_DISTRO_FEATURES ?= "opengl"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05008
9DEPENDS = "glib-2.0 gdk-pixbuf"
10PACKAGES =+ "${PN}-examples \
11 libcogl libcogl-gles2 libcogl-pango libcogl-path \
12 "
13AUTOTOOLS_AUXDIR = "${S}/build"
14
15# Extra DEPENDS for PACKAGECONFIG
16EDEPENDS_GL = "virtual/libgl libdrm"
17EDEPENDS_GLES2 = "virtual/libgles2"
18EDEPENDS_KMS = "libdrm virtual/egl"
19EDEPENDS_EGL = "virtual/egl"
20EDEPENDS_X11 = "virtual/libx11 libxcomposite libxfixes libxi libxrandr"
21EDEPENDS_WAYLAND = "virtual/mesa wayland"
22
23# Extra RDEPENDS for PACKAGECONFIG
24# This has to be explictly listed, because cogl dlopens the backends
25ERDEPENDS_GL = "libgl"
26ERDEPENDS_GLES2 = "libgles2"
27
28# GLESv1 is rarely tested, so disable it
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050029EXTRA_OECONF += "--enable-examples-install \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050030 --enable-debug \
31 --disable-gles1 \
32 --disable-cairo \
33 "
34
35# OpenGL/GLX
36PACKAGECONFIG[glx] = "--enable-gl --enable-glx,--disable-gl --disable-glx,${EDEPENDS_GL} ${EDEPENDS_X11},${ERDEPENDS_GL}"
37
38# GLESv2
39PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,${EDEPENDS_GLES2}, ${ERDEPENDS_GLES2}"
40
41# EGL backends
42PACKAGECONFIG[egl-kms] = "--enable-kms-egl-platform,--disable-kms-egl-platform,${EDEPENDS_KMS}"
43PACKAGECONFIG[egl-null] = "--enable-null-egl-platform,--disable-null-egl-platform"
44PACKAGECONFIG[egl-x11] = "--enable-xlib-egl-platform,--disable-xlib-egl-platform,${EDEPENDS_X11} ${EDEPENDS_EGL}"
45PACKAGECONFIG[egl-wayland] = "--enable-wayland-egl-platform,--disable-wayland-egl-platform,${EDEPENDS_WAYLAND}"
46
47# Wayland (server-side)
48PACKAGECONFIG[wayland-server] = "--enable-wayland-egl-server,--disable-wayland-egl-server,${EDEPENDS_WAYLAND}"
49
50# Support rendering text directly with Pango
51PACKAGECONFIG[cogl-pango] = "--enable-cogl-pango,--disable-cogl-pango,pango"
52
53# Respect the DISTRO_FEATURES to pull in GLX or Wayland as appropriate by
54# default.
55PACKAGECONFIG ??= "cogl-pango gles2 \
56 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'egl-wayland', '', d)} \
57 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx egl-x11', '', d)} \
58 "
59
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050060do_compile_prepend() {
61 export GIR_EXTRA_LIBS_PATH="${B}/cogl/.libs"
62}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050063
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050064FILES_${PN} = ""
Patrick Williamsc124f4f2015-09-15 14:41:29 -050065FILES_${PN}-examples = "${bindir}/* ${datadir}/cogl/examples-data/*"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050066FILES_libcogl = "${libdir}/libcogl${SOLIBS} ${libdir}/girepository-1.0/Cogl-*.typelib"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050067FILES_libcogl-gles2 = "${libdir}/libcogl-gles2${SOLIBS}"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050068FILES_libcogl-pango = "${libdir}/libcogl-pango${SOLIBS} ${libdir}/girepository-1.0/CoglPango*.typelib"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050069
70FILES_libcogl-path = "${libdir}/libcogl-path${SOLIBS}"
71
72# For backwards compatibility after Debian-renaming
73RPROVIDES_libcogl = "cogl-1.0"
74RCONFLICTS_libcogl = "cogl-1.0"
75RREPLACES_libcogl = "cogl-1.0"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060076
77COMPATIBLE_HOST_armv4 = 'null'