all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Vinicius Monego <monego@posteo.net>
To: 52813@debbugs.gnu.org
Cc: Vinicius Monego <monego@posteo.net>
Subject: [bug#52813] [PATCH 2/2] gnu: Add libjxl.
Date: Mon, 27 Dec 2021 00:28:41 +0000	[thread overview]
Message-ID: <20211227002841.1126644-2-monego@posteo.net> (raw)
In-Reply-To: <20211227002841.1126644-1-monego@posteo.net>

* gnu/packages/image.scm (libjxl): New variable.
---
 gnu/packages/image.scm | 55 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 16811623e6..a38e0a0bcc 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)
@@ -95,6 +96,7 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
@@ -2227,6 +2229,59 @@ 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
+     (list
+      #: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")
-- 
2.30.2





  reply	other threads:[~2021-12-27  0:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-27  0:26 [bug#52813] [PATCH 0/2] Add libjxl Vinicius Monego
2021-12-27  0:28 ` [bug#52813] [PATCH 1/2] gnu: Add google-highway Vinicius Monego
2021-12-27  0:28   ` Vinicius Monego [this message]
2021-12-30  0:03 ` bug#52813: [PATCH 0/2] Add libjxl Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211227002841.1126644-2-monego@posteo.net \
    --to=monego@posteo.net \
    --cc=52813@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.