xref: /OK3568_Linux_fs/yocto/meta-openembedded/meta-gnome/recipes-graphics/cogl/cogl-1.0.inc (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSUMMARY = "Modern 3D graphics API with associated utility APIs"
2*4882a593SmuzhiyunDESCRIPTION = "Cogl is a small open source library for using 3D graphics \
3*4882a593Smuzhiyunhardware for rendering. The API departs from the flat state machine style of \
4*4882a593SmuzhiyunOpenGL and is designed to make it easy to write orthogonal components that \
5*4882a593Smuzhiyuncan render without stepping on each others toes."
6*4882a593SmuzhiyunHOMEPAGE = "https://gitlab.gnome.org/GNOME/cogl"
7*4882a593SmuzhiyunLICENSE = "MIT"
8*4882a593Smuzhiyun
9*4882a593Smuzhiyuninherit clutter features_check upstream-version-is-even gobject-introspection
10*4882a593Smuzhiyun# cogl-1.0 needs opengl to build
11*4882a593SmuzhiyunREQUIRED_DISTRO_FEATURES ?= "opengl"
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunDEPENDS = "glib-2.0 gdk-pixbuf"
14*4882a593SmuzhiyunPACKAGES =+ "${PN}-examples \
15*4882a593Smuzhiyun             libcogl libcogl-gles2 libcogl-pango libcogl-path \
16*4882a593Smuzhiyun            "
17*4882a593SmuzhiyunAUTOTOOLS_AUXDIR = "${S}/build"
18*4882a593Smuzhiyun
19*4882a593Smuzhiyun# Extra DEPENDS for PACKAGECONFIG
20*4882a593SmuzhiyunEDEPENDS_GL = "virtual/libgl libdrm"
21*4882a593SmuzhiyunEDEPENDS_GLES2 = "virtual/libgles2"
22*4882a593SmuzhiyunEDEPENDS_KMS = "libdrm virtual/egl"
23*4882a593SmuzhiyunEDEPENDS_EGL = "virtual/egl"
24*4882a593SmuzhiyunEDEPENDS_X11 = "virtual/libx11 libxcomposite libxdamage libxfixes libxrandr"
25*4882a593SmuzhiyunEDEPENDS_WAYLAND = "virtual/egl virtual/libgles2 wayland"
26*4882a593Smuzhiyun
27*4882a593Smuzhiyun# Extra RDEPENDS for PACKAGECONFIG
28*4882a593Smuzhiyun# This has to be explictly listed, because cogl dlopens the backends
29*4882a593SmuzhiyunERDEPENDS_GL    = "libgl"
30*4882a593SmuzhiyunERDEPENDS_GLES2 = "libgles2"
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun# GLESv1 is rarely tested, so disable it
33*4882a593SmuzhiyunEXTRA_OECONF += "--enable-examples-install	\
34*4882a593Smuzhiyun	       	 --enable-debug		 	\
35*4882a593Smuzhiyun	       	 --disable-gles1		\
36*4882a593Smuzhiyun	         --disable-cairo                \
37*4882a593Smuzhiyun	    	"
38*4882a593SmuzhiyunDEBUG_OPTIMIZATION:append = " -Wno-error=maybe-uninitialized"
39*4882a593Smuzhiyun
40*4882a593Smuzhiyun# OpenGL/GLX
41*4882a593SmuzhiyunPACKAGECONFIG[glx] = "--enable-gl --enable-glx,--disable-gl --disable-glx,${EDEPENDS_GL} ${EDEPENDS_X11},${ERDEPENDS_GL}"
42*4882a593Smuzhiyun
43*4882a593Smuzhiyun# GLESv2
44*4882a593SmuzhiyunPACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,${EDEPENDS_GLES2}, ${ERDEPENDS_GLES2}"
45*4882a593Smuzhiyun
46*4882a593Smuzhiyun# EGL backends
47*4882a593SmuzhiyunPACKAGECONFIG[egl-kms] = "--enable-kms-egl-platform,--disable-kms-egl-platform,${EDEPENDS_KMS}"
48*4882a593SmuzhiyunPACKAGECONFIG[egl-null] = "--enable-null-egl-platform,--disable-null-egl-platform"
49*4882a593SmuzhiyunPACKAGECONFIG[egl-x11] = "--enable-xlib-egl-platform,--disable-xlib-egl-platform,${EDEPENDS_X11} ${EDEPENDS_EGL}"
50*4882a593SmuzhiyunPACKAGECONFIG[egl-wayland] = "--enable-wayland-egl-platform,--disable-wayland-egl-platform,${EDEPENDS_WAYLAND}"
51*4882a593Smuzhiyun
52*4882a593Smuzhiyun# Wayland (server-side)
53*4882a593SmuzhiyunPACKAGECONFIG[wayland-server] = "--enable-wayland-egl-server,--disable-wayland-egl-server,${EDEPENDS_WAYLAND}"
54*4882a593Smuzhiyun
55*4882a593Smuzhiyun# Support rendering text directly with Pango
56*4882a593SmuzhiyunPACKAGECONFIG[cogl-pango] = "--enable-cogl-pango,--disable-cogl-pango,pango"
57*4882a593Smuzhiyun
58*4882a593Smuzhiyun# Respect the DISTRO_FEATURES to pull in GLX or Wayland as appropriate by
59*4882a593Smuzhiyun# default.
60*4882a593SmuzhiyunPACKAGECONFIG ??= "cogl-pango gles2 \
61*4882a593Smuzhiyun                   ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'egl-wayland', '', d)} \
62*4882a593Smuzhiyun                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx egl-x11', '', d)} \
63*4882a593Smuzhiyun                   "
64*4882a593Smuzhiyun
65*4882a593Smuzhiyundo_compile:prepend() {
66*4882a593Smuzhiyun        export GIR_EXTRA_LIBS_PATH="${B}/cogl/.libs"
67*4882a593Smuzhiyun}
68*4882a593Smuzhiyun
69*4882a593SmuzhiyunFILES:${PN} = ""
70*4882a593SmuzhiyunFILES:${PN}-examples = "${bindir}/* ${datadir}/cogl/examples-data/*"
71*4882a593SmuzhiyunFILES:libcogl = "${libdir}/libcogl${SOLIBS} ${libdir}/girepository-1.0/Cogl-*.typelib"
72*4882a593SmuzhiyunFILES:libcogl-gles2 = "${libdir}/libcogl-gles2${SOLIBS}"
73*4882a593SmuzhiyunFILES:libcogl-pango = "${libdir}/libcogl-pango${SOLIBS} ${libdir}/girepository-1.0/CoglPango*.typelib"
74*4882a593Smuzhiyun
75*4882a593SmuzhiyunFILES:libcogl-path = "${libdir}/libcogl-path${SOLIBS}"
76*4882a593Smuzhiyun
77*4882a593Smuzhiyun# For backwards compatibility after Debian-renaming
78*4882a593SmuzhiyunRPROVIDES:libcogl = "cogl-1.0"
79*4882a593SmuzhiyunRCONFLICTS:libcogl = "cogl-1.0"
80*4882a593SmuzhiyunRREPLACES:libcogl = "cogl-1.0"
81*4882a593Smuzhiyun
82*4882a593SmuzhiyunRDEPENDS:${PN}-dev = "libcogl"
83*4882a593Smuzhiyun
84*4882a593SmuzhiyunCOMPATIBLE_HOST:armv4 = 'null'
85