1SUMMARY = "Modern 3D graphics API with associated utility APIs" 2DESCRIPTION = "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." 6HOMEPAGE = "https://gitlab.gnome.org/GNOME/cogl" 7LICENSE = "MIT" 8 9inherit clutter features_check upstream-version-is-even gobject-introspection 10# cogl-1.0 needs opengl to build 11REQUIRED_DISTRO_FEATURES ?= "opengl" 12 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" 24EDEPENDS_X11 = "virtual/libx11 libxcomposite libxdamage libxfixes libxrandr" 25EDEPENDS_WAYLAND = "virtual/egl virtual/libgles2 wayland" 26 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 33EXTRA_OECONF += "--enable-examples-install \ 34 --enable-debug \ 35 --disable-gles1 \ 36 --disable-cairo \ 37 " 38DEBUG_OPTIMIZATION:append = " -Wno-error=maybe-uninitialized" 39 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 65do_compile:prepend() { 66 export GIR_EXTRA_LIBS_PATH="${B}/cogl/.libs" 67} 68 69FILES:${PN} = "" 70FILES:${PN}-examples = "${bindir}/* ${datadir}/cogl/examples-data/*" 71FILES:libcogl = "${libdir}/libcogl${SOLIBS} ${libdir}/girepository-1.0/Cogl-*.typelib" 72FILES:libcogl-gles2 = "${libdir}/libcogl-gles2${SOLIBS}" 73FILES:libcogl-pango = "${libdir}/libcogl-pango${SOLIBS} ${libdir}/girepository-1.0/CoglPango*.typelib" 74 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" 81 82RDEPENDS:${PN}-dev = "libcogl" 83 84COMPATIBLE_HOST:armv4 = 'null' 85