unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Vinicius Monego <monego@posteo.net>
To: 51677@debbugs.gnu.org
Cc: Vinicius Monego <monego@posteo.net>
Subject: [bug#51677] [PATCH] gnu: libavif: Restrict dependency on rav1e to x86_64.
Date: Mon,  8 Nov 2021 04:26:04 +0000	[thread overview]
Message-ID: <20211108042604.101487-1-monego@posteo.net> (raw)

* gnu/packages/image.scm (libavif)[arguments]<#:configure-flags>: Pass
"-DAVIF_CODEC_RAV1E=ON" only on x84_64.
<#:phases>: Don't return #t.
[inputs]: Add rav1e only on x86_64.
---
 gnu/packages/image.scm | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index fc021dd2db..ff3963e6f5 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -2182,7 +2182,11 @@ This package can be used to create @code{favicon.ico} files for web sites.")
     (build-system cmake-build-system)
     (arguments
      `(#:configure-flags '("-DAVIF_CODEC_AOM=ON" "-DAVIF_CODEC_DAV1D=ON"
-                           "-DAVIF_CODEC_RAV1E=ON"
+                           ,@(if (string-prefix? "x86_64"
+                                                 (or (%current-target-system)
+                                                     (%current-system)))
+                                 '("-DAVIF_CODEC_RAV1E=ON")
+                                 '())
                            "-DAVIF_BUILD_TESTS=ON")
        #:phases
        (modify-phases %standard-phases
@@ -2193,12 +2197,16 @@ This package can be used to create @code{favicon.ico} files for web sites.")
            (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)
-               #t))))))
+               (install-file "../source/README.md" doc)))))))
     (inputs
      `(("dav1d" ,dav1d)
        ("libaom" ,libaom)
-       ("rav1e" ,rav1e)))
+       ;; XXX: rav1e depends on rust, which currently only works on x86_64.
+       ;; See also the related configure flag when changing this.
+       ,@(if (string-prefix? "x86_64" (or (%current-target-system)
+                                          (%current-system)))
+             `(("rav1e" ,rav1e))
+             '())))
     (synopsis "Encode and decode AVIF files")
     (description "Libavif is a C implementation of @acronym{AVIF, the AV1 Image
 File Format}.  It can encode and decode all YUV formats and bit depths supported

base-commit: b96ae47bb08f315be8c22f0ee4248dc36c0d6d29
-- 
2.30.2





             reply	other threads:[~2021-11-08  4:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-08  4:26 Vinicius Monego [this message]
2021-11-08 17:33 ` [bug#51677] [PATCH] gnu: libavif: Restrict dependency on rav1e to x86_64 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=20211108042604.101487-1-monego@posteo.net \
    --to=monego@posteo.net \
    --cc=51677@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).