1SUMMARY = "OpenGL (ES) 2.0 benchmark" 2DESCRIPTION = "glmark2 is a benchmark for OpenGL (ES) 2.0. \ 3It uses only the subset of the OpenGL 2.0 API that is compatible with OpenGL ES 2.0." 4HOMEPAGE = "https://github.com/glmark2/glmark2" 5BUGTRACKER = "https://github.com/glmark2/glmark2/issues" 6 7LICENSE = "GPL-3.0-or-later & SGI-1" 8LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ 9 file://COPYING.SGI;beginline=5;md5=269cdab4af6748677acce51d9aa13552" 10 11DEPENDS = "libpng jpeg udev" 12DEPENDS:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland-native wayland-protocols', '', d)}" 13 14PV = "2021.12" 15 16SRC_URI = " \ 17 git://github.com/glmark2/glmark2.git;protocol=https;branch=master \ 18 file://0001-fix-dispmanx-build.patch \ 19 file://0002-run-dispmanx-fullscreen.patch \ 20 file://0001-libmatrix-Include-missing-utility-header.patch \ 21 " 22SRCREV = "0858b450cd88c84a15b99dda9698d44e7f7e8c70" 23 24S = "${WORKDIR}/git" 25 26inherit waf pkgconfig features_check 27 28ANY_OF_DISTRO_FEATURES = "opengl dispmanx" 29 30PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11-gles2', '', d)} \ 31 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland opengl', 'wayland-gles2', '', d)} \ 32 ${@bb.utils.contains('DISTRO_FEATURES', 'dispmanx', 'dispmanx', '', d)} \ 33 drm-gles2 \ 34 " 35 36PACKAGECONFIG[x11-gl] = ",,virtual/libgl virtual/libx11" 37PACKAGECONFIG[x11-gles2] = ",,virtual/libgles2 virtual/libx11" 38PACKAGECONFIG[drm-gl] = ",,virtual/libgl libdrm virtual/libgbm" 39PACKAGECONFIG[drm-gles2] = ",,virtual/libgles2 libdrm virtual/libgbm" 40PACKAGECONFIG[wayland-gl] = ",,virtual/libgl wayland" 41PACKAGECONFIG[wayland-gles2] = ",,virtual/libgles2 wayland" 42PACKAGECONFIG[dispmanx] = ",,virtual/libgles2 virtual/libx11" 43 44python __anonymous() { 45 packageconfig = (d.getVar("PACKAGECONFIG") or "").split() 46 flavors = [] 47 if "x11-gles2" in packageconfig: 48 flavors.append("x11-glesv2") 49 if "x11-gl" in packageconfig: 50 flavors.append("x11-gl") 51 if "wayland-gles2" in packageconfig: 52 flavors.append("wayland-glesv2") 53 if "wayland-gl" in packageconfig: 54 flavors.append("wayland-gl") 55 if "drm-gles2" in packageconfig: 56 flavors.append("drm-glesv2") 57 if "drm-gl" in packageconfig: 58 flavors.append("drm-gl") 59 if "dispmanx" in packageconfig: 60 flavors = ["dispmanx-glesv2"] 61 if flavors: 62 d.appendVar("EXTRA_OECONF", " --with-flavors=%s" % ",".join(flavors)) 63} 64 65