Subject: [PATCH] gnu: libaio: Fix cross-compilation.
From: Julien Lepiller <[email-masked]>
To: [email-masked]
Date: Thu, 6 Jan 2022 12:30:30 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Guix!

I saw a message on the unofficial #guix:matrix.org room about libaio
failing to build. Indeed, it uses %output and that doesn't exist in
cross-compilation context anymore. Here's a small patch to fix that. I
had to be careful not to change the package outside of
cross-compilation, since it has >5000 dependents, hence the ,(if ...)
statement.
From 160572309d022b4249cb41296864a0e1c32eae0a Mon Sep 17 00:00:00 2001
Message-Id: <[email-masked]>
From: Julien Lepiller <[email-masked]>
Date: Thu, 6 Jan 2022 11:48:16 +0100
Subject: [PATCH] gnu: libaio: Fix cross-compilation.

* gnu/packages/linux.scm (libaio)[arguments]: Do not use singular
%output.
---
 gnu/packages/linux.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 3daad494e1..438ced6a27 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -5225,7 +5225,9 @@ (define-public libaio
     (arguments
      `(#:make-flags
        (let ((target ,(%current-target-system)))
-         (list (string-append "prefix=" %output)
+         (list (string-append "prefix=" ,(if (%current-target-system)
+                                             `(assoc-ref %outputs "out")
+                                             '%output))
                (string-append
                 "CC=" (if target
                           (string-append (assoc-ref %build-inputs "cross-gcc")
-- 
2.34.0