guix_mirror_bot pushed a commit to branch misc-world-rebuild in repository guix.
commit 2f08a313fd47910c90788b37ae5f22f50f40449f Author: Sughosha <[email protected]> AuthorDate: Tue May 19 18:13:01 2026 +0530 gnu: libjxl: Update to 0.11.2. * gnu/packages/image.scm (libjxl): Update to 0.11.2. [source]: Do not fetch recursively. Remove snippet. [arguments]<#:phases>: Add patch-dependencies and unpack-testdata. [native-inputs]: Add (package-source sjpeg). [inputs]: Add sjpeg and skcms. Change-Id: I13840de4fb111547ce6fd4e136ecfa9fd316fb06 Merges: https://codeberg.org/guix/guix/pulls/8719 Signed-off-by: Nguyễn Gia Phong <[email protected]> --- gnu/packages/image.scm | 60 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 46 insertions(+), 14 deletions(-) diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 21675507f1..05774214e1 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -2987,30 +2987,29 @@ by AOM, including with alpha.") Format) file format decoder and encoder.") (license license:lgpl3+))) +(define libjxl-testdata + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/libjxl/testdata") + (commit "ff8d743aaba05b3014f17e5475e576242fa979fc"))) + (sha256 + (base32 "05nba2h0m74n5f9jzl3vzvnj74fj3si09ncwk2dqg41qdc49d1ng")))) + (define-public libjxl (package (name "libjxl") - (version "0.11.1") + (version "0.11.2") (outputs (list "out" "pixbuf-loader")) (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/libjxl/libjxl") - (commit (string-append "v" version)) - (recursive? #t))) + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1wfxzrhj8a19z6x47ib1qbmgyg56jsxjs955xcvqhdkrx8l2271r")) - (modules '((guix build utils))) - (snippet - ;; Delete the bundles that will not be used. - '(begin - (for-each (lambda (directory) - (delete-file-recursively - (string-append "third_party/" directory))) - '("brotli" "googletest" "highway" "lcms" "libjpeg-turbo" - "libpng" "zlib")))))) + (base32 "0a6fg2v81rqsbrzi97x1d7wadcikh2fizr64rsza668cwvsk631q")))) (build-system cmake-build-system) (arguments (list @@ -3039,6 +3038,32 @@ Format) file format decoder and encoder.") (("8\\.7e-4") "8.7e-3")))))) (#t #~())) + (add-after 'unpack 'patch-dependencies + (lambda* (#:key inputs #:allow-other-keys) + (with-directory-excursion "third_party" + ;; HACK: Create dummy files to pretend the bundled sjpeg and + ;; skcms exist. + (apply invoke "touch" + '("sjpeg/CMakeLists.txt" + "sjpeg/COPYING" + "skcms/skcms.h" + "skcms/LICENSE")) + (substitute* "CMakeLists.txt" + (("include\\(skcms\\.cmake\\)") + "find_library(SKCMS_LIB NAMES skcms REQUIRED)") + (("include\\(sjpeg\\.cmake\\)") + "find_package(sjpeg REQUIRED)"))) + (with-directory-excursion "lib" + (substitute* "jxl_cms.cmake" + (("target_link_skcms\\(jxl_cms\\)") + "target_link_libraries(jxl_cms PRIVATE ${SKCMS_LIB})")) + (substitute* "jxl_extras.cmake" + (("\\.\\.\\/third_party\\/sjpeg\\/src") + (dirname (search-input-file inputs "src/sjpegi.h"))))))) + (add-after 'unpack 'unpack-testdata + (lambda _ + (rmdir "testdata") + (copy-recursively #$libjxl-testdata "testdata"))) (add-after 'install 'split (lambda _ (for-each @@ -3051,7 +3076,12 @@ Format) file format decoder and encoder.") '("/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jxl.so" "/share/thumbnailers/jxl.thumbnailer"))))))) (native-inputs - (list asciidoc doxygen googletest pkg-config python)) + (list asciidoc + doxygen + googletest + pkg-config + python + (package-source sjpeg))) ;for sjpegi.h (inputs (list freeglut gdk-pixbuf @@ -3064,6 +3094,8 @@ Format) file format decoder and encoder.") libpng libwebp openexr + sjpeg + skcms zlib)) ;; These are in Requires.private of libjxl.pc. (propagated-inputs
