From patchwork Mon Dec 27 00:28:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinicius Monego X-Patchwork-Id: 35675 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9409F27BBEA; Mon, 27 Dec 2021 00:30:29 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 517C827BBE9 for ; Mon, 27 Dec 2021 00:30:29 +0000 (GMT) Received: from localhost ([::1]:43568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n1duG-0001wm-GM for patchwork@mira.cbaines.net; Sun, 26 Dec 2021 19:30:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36830) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n1dtr-0001vt-8k for guix-patches@gnu.org; Sun, 26 Dec 2021 19:30:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:58587) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n1dtq-00037h-Vt for guix-patches@gnu.org; Sun, 26 Dec 2021 19:30:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n1dtq-0006QH-TY for guix-patches@gnu.org; Sun, 26 Dec 2021 19:30:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52813] [PATCH 2/2] gnu: Add libjxl. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 27 Dec 2021 00:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52813 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52813@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 52813-submit@debbugs.gnu.org id=B52813.164056494724574 (code B ref 52813); Mon, 27 Dec 2021 00:30:02 +0000 Received: (at 52813) by debbugs.gnu.org; 27 Dec 2021 00:29:07 +0000 Received: from localhost ([127.0.0.1]:41899 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1dsx-0006OC-Bx for submit@debbugs.gnu.org; Sun, 26 Dec 2021 19:29:07 -0500 Received: from mout02.posteo.de ([185.67.36.66]:47099) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n1dst-0006NM-Vf for 52813@debbugs.gnu.org; Sun, 26 Dec 2021 19:29:04 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 622F9240101 for <52813@debbugs.gnu.org>; Mon, 27 Dec 2021 01:28:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1640564938; bh=kx+grOVgu5Xf36g9OlzLhwMdVoHKvfVu+Oj9f2yM+ik=; h=From:To:Cc:Subject:Date:From; b=NhHrpnLLxXkvl4NWbdvblxylB98EYggBrCC54yAvTRP+P+fpT3ZifIjuv2PGkUtfk 5waMWBRm1oFTQ913WKj0aCBSz7Bx2W0QdNLxOVCkKExyKqWZnjAO7gGhbZ4IljLq4h 4oEUCQsd+I5zp8IsktwohVKSWcdQeC6CTGbgzMW7waHIcP9TGpQzdGT+U9cwelGYPP pHKHheAqDkS1xP5pQ3bj4ZDlsi8eZNpmaaHdOn/Hw8XHv1ApaS9OkbDsS9rwThYwEL LJScqapV5FLXA0udBzhBWR1w2eTm4wZh3DurUM+MBiGuRj7AnUyFsCUxOupC22sZg6 2XvqSRwBImdIA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4JMdnj2kVNz9rxF; Mon, 27 Dec 2021 01:28:56 +0100 (CET) From: Vinicius Monego Date: Mon, 27 Dec 2021 00:28:41 +0000 Message-Id: <20211227002841.1126644-2-monego@posteo.net> In-Reply-To: <20211227002841.1126644-1-monego@posteo.net> References: <20211227002841.1126644-1-monego@posteo.net> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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")