summaryrefslogtreecommitdiff
path: root/gnu/packages/image.scm
diff options
context:
space:
mode:
authorVinicius Monego <monego@posteo.net>2021-12-27 00:28:41 +0000
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2021-12-30 01:02:09 +0100
commit04c7220bc11756e638f931370f539005177afab9 (patch)
tree79c1ec64a20d97ab9e918c6d7658e9bed858bd56 /gnu/packages/image.scm
parentf2059169039561ae3b676e50443c14077d1e03db (diff)
downloadguix-patches-04c7220bc11756e638f931370f539005177afab9.tar
guix-patches-04c7220bc11756e638f931370f539005177afab9.tar.gz
gnu: Add libjxl.
* gnu/packages/image.scm (libjxl): New variable. Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Diffstat (limited to 'gnu/packages/image.scm')
-rw-r--r--gnu/packages/image.scm53
1 files changed, 53 insertions, 0 deletions
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 16811623e6..6cf171a410 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -57,6 +57,7 @@
#:use-module (gnu packages boost)
#:use-module (gnu packages check)
#:use-module (gnu packages cmake)
+ #:use-module (gnu packages cpp)
#:use-module (gnu packages curl)
#:use-module (gnu packages compression)
#:use-module (gnu packages documentation)
@@ -2227,6 +2228,58 @@ by AOM, including with alpha.")
Format) file format decoder and encoder.")
(license license:lgpl3+)))
+(define-public libjxl
+ (package
+ (name "libjxl")
+ (version "0.6.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/libjxl/libjxl")
+ (commit (string-append "v" version))
+ (recursive? #t)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "17pvc5zgm9az5hfg2p80325f42w3dqspyb03iakrwg9x4n3vjckx"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Delete the bundles that will not be used. libjxl bundles LCMS
+ ;; which is in Guix but there is no option to use the system package.
+ ;; This option will be introduced after version 0.6.1 and then we
+ ;; probably won't need to download the submodules.
+ '(begin
+ (for-each (lambda (directory)
+ (delete-file-recursively
+ (string-append "third_party/" directory)))
+ '("brotli" "googletest" "highway"))))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:configure-flags
+ (list "-DJPEGXL_FORCE_SYSTEM_GTEST=true"
+ "-DJPEGXL_FORCE_SYSTEM_BROTLI=true"
+ ;; "-DJPEGXL_FORCE_SYSTEM_LCMS2=true" ; next version after 0.6.1
+ "-DJPEGXL_FORCE_SYSTEM_HWY=true")))
+ (native-inputs
+ (list asciidoc doxygen googletest pkg-config python))
+ (inputs
+ (list freeglut
+ giflib
+ google-brotli
+ google-highway
+ imath
+ ;; lcms ; next version after 0.6.1
+ libavif
+ libjpeg-turbo
+ libpng
+ libwebp
+ openexr))
+ (home-page "https://github.com/libjxl/libjxl")
+ (synopsis "JPEG XL image format reference implementation")
+ (description "This package contains a reference implementation of JPEG XL
+(encoder and decoder).")
+ (license license:bsd-3)))
+
(define-public mtpaint
(package
(name "mtpaint")