Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Modern 3D graphics API with associated utility APIs" |
| 2 | HOMEPAGE = "http://wiki.clutter-project.org/wiki/Cogl" |
| 3 | LICENSE = "MIT" |
| 4 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 5 | inherit clutter distro_features_check upstream-version-is-even gobject-introspection |
| 6 | # cogl-1.0 needs opengl to build |
| 7 | REQUIRED_DISTRO_FEATURES ?= "opengl" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 8 | |
| 9 | DEPENDS = "glib-2.0 gdk-pixbuf" |
| 10 | PACKAGES =+ "${PN}-examples \ |
| 11 | libcogl libcogl-gles2 libcogl-pango libcogl-path \ |
| 12 | " |
| 13 | AUTOTOOLS_AUXDIR = "${S}/build" |
| 14 | |
| 15 | # Extra DEPENDS for PACKAGECONFIG |
| 16 | EDEPENDS_GL = "virtual/libgl libdrm" |
| 17 | EDEPENDS_GLES2 = "virtual/libgles2" |
| 18 | EDEPENDS_KMS = "libdrm virtual/egl" |
| 19 | EDEPENDS_EGL = "virtual/egl" |
| 20 | EDEPENDS_X11 = "virtual/libx11 libxcomposite libxfixes libxi libxrandr" |
| 21 | EDEPENDS_WAYLAND = "virtual/mesa wayland" |
| 22 | |
| 23 | # Extra RDEPENDS for PACKAGECONFIG |
| 24 | # This has to be explictly listed, because cogl dlopens the backends |
| 25 | ERDEPENDS_GL = "libgl" |
| 26 | ERDEPENDS_GLES2 = "libgles2" |
| 27 | |
| 28 | # GLESv1 is rarely tested, so disable it |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 29 | EXTRA_OECONF += "--enable-examples-install \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 30 | --enable-debug \ |
| 31 | --disable-gles1 \ |
| 32 | --disable-cairo \ |
| 33 | " |
| 34 | |
| 35 | # OpenGL/GLX |
| 36 | PACKAGECONFIG[glx] = "--enable-gl --enable-glx,--disable-gl --disable-glx,${EDEPENDS_GL} ${EDEPENDS_X11},${ERDEPENDS_GL}" |
| 37 | |
| 38 | # GLESv2 |
| 39 | PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,${EDEPENDS_GLES2}, ${ERDEPENDS_GLES2}" |
| 40 | |
| 41 | # EGL backends |
| 42 | PACKAGECONFIG[egl-kms] = "--enable-kms-egl-platform,--disable-kms-egl-platform,${EDEPENDS_KMS}" |
| 43 | PACKAGECONFIG[egl-null] = "--enable-null-egl-platform,--disable-null-egl-platform" |
| 44 | PACKAGECONFIG[egl-x11] = "--enable-xlib-egl-platform,--disable-xlib-egl-platform,${EDEPENDS_X11} ${EDEPENDS_EGL}" |
| 45 | PACKAGECONFIG[egl-wayland] = "--enable-wayland-egl-platform,--disable-wayland-egl-platform,${EDEPENDS_WAYLAND}" |
| 46 | |
| 47 | # Wayland (server-side) |
| 48 | PACKAGECONFIG[wayland-server] = "--enable-wayland-egl-server,--disable-wayland-egl-server,${EDEPENDS_WAYLAND}" |
| 49 | |
| 50 | # Support rendering text directly with Pango |
| 51 | PACKAGECONFIG[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. |
| 55 | PACKAGECONFIG ??= "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 Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 60 | do_compile_prepend() { |
| 61 | export GIR_EXTRA_LIBS_PATH="${B}/cogl/.libs" |
| 62 | } |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 63 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 64 | FILES_${PN} = "" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 65 | FILES_${PN}-examples = "${bindir}/* ${datadir}/cogl/examples-data/*" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 66 | FILES_libcogl = "${libdir}/libcogl${SOLIBS} ${libdir}/girepository-1.0/Cogl-*.typelib" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 67 | FILES_libcogl-gles2 = "${libdir}/libcogl-gles2${SOLIBS}" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 68 | 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] | 69 | |
| 70 | FILES_libcogl-path = "${libdir}/libcogl-path${SOLIBS}" |
| 71 | |
| 72 | # For backwards compatibility after Debian-renaming |
| 73 | RPROVIDES_libcogl = "cogl-1.0" |
| 74 | RCONFLICTS_libcogl = "cogl-1.0" |
| 75 | RREPLACES_libcogl = "cogl-1.0" |