blob: d581ad1c04b0edcad4f0bb00d36ee486d17ed3dc [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Modern 3D graphics API with associated utility APIs"
Brad Bishop1d80a2e2019-11-15 16:35:03 -05002DESCRIPTION = "Cogl is a small open source library for using 3D graphics \
3hardware for rendering. The API departs from the flat state machine style of \
4OpenGL and is designed to make it easy to write orthogonal components that \
5can render without stepping on each others toes."
Andrew Geissler4ed12e12020-06-05 18:00:41 -05006HOMEPAGE = "https://gitlab.gnome.org/GNOME/cogl"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05007LICENSE = "MIT"
8
Brad Bishop6dbb3162019-11-25 09:41:34 -05009inherit clutter features_check upstream-version-is-even gobject-introspection
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050010# cogl-1.0 needs opengl to build
11REQUIRED_DISTRO_FEATURES ?= "opengl"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050012
13DEPENDS = "glib-2.0 gdk-pixbuf"
14PACKAGES =+ "${PN}-examples \
15 libcogl libcogl-gles2 libcogl-pango libcogl-path \
16 "
17AUTOTOOLS_AUXDIR = "${S}/build"
18
19# Extra DEPENDS for PACKAGECONFIG
20EDEPENDS_GL = "virtual/libgl libdrm"
21EDEPENDS_GLES2 = "virtual/libgles2"
22EDEPENDS_KMS = "libdrm virtual/egl"
23EDEPENDS_EGL = "virtual/egl"
Andrew Geissler635e0e42020-08-21 15:58:33 -050024EDEPENDS_X11 = "virtual/libx11 libxcomposite libxdamage libxfixes libxrandr"
Brad Bishopa34c0302019-09-23 22:34:48 -040025EDEPENDS_WAYLAND = "virtual/egl virtual/libgles2 wayland"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026
27# Extra RDEPENDS for PACKAGECONFIG
28# This has to be explictly listed, because cogl dlopens the backends
29ERDEPENDS_GL = "libgl"
30ERDEPENDS_GLES2 = "libgles2"
31
32# GLESv1 is rarely tested, so disable it
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050033EXTRA_OECONF += "--enable-examples-install \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050034 --enable-debug \
35 --disable-gles1 \
36 --disable-cairo \
37 "
Brad Bishopc342db32019-05-15 21:57:59 -040038DEBUG_OPTIMIZATION_append = " -Wno-error=maybe-uninitialized"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050039
40# OpenGL/GLX
41PACKAGECONFIG[glx] = "--enable-gl --enable-glx,--disable-gl --disable-glx,${EDEPENDS_GL} ${EDEPENDS_X11},${ERDEPENDS_GL}"
42
43# GLESv2
44PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,${EDEPENDS_GLES2}, ${ERDEPENDS_GLES2}"
45
46# EGL backends
47PACKAGECONFIG[egl-kms] = "--enable-kms-egl-platform,--disable-kms-egl-platform,${EDEPENDS_KMS}"
48PACKAGECONFIG[egl-null] = "--enable-null-egl-platform,--disable-null-egl-platform"
49PACKAGECONFIG[egl-x11] = "--enable-xlib-egl-platform,--disable-xlib-egl-platform,${EDEPENDS_X11} ${EDEPENDS_EGL}"
50PACKAGECONFIG[egl-wayland] = "--enable-wayland-egl-platform,--disable-wayland-egl-platform,${EDEPENDS_WAYLAND}"
51
52# Wayland (server-side)
53PACKAGECONFIG[wayland-server] = "--enable-wayland-egl-server,--disable-wayland-egl-server,${EDEPENDS_WAYLAND}"
54
55# Support rendering text directly with Pango
56PACKAGECONFIG[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.
60PACKAGECONFIG ??= "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
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050065do_compile_prepend() {
66 export GIR_EXTRA_LIBS_PATH="${B}/cogl/.libs"
67}
Patrick Williamsc124f4f2015-09-15 14:41:29 -050068
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050069FILES_${PN} = ""
Patrick Williamsc124f4f2015-09-15 14:41:29 -050070FILES_${PN}-examples = "${bindir}/* ${datadir}/cogl/examples-data/*"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050071FILES_libcogl = "${libdir}/libcogl${SOLIBS} ${libdir}/girepository-1.0/Cogl-*.typelib"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050072FILES_libcogl-gles2 = "${libdir}/libcogl-gles2${SOLIBS}"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050073FILES_libcogl-pango = "${libdir}/libcogl-pango${SOLIBS} ${libdir}/girepository-1.0/CoglPango*.typelib"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050074
75FILES_libcogl-path = "${libdir}/libcogl-path${SOLIBS}"
76
77# For backwards compatibility after Debian-renaming
78RPROVIDES_libcogl = "cogl-1.0"
79RCONFLICTS_libcogl = "cogl-1.0"
80RREPLACES_libcogl = "cogl-1.0"
Patrick Williamsc0f7c042017-02-23 20:41:17 -060081
Brad Bishopa34c0302019-09-23 22:34:48 -040082RDEPENDS_${PN}-dev = "libcogl"
83
Patrick Williamsc0f7c042017-02-23 20:41:17 -060084COMPATIBLE_HOST_armv4 = 'null'