William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 1 | SUMMARY = "Modern 3D graphics API with associated utility APIs" |
| 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." |
| 6 | HOMEPAGE = "https://gitlab.gnome.org/GNOME/cogl" |
| 7 | LICENSE = "MIT" |
| 8 | |
| 9 | inherit clutter features_check upstream-version-is-even gobject-introspection |
| 10 | # cogl-1.0 needs opengl to build |
| 11 | REQUIRED_DISTRO_FEATURES ?= "opengl" |
| 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 libxdamage libxfixes libxrandr" |
| 25 | EDEPENDS_WAYLAND = "virtual/egl virtual/libgles2 wayland" |
| 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 |
| 33 | EXTRA_OECONF += "--enable-examples-install \ |
| 34 | --enable-debug \ |
| 35 | --disable-gles1 \ |
| 36 | --disable-cairo \ |
| 37 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 38 | DEBUG_OPTIMIZATION:append = " -Wno-error=maybe-uninitialized" |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [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 | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 65 | do_compile:prepend() { |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 66 | export GIR_EXTRA_LIBS_PATH="${B}/cogl/.libs" |
| 67 | } |
| 68 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 69 | FILES:${PN} = "" |
| 70 | FILES:${PN}-examples = "${bindir}/* ${datadir}/cogl/examples-data/*" |
| 71 | FILES:libcogl = "${libdir}/libcogl${SOLIBS} ${libdir}/girepository-1.0/Cogl-*.typelib" |
| 72 | FILES:libcogl-gles2 = "${libdir}/libcogl-gles2${SOLIBS}" |
| 73 | FILES:libcogl-pango = "${libdir}/libcogl-pango${SOLIBS} ${libdir}/girepository-1.0/CoglPango*.typelib" |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 74 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 75 | FILES:libcogl-path = "${libdir}/libcogl-path${SOLIBS}" |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 76 | |
| 77 | # For backwards compatibility after Debian-renaming |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 78 | RPROVIDES:libcogl = "cogl-1.0" |
| 79 | RCONFLICTS:libcogl = "cogl-1.0" |
| 80 | RREPLACES:libcogl = "cogl-1.0" |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 81 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 82 | RDEPENDS:${PN}-dev = "libcogl" |
William A. Kennington III | b95905d | 2021-06-02 12:40:56 -0700 | [diff] [blame] | 83 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 84 | COMPATIBLE_HOST:armv4 = 'null' |