From: mirai@makinata.eu
To: 60131@debbugs.gnu.org
Cc: Bruno Victal <mirai@makinata.eu>
Subject: [bug#60131] [PATCH 2/2] gnu: libavif: Add tools output.
Date: Sat, 17 Dec 2022 00:51:29 +0000 [thread overview]
Message-ID: <b7ac2c6d0dd7c244b8dcc6a6afb0a0511efd31ea.1671237624.git.mirai@makinata.eu> (raw)
In-Reply-To: <cover.1671237624.git.mirai@makinata.eu>
From: Bruno Victal <mirai@makinata.eu>
* gnu/packages/image.scm (libavif)[arguments]: Build avifenc & avifdec.
[outputs]: Add 'tools' output.
[inputs]: Add zlib, libpng, libjpeg-turbo.
---
gnu/packages/image.scm | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 80872b1466..98fe572ac2 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -2176,7 +2176,7 @@ (define-public libavif
(%current-system)))
'("-DAVIF_CODEC_RAV1E=ON")
'())
- "-DAVIF_BUILD_TESTS=ON")
+ "-DAVIF_BUILD_TESTS=ON" "-DAVIF_BUILD_APPS=ON")
#:phases
#~(modify-phases %standard-phases
(replace 'check
@@ -2185,7 +2185,21 @@ (define-public libavif
(add-after 'install 'install-readme
(lambda _
(let ((doc (string-append #$output "/share/doc/libavif-" #$version)))
- (install-file "../source/README.md" doc)))))))
+ (install-file "../source/README.md" doc))))
+ (add-after 'install 'split
+ (lambda _
+ (let* ((avifenc (string-append #$output "/bin/avifenc"))
+ (avifenc* (string-append #$output:tools "/bin/avifenc"))
+ (avifdec (string-append #$output "/bin/avifdec"))
+ (avifdec* (string-append #$output:tools "/bin/avifdec")))
+ (mkdir-p (string-append #$output:tools "/bin"))
+
+ (for-each (lambda (old new)
+ (copy-file old new)
+ (delete-file old)
+ (chmod new #o555))
+ (list avifenc avifdec)
+ (list avifenc* avifdec*))))))))
(inputs
(append
;; XXX: rav1e depends on rust, which currently only works on x86_64.
@@ -2193,7 +2207,9 @@ (define-public libavif
(if (string-prefix? "x86_64" (or (%current-target-system)
(%current-system)))
(list rav1e) '())
- (list dav1d libaom)))
+ (list dav1d libaom zlib libpng libjpeg-turbo)))
+ (outputs (list "out"
+ "tools")) ; avifenc & avifdec
(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
--
2.38.1
next prev parent reply other threads:[~2022-12-17 0:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-17 0:42 [bug#60131] [PATCH 0/2] Build libavif tools mirai
2022-12-17 0:51 ` [bug#60131] [PATCH 1/2] gnu: libavif: Rewrite using G-Exps mirai
2022-12-17 0:51 ` mirai [this message]
2023-01-03 2:13 ` [bug#60131] (no subject) mirai
2023-01-03 17:54 ` bug#60131: [PATCH 0/2] Build libavif tools 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=b7ac2c6d0dd7c244b8dcc6a6afb0a0511efd31ea.1671237624.git.mirai@makinata.eu \
--to=mirai@makinata.eu \
--cc=60131@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).