blob: 6e9b95e1e264a5966a2980e88710a0b959c31cc8 [file] [log] [blame]
Andrew Geissler78b72792022-06-14 06:47:25 -05001SUMMARY = "Mesa demo applications"
2DESCRIPTION = "This package includes the demonstration application, such as glxgears. \
3These applications can be used for Mesa validation and benchmarking."
4HOMEPAGE = "http://mesa3d.org"
5BUGTRACKER = "https://bugs.freedesktop.org"
6SECTION = "x11"
7
8LICENSE = "MIT & PD"
9LIC_FILES_CHKSUM = "file://src/xdemos/glxgears.c;beginline=1;endline=20;md5=914225785450eff644a86c871d3ae00e \
10 file://src/xdemos/glxdemo.c;beginline=1;endline=8;md5=b01d5ab1aee94d35b7efaa2ef48e1a06"
11
12SRC_URI = "https://mesa.freedesktop.org/archive/demos/${PV}/${BPN}-${PV}.tar.bz2 \
13 file://0001-mesa-demos-Add-missing-data-files.patch \
14 file://0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch \
15 "
16SRC_URI[sha256sum] = "cea2df0a80f09a30f635c4eb1a672bf90c5ddee0b8e77f4d70041668ef71aac1"
17
18inherit meson pkgconfig features_check
19# depends on virtual/egl, virtual/libgl ...
20REQUIRED_DISTRO_FEATURES = "opengl x11"
21
22EXTRA_OEMESON = "-Dwith-system-data-files=true"
23
24PACKAGECONFIG ?= "drm egl gles1 gles2 \
25 ${@bb.utils.filter('DISTRO_FEATURES', 'x11 wayland', d)}"
26
27PACKAGECONFIG[drm] = "-Dlibdrm=enabled,-Dlibdrm=disabled,libdrm"
28PACKAGECONFIG[egl] = "-Degl=enabled,-Degl=disabled,virtual/egl"
29PACKAGECONFIG[gles1] = "-Dgles1=enabled,-Dgles1=disabled,virtual/libgles1"
30PACKAGECONFIG[gles2] = "-Dgles2=enabled,-Dgles2=disabled,virtual/libgles2"
31PACKAGECONFIG[glut] = "-Dwith-glut=${STAGING_EXECPREFIXDIR},,freeglut"
32PACKAGECONFIG[osmesa] = "-Dosmesa=enabled,-Dosmesa=disabled,"
33PACKAGECONFIG[wayland] = "-Dwayland=enabled,-Dwayland=disabled,virtual/libgl wayland wayland-native"
34PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,virtual/libx11 libglu"
35
36do_install:append() {
37 # it can be completely empty when all PACKAGECONFIG options are disabled
38 rmdir --ignore-fail-on-non-empty ${D}${bindir}
39
40 if [ -f ${D}${bindir}/clear ]; then
41 mv ${D}${bindir}/clear ${D}${bindir}/clear.mesa-demos
42 fi
43}