diff options
| author | Sughosha <sughosha@disroot.org> | 2026-05-19 18:13:01 +0530 |
|---|---|---|
| committer | Nguyễn Gia Phong <cnx@loang.net> | 2026-07-22 12:20:07 +0900 |
| commit | 9a8fc83adcc1dfa53410e95a4f9ac59030658d31 (patch) | |
| tree | 1e8d6568ee5ce93e56614aaab1af6a8ba6c22c02 | |
| parent | d34cc4756a5f20c77c37375caf167c5266afa430 (diff) | |
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.
Merges: https://codeberg.org/guix/guix/pulls/8719
Signed-off-by: Nguyễn Gia Phong <cnx@loang.net>
| -rw-r--r-- | gnu/packages/image.scm | 60 |
1 files changed, 46 insertions, 14 deletions
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 04bdf7141db..4cb55e7c99b 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm | |||
| @@ -3013,30 +3013,29 @@ by AOM, including with alpha.") | |||
| 3013 | Format) file format decoder and encoder.") | 3013 | Format) file format decoder and encoder.") |
| 3014 | (license license:lgpl3+))) | 3014 | (license license:lgpl3+))) |
| 3015 | 3015 | ||
| 3016 | (define libjxl-testdata | ||
| 3017 | (origin | ||
| 3018 | (method git-fetch) | ||
| 3019 | (uri (git-reference | ||
| 3020 | (url "https://github.com/libjxl/testdata") | ||
| 3021 | (commit "ff8d743aaba05b3014f17e5475e576242fa979fc"))) | ||
| 3022 | (sha256 | ||
| 3023 | (base32 "05nba2h0m74n5f9jzl3vzvnj74fj3si09ncwk2dqg41qdc49d1ng")))) | ||
| 3024 | |||
| 3016 | (define-public libjxl | 3025 | (define-public libjxl |
| 3017 | (package | 3026 | (package |
| 3018 | (name "libjxl") | 3027 | (name "libjxl") |
| 3019 | (version "0.11.1") | 3028 | (version "0.11.2") |
| 3020 | (outputs (list "out" "pixbuf-loader")) | 3029 | (outputs (list "out" "pixbuf-loader")) |
| 3021 | (source | 3030 | (source |
| 3022 | (origin | 3031 | (origin |
| 3023 | (method git-fetch) | 3032 | (method git-fetch) |
| 3024 | (uri (git-reference | 3033 | (uri (git-reference |
| 3025 | (url "https://github.com/libjxl/libjxl") | 3034 | (url "https://github.com/libjxl/libjxl") |
| 3026 | (commit (string-append "v" version)) | 3035 | (commit (string-append "v" version)))) |
| 3027 | (recursive? #t))) | ||
| 3028 | (file-name (git-file-name name version)) | 3036 | (file-name (git-file-name name version)) |
| 3029 | (sha256 | 3037 | (sha256 |
| 3030 | (base32 "1wfxzrhj8a19z6x47ib1qbmgyg56jsxjs955xcvqhdkrx8l2271r")) | 3038 | (base32 "0a6fg2v81rqsbrzi97x1d7wadcikh2fizr64rsza668cwvsk631q")))) |
| 3031 | (modules '((guix build utils))) | ||
| 3032 | (snippet | ||
| 3033 | ;; Delete the bundles that will not be used. | ||
| 3034 | '(begin | ||
| 3035 | (for-each (lambda (directory) | ||
| 3036 | (delete-file-recursively | ||
| 3037 | (string-append "third_party/" directory))) | ||
| 3038 | '("brotli" "googletest" "highway" "lcms" "libjpeg-turbo" | ||
| 3039 | "libpng" "zlib")))))) | ||
| 3040 | (build-system cmake-build-system) | 3039 | (build-system cmake-build-system) |
| 3041 | (arguments | 3040 | (arguments |
| 3042 | (list | 3041 | (list |
| @@ -3065,6 +3064,32 @@ Format) file format decoder and encoder.") | |||
| 3065 | (("8\\.7e-4") "8.7e-3")))))) | 3064 | (("8\\.7e-4") "8.7e-3")))))) |
| 3066 | (#t | 3065 | (#t |
| 3067 | #~())) | 3066 | #~())) |
| 3067 | (add-after 'unpack 'patch-dependencies | ||
| 3068 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 3069 | (with-directory-excursion "third_party" | ||
| 3070 | ;; HACK: Create dummy files to pretend the bundled sjpeg and | ||
| 3071 | ;; skcms exist. | ||
| 3072 | (apply invoke "touch" | ||
| 3073 | '("sjpeg/CMakeLists.txt" | ||
| 3074 | "sjpeg/COPYING" | ||
| 3075 | "skcms/skcms.h" | ||
| 3076 | "skcms/LICENSE")) | ||
| 3077 | (substitute* "CMakeLists.txt" | ||
| 3078 | (("include\\(skcms\\.cmake\\)") | ||
| 3079 | "find_library(SKCMS_LIB NAMES skcms REQUIRED)") | ||
| 3080 | (("include\\(sjpeg\\.cmake\\)") | ||
| 3081 | "find_package(sjpeg REQUIRED)"))) | ||
| 3082 | (with-directory-excursion "lib" | ||
| 3083 | (substitute* "jxl_cms.cmake" | ||
| 3084 | (("target_link_skcms\\(jxl_cms\\)") | ||
| 3085 | "target_link_libraries(jxl_cms PRIVATE ${SKCMS_LIB})")) | ||
| 3086 | (substitute* "jxl_extras.cmake" | ||
| 3087 | (("\\.\\.\\/third_party\\/sjpeg\\/src") | ||
| 3088 | (dirname (search-input-file inputs "src/sjpegi.h"))))))) | ||
| 3089 | (add-after 'unpack 'unpack-testdata | ||
| 3090 | (lambda _ | ||
| 3091 | (rmdir "testdata") | ||
| 3092 | (copy-recursively #$libjxl-testdata "testdata"))) | ||
| 3068 | (add-after 'install 'split | 3093 | (add-after 'install 'split |
| 3069 | (lambda _ | 3094 | (lambda _ |
| 3070 | (for-each | 3095 | (for-each |
| @@ -3077,7 +3102,12 @@ Format) file format decoder and encoder.") | |||
| 3077 | '("/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jxl.so" | 3102 | '("/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jxl.so" |
| 3078 | "/share/thumbnailers/jxl.thumbnailer"))))))) | 3103 | "/share/thumbnailers/jxl.thumbnailer"))))))) |
| 3079 | (native-inputs | 3104 | (native-inputs |
| 3080 | (list asciidoc doxygen googletest pkg-config python)) | 3105 | (list asciidoc |
| 3106 | doxygen | ||
| 3107 | googletest | ||
| 3108 | pkg-config | ||
| 3109 | python | ||
| 3110 | (package-source sjpeg))) ;for sjpegi.h | ||
| 3081 | (inputs | 3111 | (inputs |
| 3082 | (list freeglut | 3112 | (list freeglut |
| 3083 | gdk-pixbuf | 3113 | gdk-pixbuf |
| @@ -3090,6 +3120,8 @@ Format) file format decoder and encoder.") | |||
| 3090 | libpng | 3120 | libpng |
| 3091 | libwebp | 3121 | libwebp |
| 3092 | openexr | 3122 | openexr |
| 3123 | sjpeg | ||
| 3124 | skcms | ||
| 3093 | zlib)) | 3125 | zlib)) |
| 3094 | ;; These are in Requires.private of libjxl.pc. | 3126 | ;; These are in Requires.private of libjxl.pc. |
| 3095 | (propagated-inputs | 3127 | (propagated-inputs |
