1LICENSE = "Apache-2.0" 2LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" 3 4SRC_URI = "git://github.com/KhronosGroup/VK-GL-CTS.git;protocol=https;name=vk-gl-cts;nobranch=1 \ 5 file://0001-cmake-Define-WAYLAND_SCANNER-and-WAYLAND_PROTOCOLS_D.patch \ 6 file://0001-use-library-sonames-for-linking.patch \ 7 file://generate-srcuri.py \ 8 " 9 10SRC_URI:append:libc-musl = "file://fix-musl.patch" 11SRC_URI:append:toolchain-clang = "file://fix-clang-private-operator.patch" 12 13SRCREV_FORMAT = "vk-gl-cts" 14 15S = "${WORKDIR}/git" 16 17inherit pkgconfig cmake cmake-qemu features_check python3native 18 19UPSTREAM_CHECK_GITTAGREGEX = "${BPN}-(?P<pver>\d+(\.\d+)+)" 20 21ANY_OF_DISTRO_FEATURES += "opengl vulkan" 22 23DEPENDS += "python3-lxml-native libpng zlib virtual/libgles2 qemu-native" 24DEPENDS:append:libc-musl = " libexecinfo" 25 26EXTRA_OECMAKE += "-DAMBER_DISABLE_WERROR=ON \ 27 -DUPDATE_DEPS_DIR=${S}/external/validation/ \ 28 -DWAYLAND_SCANNER=${STAGING_BINDIR_NATIVE}/wayland-scanner \ 29 -DWAYLAND_PROTOCOLS_DIR=${STAGING_DATADIR}/wayland-protocols" 30 31# The best thing for the user to do is to not specify any of the following 32# PACKAGECONFIGs (i.e. leave it blank) which tells the project to do its own 33# probing and build what it thinks is appropriate. 34# However, if you want, you can specify one of the following PACKAGECONFIGs 35# to override this behaviour. 36PACKAGECONFIG ??= "" 37PACKAGECONFIG[surfaceless] = "-DDEQP_TARGET=surfaceless,,,,,wayland x11_egl x11_glx x11_egl_glx" 38PACKAGECONFIG[wayland] = "-DDEQP_TARGET=wayland,,wayland-native wayland wayland-protocols,,,surfaceless x11_egl x11_glx x11_egl_glx" 39PACKAGECONFIG[x11_egl] = "-DDEQP_TARGET=x11_egl,,virtual/libx11 virtual/egl,,,surfaceless wayland x11_glx x11_egl_glx" 40PACKAGECONFIG[x11_glx] = "-DDEQP_TARGET=x11_glx,,virtual/libx11,,,surfaceless wayland x11_egl x11_egl_glx" 41PACKAGECONFIG[x11_egl_glx] = "-DDEQP_TARGET=x11_glx,,virtual/libx11 virtual/egl,,,surfaceless wayland x11_egl x11_glx" 42 43python __anonymous() { 44 # if the user doesn't specify any PACKAGECONFIG then the cts build system 45 # is going to probe the sysroot to try to figure out what to build 46 # in this case we try to guess whether the user is building for wayland 47 # or x11 and add the required dependencies automatically 48 distrofeatures = (d.getVar("DISTRO_FEATURES") or "") 49 if not bb.utils.contains_any("PACKAGECONFIG", ["surfaceless", "wayland", "x11_egl", "x11_glx", "x11_egl_glx"], True, False, d): 50 if "wayland" in distrofeatures: 51 d.appendVar("DEPENDS", " wayland-native ${MLPREFIX}wayland ${MLPREFIX}wayland-protocols") 52 if "x11" in distrofeatures: 53 d.appendVar("DEPENDS", " virtual/${MLPREFIX}libx11 virtual/${MLPREFIX}egl ") 54} 55 56CTSDIR = "/usr/lib/${BPN}" 57 58FILES:${PN} += "${CTSDIR}" 59 60# does not work with libc++-19 due 61# error: implicit instantiation of undefined template 'std::char_traits<unsigned int>' 62TOOLCHAIN = "gcc" 63 64# Prototype task to refresh the generated SRC_URI entries by parsing 65# the files in the source tree and writing a BPN-sources.inc file. 66do_refresh_srcuri() { 67 ${UNPACKDIR}/generate-srcuri.py ${PV} ${S}/external/ \ 68 > ${THISDIR}/${BPN}-sources.inc 69 # Don't convert ${S}/external/vulkan-validationlayers/src/scripts/known_good.json as we 70 # currently build without validation 71} 72 73addtask refresh_srcuri after do_patch 74do_refresh_srcuri[network] = "1" 75do_refresh_srcuri[nostamp] = "1" 76