efraim pushed a commit to branch master
in repository guix.

commit 9142c50c6db0e84b165d732b60693edf8fae500e
Author: Zheng Junjie <zhengjun...@iscas.ac.cn>
AuthorDate: Tue Dec 26 20:43:18 2023 +0800

    gnu: libjxl: Fix build on riscv64-linux.
    
    * gnu/packages/image.scm (libjxl)
    [arguments]: Add fix-atomic phase when target riscv64-linux.
    
    Change-Id: I442c668c3d52c241f0d405f51ea8d995bfefd3fd
    Signed-off-by: Efraim Flashner <efr...@flashner.co.il>
---
 gnu/packages/image.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 6accf68ef0..58476c52a8 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -2606,7 +2606,16 @@ Format) file format decoder and encoder.")
              "-DJPEGXL_FORCE_SYSTEM_BROTLI=true"
              "-DJPEGXL_FORCE_SYSTEM_LCMS2=true"
              "-DJPEGXL_FORCE_SYSTEM_HWY=true"
-             "-DJPEGXL_BUNDLE_LIBPNG=false")))
+             "-DJPEGXL_BUNDLE_LIBPNG=false")
+       ,@(if (target-riscv64?)
+             '(#:phases
+               (modify-phases %standard-phases
+                 (add-after 'unpack 'fix-atomic
+                   (lambda _
+                     (substitute* "lib/jxl/enc_xyb.cc"
+                       (("#include \"lib/jxl/enc_xyb.h\"" a)
+                        (string-append a "\n#include <atomic>")))))))
+             '())))
     (native-inputs
      (list asciidoc doxygen googletest pkg-config python))
     (inputs

Reply via email to