unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Famulari <leo@famulari.name>
To: 39616@debbugs.gnu.org
Subject: [bug#39616] [PATCH 2/2] gnu: Add libavif.
Date: Sat, 15 Feb 2020 13:32:30 -0500	[thread overview]
Message-ID: <a5a9d3b7af5bd4463c5a153a165d8029ebbff5a0.1581791549.git.leo@famulari.name> (raw)
In-Reply-To: <a8fcdfe13a434880c03e69ece4171472ef659429.1581791549.git.leo@famulari.name>

* gnu/packages/image.scm (libavif): New variable.
---
 gnu/packages/image.scm | 45 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 44 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index f9da1e9e89..e077b05215 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -7,7 +7,7 @@
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
 ;;; Copyright © 2015 Amirouche Boubekki <amirouche@hypermove.net>
 ;;; Copyright © 2014, 2017 John Darrington <jmd@gnu.org>
-;;; Copyright © 2016, 2017, 2018 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2016, 2017, 2018, 2020 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
@@ -72,6 +72,7 @@
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages qt)
+  #:use-module (gnu packages video)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
@@ -1844,3 +1845,45 @@ using only text tools.
 SNG is implemented by a compiler/decompiler called sng that
 losslessly translates between SNG and PNG.")
     (license license:zlib)))
+
+(define-public libavif
+  (package
+    (name "libavif")
+    (version "0.5.5")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/AOMediaCodec/libavif")
+                     (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0hb4izd2n3wb4vp8qhx542hdzwl74qrh0qnll6935n4f6ypq2gxq"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:configure-flags '("-DAVIF_CODEC_AOM=ON" "-DAVIF_CODEC_DAV1D=ON"
+                           "-DAVIF_CODEC_RAV1E=OFF" ; not packaged yet
+                           "-DAVIF_BUILD_TESTS=ON")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'install-readme
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (doc (string-append out "/share/doc/libavif-"
+                                        ,version)))
+               (install-file "../source/README.md" doc)))))
+;; The test suite runs tests for all supported codecs and fails because we don't
+;; have rav1e yet.
+;;         (replace 'check
+;;           (lambda _
+;;             (invoke "./aviftest" "../source/tests/data"))))
+       #:tests? #f))
+    (inputs
+     `(("libaom" ,libaom)
+       ("dav1d" ,dav1d)))
+    (synopsis "Encode and decode AVIF files")
+    (description "Libavif is a C implementation of the AV1 Image File Format
+(AVIF).  It can encode and decode all AOM supported YUV formats and bit depths,
+including with alpha.")
+    (home-page "https://github.com/AOMediaCodec/libavif")
+    (license license:bsd-2))) ; Audit
-- 
2.25.0

  reply	other threads:[~2020-02-15 18:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-15 18:24 [bug#39616] Add libavif Leo Famulari
2020-02-15 18:32 ` [bug#39616] [PATCH 1/2] gnu: libaom: Add AVIF support Leo Famulari
2020-02-15 18:32   ` Leo Famulari [this message]
2020-02-29 19:48 ` bug#39616: Add libavif Leo Famulari

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=a5a9d3b7af5bd4463c5a153a165d8029ebbff5a0.1581791549.git.leo@famulari.name \
    --to=leo@famulari.name \
    --cc=39616@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).