Subject: [PATCH] gnu: vulkan-loader: Fix cross-compiling.
From: Zheng Junjie <[email-masked]>
To: [email-masked]
Date: Sat, 30 Dec 2023 13:31:36 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

gnu/packages/vulkan.scm(vulkan-loader):
[arguments]<#:configure-flags>: When cross-compiling, set -DBUILD_TESTS=OFF
and -DUSE_GAS=OFF.
[inputs]: Add libxrandr.

Change-Id: I580e1c77c4b9b5a3483e93ff9eda78fbe07ec292
---
 gnu/packages/vulkan.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index ca771a30b1..285d6be7f5 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2021 Mathieu Othacehe <[email-masked]>
 ;;; Copyright © 2022 Kaelyn Takata <[email-masked]>
 ;;; Copyright © 2022 dan <[email-masked]>
+;;; Copyright © 2023 Zheng Junjie <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -270,7 +271,9 @@ (define-public vulkan-loader
                              (dirname (dirname
                                        (search-input-directory
                                         %build-inputs "include/vulkan"))))
-              "-DBUILD_TESTS=ON")
+              #$@(if (%current-target-system)
+                     #~("-DBUILD_TESTS=OFF" "-DUSE_GAS=OFF")
+                     #~("-DBUILD_TESTS=ON")))
        #:phases
        #~(modify-phases %standard-phases
            (add-after 'unpack 'fix-pkg-config-file
@@ -299,7 +302,7 @@ (define-public vulkan-loader
            python
            wayland))
     (inputs
-     (list vulkan-headers))
+     (list vulkan-headers libxrandr))
     (home-page
      "https://github.com/KhronosGroup/Vulkan-Loader")
     (synopsis "Khronos official ICD loader and validation layers for Vulkan")

base-commit: f76ca2b0e894c244d5011a32b30dee8fd874e322
-- 
2.41.0