blob: 44361631688fab56ed3365ab162119d867318781 [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"
Brad Bishopa34c0302019-09-23 22:34:48 -040021EDEPENDS_WAYLAND = "virtual/egl virtual/libgles2 wayland"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050022
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 "
Brad Bishopc342db32019-05-15 21:57:59 -040034DEBUG_OPTIMIZATION_append = " -Wno-error=maybe-uninitialized"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050035
36# OpenGL/GLX
37PACKAGECONFIG[glx] = "--enable-gl --enable-glx,--disable-gl --disable-glx,${EDEPENDS_GL} ${EDEPENDS_X11},${ERDEPENDS_GL}"
38
39# GLESv2
40PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,${EDEPENDS_GLES2}, ${ERDEPENDS_GLES2}"
41
42# EGL backends
43PACKAGECONFIG[egl-kms] = "--enable-kms-egl-platform,--disable-kms-egl-platform,${EDEPENDS_KMS}"
44PACKAGECONFIG[egl-null] = "--enable-null-egl-platform,--disable-null-egl-platform"
45PACKAGECONFIG[egl-x11] = "--enable-xlib-egl-platform,--disable-xlib-egl-platform,${EDEPENDS_X11} ${EDEPENDS_EGL}"
46PACKAGECONFIG[egl-wayland] = "--enable-wayland-egl-platform,--disable-wayland-egl-platform,${EDEPENDS_WAYLAND}"
47
48# Wayland (server-side)
49PACKAGECONFIG[wayland-server] = "--enable-wayland-egl-server,--disable-wayland-egl-server,${EDEPENDS_WAYLAND}"
50
51# Support rendering text directly with Pango
52PACKAGECONFIG[cogl-pango] = "--enable-cogl-pango,--disable-cogl-pango,pango"
53
54# Respect the DISTRO_FEATURES to pull in GLX or Wayland as appropriate by
55# default.
56PACKAGECONFIG ??= "cogl-pango gles2 \
57 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'egl-wayland', '', d)} \
58 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx egl-x11', '', d)} \
59 "
60
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050061do_compile_prepend() {
62 export GIR_EXTRA_LIBS_PATH="${B}/cogl/.libs"
63}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050064
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050065FILES_${PN} = ""
Patrick Williamsc124f4f2015-09-15 14:41:29 -050066FILES_${PN}-examples = "${bindir}/* ${datadir}/cogl/examples-data/*"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050067FILES_libcogl = "${libdir}/libcogl${SOLIBS} ${libdir}/girepository-1.0/Cogl-*.typelib"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050068FILES_libcogl-gles2 = "${libdir}/libcogl-gles2${SOLIBS}"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050069FILES_libcogl-pango = "${libdir}/libcogl-pango${SOLIBS} ${libdir}/girepository-1.0/CoglPango*.typelib"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050070
71FILES_libcogl-path = "${libdir}/libcogl-path${SOLIBS}"
72
73# For backwards compatibility after Debian-renaming
74RPROVIDES_libcogl = "cogl-1.0"
75RCONFLICTS_libcogl = "cogl-1.0"
76RREPLACES_libcogl = "cogl-1.0"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060077
Brad Bishopa34c0302019-09-23 22:34:48 -040078RDEPENDS_${PN}-dev = "libcogl"
79
Patrick Williamsc0f7c042017-02-23 20:41:17 -060080COMPATIBLE_HOST_armv4 = 'null'