gnu: libjxl: Fix building on some architectures.

This is a follow-up to 9a8fb2cfc4.

* gnu/packages/image.scm (libjxl)[arguments]: Correctly add extra phases
when building for some architectures.

Change-Id: I09fc4980373509dabe12e414c13c2dd44fc4a734
This commit is contained in:
Efraim Flashner 2025-09-17 09:21:52 +03:00
parent 9a8fb2cfc4
commit 95dd640b7e
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -2703,18 +2703,18 @@ Format) file format decoder and encoder.")
(modify-phases %standard-phases
,@(cond
((target-riscv64?)
(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>"))))))
'((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>")))))))
((target-x86-32?)
(add-after 'unpack 'loosen-test-parameter
(lambda _
;; This test fails likely due to a floating point
;; rounding difference.
(substitute* "lib/jxl/color_management_test.cc"
(("8\\.7e-4") "8.7e-3")))))
'((add-after 'unpack 'loosen-test-parameter
(lambda _
;; This test fails likely due to a floating point
;; rounding difference.
(substitute* "lib/jxl/color_management_test.cc"
(("8\\.7e-4") "8.7e-3"))))))
(#t '()))
(add-after 'install 'split
(lambda* (#:key outputs #:allow-other-keys)