blob: 01f4a572f82063e332b4ab2a327a85d47588cf59 [file] [log] [blame]
Andrew Geissler748a4832020-07-24 16:24:21 -05001LICENSE = "Apache-2.0"
2LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
3
4SRC_URI = "\
Andrew Geisslerd688a012020-09-18 13:36:00 -05005 git://github.com/KhronosGroup/VK-GL-CTS.git;protocol=https;name=vk-gl-cts;nobranch=1 \
Andrew Geissler748a4832020-07-24 16:24:21 -05006 git://github.com/google/amber;protocol=https;destsuffix=git/external/amber/src;name=amber;branch=main \
Andrew Geissler595f6302022-01-24 19:11:47 +00007 git://github.com/KhronosGroup/glslang.git;protocol=https;destsuffix=git/external/glslang/src;name=glslang;branch=master \
8 git://github.com/KhronosGroup/SPIRV-Headers.git;protocol=https;destsuffix=git/external/spirv-headers/src;name=spirv-headers;branch=master \
9 git://github.com/KhronosGroup/SPIRV-Tools.git;protocol=https;destsuffix=git/external/spirv-tools/src;name=spirv-tools;branch=master \
Andrew Geissler87f5cff2022-09-30 13:13:31 -050010 git://github.com/open-source-parsers/jsoncpp.git;protocol=https;destsuffix=git/external/jsoncpp/src;name=jsoncpp;branch=master \
11 git://github.com/KhronosGroup/Vulkan-Docs.git;protocol=https;destsuffix=git/external/vulkan-docs/src;name=vulkan-docs;branch=main \
12 https://raw.githubusercontent.com/baldurk/renderdoc/fcdea67879fa1991e56cf7734ce0ce27866b665f/renderdoc/api/app/renderdoc_app.h;subdir=git/external/renderdoc/src;name=renderdoc \
Andrew Geisslerc5535c92023-01-27 16:10:19 -060013 file://gen-framework-path.patch \
Andrew Geissler748a4832020-07-24 16:24:21 -050014"
15
16S = "${WORKDIR}/git"
17
Andrew Geissler87f5cff2022-09-30 13:13:31 -050018SRCREV_FORMAT = "vk-gl-cts_amber_glslang_spirv-headers_spirv-tools_jsoncpp_vulkan-docs"
Andrew Geissler748a4832020-07-24 16:24:21 -050019
20S = "${WORKDIR}/git"
21
Andrew Geissler87f5cff2022-09-30 13:13:31 -050022inherit pkgconfig cmake features_check python3native qemu
Andrew Geisslerbffdb3e2020-08-21 16:13:29 -050023
Andrew Geissler5199d832021-09-24 16:47:35 -050024ANY_OF_DISTRO_FEATURES += "opengl wayland"
Andrew Geissler748a4832020-07-24 16:24:21 -050025
Andrew Geissler87f5cff2022-09-30 13:13:31 -050026DEPENDS += "python3-lxml-native libpng zlib virtual/libgles2 qemu-native"
Andrew Geissler748a4832020-07-24 16:24:21 -050027
Andrew Geissler87f5cff2022-09-30 13:13:31 -050028SRC_URI += " \
Andrew Geisslerc5535c92023-01-27 16:10:19 -060029 file://0001-vulkancts-Include-missing-cstdint.patch \
Andrew Geissler5199d832021-09-24 16:47:35 -050030 file://0001-use-library-sonames-for-linking.patch \
Andrew Geisslerf103a7f2021-05-07 16:09:40 -050031"
32
Patrick Williams213cb262021-08-07 19:21:33 -050033SRC_URI:append:libc-musl = "\
Andrew Geissler748a4832020-07-24 16:24:21 -050034 file://fix-musl.patch \
35"
Patrick Williams213cb262021-08-07 19:21:33 -050036DEPENDS:append:libc-musl = " libexecinfo"
Andrew Geissler748a4832020-07-24 16:24:21 -050037
Patrick Williams213cb262021-08-07 19:21:33 -050038SRC_URI:append:toolchain-clang = "\
Andrew Geissler748a4832020-07-24 16:24:21 -050039 file://fix-clang-private-operator.patch \
40"
41
Andrew Geissler87f5cff2022-09-30 13:13:31 -050042EXTRA_OECMAKE:prepend:class-target = "-DCMAKE_CROSSCOMPILING_EMULATOR=${WORKDIR}/qemuwrapper -DWAYLAND_SCANNER=${STAGING_BINDIR_NATIVE}/wayland-scanner -DWAYLAND_PROTOCOLS_DIR=${STAGING_DATADIR}/wayland-protocols"
43
Andrew Geissler5199d832021-09-24 16:47:35 -050044# The best thing for the user to do is to not specify any of the following
45# PACKAGECONFIGs (i.e. leave it blank) which tells the project to do its own
46# probing and build what it thinks is appropriate.
47# However, if you want, you can specify one of the following PACKAGECONFIGs
48# to override this behaviour.
49PACKAGECONFIG ??= ""
50PACKAGECONFIG[surfaceless] = "-DDEQP_TARGET=surfaceless,,,,,wayland x11_egl x11_glx x11_egl_glx"
Andrew Geissler87f5cff2022-09-30 13:13:31 -050051PACKAGECONFIG[wayland] = "-DDEQP_TARGET=wayland,,wayland-native wayland wayland-protocols,,,surfaceless x11_egl x11_glx x11_egl_glx"
Andrew Geissler5199d832021-09-24 16:47:35 -050052PACKAGECONFIG[x11_egl] = "-DDEQP_TARGET=x11_egl,,virtual/libx11 virtual/egl,,,surfaceless wayland x11_glx x11_egl_glx"
53PACKAGECONFIG[x11_glx] = "-DDEQP_TARGET=x11_glx,,virtual/libx11,,,surfaceless wayland x11_egl x11_egl_glx"
54PACKAGECONFIG[x11_egl_glx] = "-DDEQP_TARGET=x11_glx,,virtual/libx11 virtual/egl,,,surfaceless wayland x11_egl x11_glx"
55
Andrew Geissler87f5cff2022-09-30 13:13:31 -050056do_configure:append() {
57 # Write out a qemu wrapper that will be used by cmake
58 # so that it can run target helper binaries through that.
59 qemu_binary="${@qemu_wrapper_cmdline(d, d.getVar('STAGING_DIR_HOST'), [d.expand('${STAGING_DIR_HOST}${libdir}'),d.expand('${STAGING_DIR_HOST}${base_libdir}')])}"
60 cat > ${WORKDIR}/qemuwrapper << EOF
61#!/bin/sh
62$qemu_binary "\$@"
63EOF
64 chmod +x ${WORKDIR}/qemuwrapper
65}
66
Andrew Geissler5199d832021-09-24 16:47:35 -050067python __anonymous() {
68 # if the user doesn't specify any PACKAGECONFIG then the cts build system
69 # is going to probe the sysroot to try to figure out what to build
70 # in this case we try to guess whether the user is building for wayland
71 # or x11 and add the required dependencies automatically
72 distrofeatures = (d.getVar("DISTRO_FEATURES") or "")
73 if not bb.utils.contains_any("PACKAGECONFIG", ["surfaceless", "wayland", "x11_egl", "x11_glx", "x11_egl_glx"], True, False, d):
74 if "wayland" in distrofeatures:
Andrew Geissler87f5cff2022-09-30 13:13:31 -050075 d.appendVar("DEPENDS", " wayland-native wayland wayland-protocols")
Andrew Geissler5199d832021-09-24 16:47:35 -050076 if "x11" in distrofeatures:
77 d.appendVar("DEPENDS", " virtual/libx11 virtual/egl ")
78}
Andrew Geissler748a4832020-07-24 16:24:21 -050079
80CTSDIR = "/usr/lib/${BPN}"
81
Patrick Williams213cb262021-08-07 19:21:33 -050082FILES:${PN} += "${CTSDIR}"