aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorTrevor Woerner <twoerner@gmail.com>2021-09-23 17:39:41 -0400
committerKhem Raj <raj.khem@gmail.com>2021-09-24 08:12:36 -0700
commitacb8fa6989ae9e4dfcce89de0e198599cc1ec881 (patch)
treef04086c1d5a08c9f708aa40ade6f8875e267f47d /meta-oe
parent27857a94d8ad1c8757db167be8ddb58084de6513 (diff)
downloadmeta-openembedded-contrib-acb8fa6989ae9e4dfcce89de0e198599cc1ec881.tar.gz
meta-openembedded-contrib-acb8fa6989ae9e4dfcce89de0e198599cc1ec881.tar.bz2
meta-openembedded-contrib-acb8fa6989ae9e4dfcce89de0e198599cc1ec881.zip
vk-gl-cts: allow the user to specify the target
When building opengl-es-cts (for example), instead of hard-coding a specific target to build (surfaceless), leave the choice empty by default which instructs the package's build system to search the sysroot and try to determine which target to use (i.e. the "Default" target). Provide overrides (in the form of PACAKGECONFIGs) to allow the user to specify a specific target to build (if they don't want the target selected automatically). Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc29
1 files changed, 26 insertions, 3 deletions
diff --git a/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc b/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc
index f619214731..881d6ca829 100644
--- a/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc
+++ b/meta-oe/recipes-graphics/vk-gl-cts/khronos-cts.inc
@@ -18,9 +18,9 @@ S = "${WORKDIR}/git"
inherit pkgconfig cmake features_check
-REQUIRED_DISTRO_FEATURES += "opengl"
+ANY_OF_DISTRO_FEATURES += "opengl wayland"
-DEPENDS += "libpng zlib virtual/libgles2 virtual/egl"
+DEPENDS += "libpng zlib virtual/libgles2"
SRC_URI += "file://0001-Workaround-for-GCC-11-uninit-variable-warnings-946.patch;patchdir=external/amber/src \
file://0001-Include-limits-header-for-numeric_limits.patch;patchdir=external/vulkancts \
@@ -36,7 +36,30 @@ SRC_URI:append:toolchain-clang = "\
file://fix-clang-private-operator.patch \
"
-EXTRA_OECMAKE:append = " -DDEQP_TARGET=surfaceless"
+# The best thing for the user to do is to not specify any of the following
+# PACKAGECONFIGs (i.e. leave it blank) which tells the project to do its own
+# probing and build what it thinks is appropriate.
+# However, if you want, you can specify one of the following PACKAGECONFIGs
+# to override this behaviour.
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[surfaceless] = "-DDEQP_TARGET=surfaceless,,,,,wayland x11_egl x11_glx x11_egl_glx"
+PACKAGECONFIG[wayland] = "-DDEQP_TARGET=wayland,,wayland,,,surfaceless x11_egl x11_glx x11_egl_glx"
+PACKAGECONFIG[x11_egl] = "-DDEQP_TARGET=x11_egl,,virtual/libx11 virtual/egl,,,surfaceless wayland x11_glx x11_egl_glx"
+PACKAGECONFIG[x11_glx] = "-DDEQP_TARGET=x11_glx,,virtual/libx11,,,surfaceless wayland x11_egl x11_egl_glx"
+PACKAGECONFIG[x11_egl_glx] = "-DDEQP_TARGET=x11_glx,,virtual/libx11 virtual/egl,,,surfaceless wayland x11_egl x11_glx"
+
+python __anonymous() {
+ # if the user doesn't specify any PACKAGECONFIG then the cts build system
+ # is going to probe the sysroot to try to figure out what to build
+ # in this case we try to guess whether the user is building for wayland
+ # or x11 and add the required dependencies automatically
+ distrofeatures = (d.getVar("DISTRO_FEATURES") or "")
+ if not bb.utils.contains_any("PACKAGECONFIG", ["surfaceless", "wayland", "x11_egl", "x11_glx", "x11_egl_glx"], True, False, d):
+ if "wayland" in distrofeatures:
+ d.appendVar("DEPENDS", " wayland ")
+ if "x11" in distrofeatures:
+ d.appendVar("DEPENDS", " virtual/libx11 virtual/egl ")
+}
CTSDIR = "/usr/lib/${BPN}"