Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Modern 3D graphics API with associated utility APIs" |
Brad Bishop | 1d80a2e | 2019-11-15 16:35:03 -0500 | [diff] [blame] | 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." |
Andrew Geissler | 4ed12e1 | 2020-06-05 18:00:41 -0500 | [diff] [blame] | 6 | HOMEPAGE = "https://gitlab.gnome.org/GNOME/cogl" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 7 | LICENSE = "MIT" |
| 8 | |
Brad Bishop | 6dbb316 | 2019-11-25 09:41:34 -0500 | [diff] [blame] | 9 | inherit clutter features_check upstream-version-is-even gobject-introspection |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 10 | # cogl-1.0 needs opengl to build |
| 11 | REQUIRED_DISTRO_FEATURES ?= "opengl" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 libxfixes libxi libxrandr" |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 25 | EDEPENDS_WAYLAND = "virtual/egl virtual/libgles2 wayland" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 33 | EXTRA_OECONF += "--enable-examples-install \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 34 | --enable-debug \ |
| 35 | --disable-gles1 \ |
| 36 | --disable-cairo \ |
| 37 | " |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 38 | DEBUG_OPTIMIZATION_append = " -Wno-error=maybe-uninitialized" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 65 | do_compile_prepend() { |
| 66 | export GIR_EXTRA_LIBS_PATH="${B}/cogl/.libs" |
| 67 | } |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 68 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 69 | FILES_${PN} = "" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 70 | FILES_${PN}-examples = "${bindir}/* ${datadir}/cogl/examples-data/*" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 71 | FILES_libcogl = "${libdir}/libcogl${SOLIBS} ${libdir}/girepository-1.0/Cogl-*.typelib" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 72 | FILES_libcogl-gles2 = "${libdir}/libcogl-gles2${SOLIBS}" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 73 | FILES_libcogl-pango = "${libdir}/libcogl-pango${SOLIBS} ${libdir}/girepository-1.0/CoglPango*.typelib" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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" |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 81 | |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 82 | RDEPENDS_${PN}-dev = "libcogl" |
| 83 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 84 | COMPATIBLE_HOST_armv4 = 'null' |