Andrew Geissler | 78b7279 | 2022-06-14 06:47:25 -0500 | [diff] [blame] | 1 | SUMMARY = "Mesa demo applications" |
| 2 | DESCRIPTION = "This package includes the demonstration application, such as glxgears. \ |
| 3 | These applications can be used for Mesa validation and benchmarking." |
| 4 | HOMEPAGE = "http://mesa3d.org" |
| 5 | BUGTRACKER = "https://bugs.freedesktop.org" |
| 6 | SECTION = "x11" |
| 7 | |
| 8 | LICENSE = "MIT & PD" |
| 9 | LIC_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 | |
| 12 | SRC_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 | " |
| 16 | SRC_URI[sha256sum] = "cea2df0a80f09a30f635c4eb1a672bf90c5ddee0b8e77f4d70041668ef71aac1" |
| 17 | |
| 18 | inherit meson pkgconfig features_check |
| 19 | # depends on virtual/egl, virtual/libgl ... |
| 20 | REQUIRED_DISTRO_FEATURES = "opengl x11" |
| 21 | |
| 22 | EXTRA_OEMESON = "-Dwith-system-data-files=true" |
| 23 | |
| 24 | PACKAGECONFIG ?= "drm egl gles1 gles2 \ |
| 25 | ${@bb.utils.filter('DISTRO_FEATURES', 'x11 wayland', d)}" |
| 26 | |
| 27 | PACKAGECONFIG[drm] = "-Dlibdrm=enabled,-Dlibdrm=disabled,libdrm" |
| 28 | PACKAGECONFIG[egl] = "-Degl=enabled,-Degl=disabled,virtual/egl" |
| 29 | PACKAGECONFIG[gles1] = "-Dgles1=enabled,-Dgles1=disabled,virtual/libgles1" |
| 30 | PACKAGECONFIG[gles2] = "-Dgles2=enabled,-Dgles2=disabled,virtual/libgles2" |
| 31 | PACKAGECONFIG[glut] = "-Dwith-glut=${STAGING_EXECPREFIXDIR},,freeglut" |
| 32 | PACKAGECONFIG[osmesa] = "-Dosmesa=enabled,-Dosmesa=disabled," |
| 33 | PACKAGECONFIG[wayland] = "-Dwayland=enabled,-Dwayland=disabled,virtual/libgl wayland wayland-native" |
| 34 | PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,virtual/libx11 libglu" |
| 35 | |
| 36 | do_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 | } |