blob: f5e719a35ab00c2b6069567f31c3f806c34d1d1a [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001SUMMARY = "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."
Andrew Geissler8fc454f2020-12-11 16:27:59 -06004HOMEPAGE = "https://github.com/glmark2/glmark2"
5BUGTRACKER = "https://github.com/glmark2/glmark2/issues"
Patrick Williamsb48b7b42016-08-17 15:04:38 -05006
7LICENSE = "GPLv3+ & SGIv1"
8LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
9 file://COPYING.SGI;beginline=5;md5=269cdab4af6748677acce51d9aa13552"
10
Brad Bishopd7bf8c12018-02-25 22:55:05 -050011DEPENDS = "libpng jpeg udev"
Andrew Geissler32b11992021-03-31 13:37:05 -050012DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland-native wayland-protocols', '', d)}"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050013
Andrew Geissler32b11992021-03-31 13:37:05 -050014PV = "2021.02+${SRCPV}"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050015
Andrew Geissler8fc454f2020-12-11 16:27:59 -060016SRC_URI = " \
17 git://github.com/glmark2/glmark2.git;protocol=https \
18 file://0001-fix-dispmanx-build.patch \
19 file://0002-run-dispmanx-fullscreen.patch \
20 "
Andrew Geissler32b11992021-03-31 13:37:05 -050021SRCREV = "4b2bbe803576d48f08367aa5441740f9319c21e7"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050022
23S = "${WORKDIR}/git"
24
Brad Bishop8410d612019-11-25 09:40:59 -050025inherit waf pkgconfig features_check
Brad Bishopd7bf8c12018-02-25 22:55:05 -050026
Andrew Geissler8fc454f2020-12-11 16:27:59 -060027ANY_OF_DISTRO_FEATURES = "opengl dispmanx"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050028
Andrew Geissler748a4832020-07-24 16:24:21 -050029PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11-gles2', '', d)} \
30 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland opengl', 'wayland-gles2', '', d)} \
Andrew Geissler8fc454f2020-12-11 16:27:59 -060031 ${@bb.utils.contains('DISTRO_FEATURES', 'dispmanx', 'dispmanx', '', d)} \
32 drm-gles2 \
33 "
Patrick Williamsb48b7b42016-08-17 15:04:38 -050034
35PACKAGECONFIG[x11-gl] = ",,virtual/libgl virtual/libx11"
36PACKAGECONFIG[x11-gles2] = ",,virtual/libgles2 virtual/libx11"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080037PACKAGECONFIG[drm-gl] = ",,virtual/libgl libdrm virtual/libgbm"
38PACKAGECONFIG[drm-gles2] = ",,virtual/libgles2 libdrm virtual/libgbm"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050039PACKAGECONFIG[wayland-gl] = ",,virtual/libgl wayland"
40PACKAGECONFIG[wayland-gles2] = ",,virtual/libgles2 wayland"
Andrew Geissler8fc454f2020-12-11 16:27:59 -060041PACKAGECONFIG[dispmanx] = ",,virtual/libgles2 virtual/libx11"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050042
43python __anonymous() {
Brad Bishop6e60e8b2018-02-01 10:27:11 -050044 packageconfig = (d.getVar("PACKAGECONFIG") or "").split()
Patrick Williamsb48b7b42016-08-17 15:04:38 -050045 flavors = []
46 if "x11-gles2" in packageconfig:
47 flavors.append("x11-glesv2")
48 if "x11-gl" in packageconfig:
49 flavors.append("x11-gl")
50 if "wayland-gles2" in packageconfig:
51 flavors.append("wayland-glesv2")
52 if "wayland-gl" in packageconfig:
53 flavors.append("wayland-gl")
54 if "drm-gles2" in packageconfig:
55 flavors.append("drm-glesv2")
56 if "drm-gl" in packageconfig:
57 flavors.append("drm-gl")
Andrew Geissler8fc454f2020-12-11 16:27:59 -060058 if "dispmanx" in packageconfig:
59 flavors = ["dispmanx-glesv2"]
Patrick Williamsb48b7b42016-08-17 15:04:38 -050060 if flavors:
61 d.appendVar("EXTRA_OECONF", " --with-flavors=%s" % ",".join(flavors))
62}
Patrick Williamsddad1a12017-02-23 20:36:32 -060063