GNU bug report logs -
#60131
[PATCH 0/2] Build libavif tools
Previous Next
Reported by: mirai <at> makinata.eu
Date: Sat, 17 Dec 2022 00:51:02 UTC
Severity: normal
Tags: patch
Done: Leo Famulari <leo <at> famulari.name>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
From: Bruno Victal <mirai <at> 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
This bug report was last modified 2 years and 172 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.