blob: 2a3e74f0254e98f684be3efa52308d080fc1c3ad [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
Andrew Geissler9aee5002022-03-30 16:27:02 +00007LICENSE = "GPL-3.0-or-later & SGI-1"
Patrick Williamsb48b7b42016-08-17 15:04:38 -05008LIC_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"
Patrick Williams213cb262021-08-07 19:21:33 -050012DEPENDS:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland-native wayland-protocols', '', d)}"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050013
Andrew Geissler595f6302022-01-24 19:11:47 +000014PV = "2021.12"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050015
Andrew Geissler8fc454f2020-12-11 16:27:59 -060016SRC_URI = " \
Andrew Geissler595f6302022-01-24 19:11:47 +000017 git://github.com/glmark2/glmark2.git;protocol=https;branch=master \
Andrew Geissler8fc454f2020-12-11 16:27:59 -060018 file://0001-fix-dispmanx-build.patch \
19 file://0002-run-dispmanx-fullscreen.patch \
Patrick Williams03907ee2022-05-01 06:28:52 -050020 file://0001-libmatrix-Include-missing-utility-header.patch \
Andrew Geissler615f2f12022-07-15 14:00:58 -050021"
Andrew Geissler595f6302022-01-24 19:11:47 +000022SRCREV = "0858b450cd88c84a15b99dda9698d44e7f7e8c70"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050023
24S = "${WORKDIR}/git"
25
Andrew Geissler615f2f12022-07-15 14:00:58 -050026inherit meson pkgconfig features_check
Brad Bishopd7bf8c12018-02-25 22:55:05 -050027
Andrew Geissler8fc454f2020-12-11 16:27:59 -060028ANY_OF_DISTRO_FEATURES = "opengl dispmanx"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050029
Andrew Geissler748a4832020-07-24 16:24:21 -050030PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11-gles2', '', d)} \
31 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland opengl', 'wayland-gles2', '', d)} \
Andrew Geissler8fc454f2020-12-11 16:27:59 -060032 ${@bb.utils.contains('DISTRO_FEATURES', 'dispmanx', 'dispmanx', '', d)} \
33 drm-gles2 \
34 "
Patrick Williamsb48b7b42016-08-17 15:04:38 -050035
36PACKAGECONFIG[x11-gl] = ",,virtual/libgl virtual/libx11"
37PACKAGECONFIG[x11-gles2] = ",,virtual/libgles2 virtual/libx11"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080038PACKAGECONFIG[drm-gl] = ",,virtual/libgl libdrm virtual/libgbm"
39PACKAGECONFIG[drm-gles2] = ",,virtual/libgles2 libdrm virtual/libgbm"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050040PACKAGECONFIG[wayland-gl] = ",,virtual/libgl wayland"
41PACKAGECONFIG[wayland-gles2] = ",,virtual/libgles2 wayland"
Andrew Geissler8fc454f2020-12-11 16:27:59 -060042PACKAGECONFIG[dispmanx] = ",,virtual/libgles2 virtual/libx11"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050043
44python __anonymous() {
Brad Bishop6e60e8b2018-02-01 10:27:11 -050045 packageconfig = (d.getVar("PACKAGECONFIG") or "").split()
Patrick Williamsb48b7b42016-08-17 15:04:38 -050046 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")
Andrew Geissler8fc454f2020-12-11 16:27:59 -060059 if "dispmanx" in packageconfig:
60 flavors = ["dispmanx-glesv2"]
Patrick Williamsb48b7b42016-08-17 15:04:38 -050061 if flavors:
Andrew Geissler615f2f12022-07-15 14:00:58 -050062 d.appendVar("EXTRA_OEMESON", " -Dflavors=%s" % ",".join(flavors))
Patrick Williamsb48b7b42016-08-17 15:04:38 -050063}
Patrick Williamsddad1a12017-02-23 20:36:32 -060064