Subject: [PATCH] gnu: vulkan-loader: Fix cross-compilation.

From: Zheng Junjie <[email-masked]>
Date: Sat, 3 Aug 2024 10:23:54 +0800

* gnu/packages/vulkan.scm (vulkan-loader)[arguments]<#:configure>: When
cross-compilation, set the PKG_CONFIG_EXECUTABLE variable.

Change-Id: Ie0466a64effa5c93f859ff872423f2403f23f5cb
---
 gnu/packages/vulkan.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index 25542c1e06..8aee673653 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -6,7 +6,7 @@
 ;;; Copyright © 2021 Mathieu Othacehe <[email-masked]>
 ;;; Copyright © 2022 Kaelyn Takata <[email-masked]>
 ;;; Copyright © 2022, 2024 dan <[email-masked]>
-;;; Copyright © 2023 Zheng Junjie <[email-masked]>
+;;; Copyright © 2023, 2024 Zheng Junjie <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -297,7 +297,11 @@ (define-public vulkan-loader
                                        (search-input-directory
                                         %build-inputs "include/vulkan"))))
               #$@(if (%current-target-system)
-                     #~("-DBUILD_TESTS=OFF" "-DUSE_GAS=OFF")
+                     #~("-DBUILD_TESTS=OFF" "-DUSE_GAS=OFF"
+                        (string-append "-DPKG_CONFIG_EXECUTABLE="
+                                       (search-input-file
+                                        %build-inputs
+                                        (string-append "bin/" #$(pkg-config-for-target)))))
                      #~("-DBUILD_TESTS=ON")))
        #:phases
        #~(modify-phases %standard-phases

base-commit: b20956651a53a8f23828fdeb6945e1a31e6997a8
-- 
2.45.2