blob: 3da361b3ff1ee0e3449f9298f434b74538a354a3 [file] [log] [blame]
William A. Kennington IIIb95905d2021-06-02 12:40:56 -07001SUMMARY = "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 "
Patrick Williams213cb262021-08-07 19:21:33 -050038DEBUG_OPTIMIZATION:append = " -Wno-error=maybe-uninitialized"
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070039
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 Williams213cb262021-08-07 19:21:33 -050065do_compile:prepend() {
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070066 export GIR_EXTRA_LIBS_PATH="${B}/cogl/.libs"
67}
68
Patrick Williams213cb262021-08-07 19:21:33 -050069FILES:${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"
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070074
Patrick Williams213cb262021-08-07 19:21:33 -050075FILES:libcogl-path = "${libdir}/libcogl-path${SOLIBS}"
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070076
77# For backwards compatibility after Debian-renaming
Patrick Williams213cb262021-08-07 19:21:33 -050078RPROVIDES:libcogl = "cogl-1.0"
79RCONFLICTS:libcogl = "cogl-1.0"
80RREPLACES:libcogl = "cogl-1.0"
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070081
Patrick Williams213cb262021-08-07 19:21:33 -050082RDEPENDS:${PN}-dev = "libcogl"
William A. Kennington IIIb95905d2021-06-02 12:40:56 -070083
Patrick Williams213cb262021-08-07 19:21:33 -050084COMPATIBLE_HOST:armv4 = 'null'