unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#60131] [PATCH 0/2] Build libavif tools
@ 2022-12-17  0:42 mirai
  2022-12-17  0:51 ` [bug#60131] [PATCH 1/2] gnu: libavif: Rewrite using G-Exps mirai
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: mirai @ 2022-12-17  0:42 UTC (permalink / raw)
  To: 60131; +Cc: mirai

Build 'avifenc' & 'avifdec' from libavif.

Bruno Victal (2):
  gnu: libavif: Rewrite using G-Exps.
  gnu: libavif: Add tools output.

 gnu/packages/image.scm | 66 ++++++++++++++++++++++++++----------------
 1 file changed, 41 insertions(+), 25 deletions(-)


base-commit: c193b5203b31246a6d74270c8086c45851561947
-- 
2.38.1





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [bug#60131] [PATCH 1/2] gnu: libavif: Rewrite using G-Exps.
  2022-12-17  0:42 [bug#60131] [PATCH 0/2] Build libavif tools mirai
@ 2022-12-17  0:51 ` mirai
  2022-12-17  0:51 ` [bug#60131] [PATCH 2/2] gnu: libavif: Add tools output mirai
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: mirai @ 2022-12-17  0:51 UTC (permalink / raw)
  To: 60131; +Cc: Bruno Victal

From: Bruno Victal <mirai@makinata.eu>

* gnu/packages/image.scm (libavif)[arguments]: Rewrite using
G-Expressions.
---
 gnu/packages/image.scm | 50 +++++++++++++++++++++---------------------
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index bc1f25627b..80872b1466 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -2168,32 +2168,32 @@ (define-public libavif
                 "1yxmgjlxm1srm98zyj79bj8r8vmg67daqnq0ggcvxknq54plkznk"))))
     (build-system cmake-build-system)
     (arguments
-     `(#:configure-flags '("-DAVIF_CODEC_AOM=ON" "-DAVIF_CODEC_DAV1D=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
-         (replace 'check
-           (lambda _
-             (invoke "./aviftest" "../source/tests/data")))
-         (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)))))))
+     (list
+      #:configure-flags
+      #~(list "-DAVIF_CODEC_AOM=ON" "-DAVIF_CODEC_DAV1D=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
+          (replace 'check
+            (lambda _
+              (invoke "./aviftest" "../source/tests/data")))
+          (add-after 'install 'install-readme
+            (lambda _
+              (let ((doc (string-append #$output "/share/doc/libavif-" #$version)))
+                (install-file "../source/README.md" doc)))))))
     (inputs
-     `(("dav1d" ,dav1d)
-       ("libaom" ,libaom)
-       ;; 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))
-             '())))
+     (append
+      ;; 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)))
+          (list rav1e) '())
+      (list dav1d libaom)))
     (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





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#60131] [PATCH 2/2] gnu: libavif: Add tools output.
  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
  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
  3 siblings, 0 replies; 5+ messages in thread
From: mirai @ 2022-12-17  0:51 UTC (permalink / raw)
  To: 60131; +Cc: Bruno Victal

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





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [bug#60131] (no subject)
  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 ` [bug#60131] [PATCH 2/2] gnu: libavif: Add tools output mirai
@ 2023-01-03  2:13 ` mirai
  2023-01-03 17:54 ` bug#60131: [PATCH 0/2] Build libavif tools Leo Famulari
  3 siblings, 0 replies; 5+ messages in thread
From: mirai @ 2023-01-03  2:13 UTC (permalink / raw)
  To: 60131

a friendly bump




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#60131: [PATCH 0/2] Build libavif tools
  2022-12-17  0:42 [bug#60131] [PATCH 0/2] Build libavif tools mirai
                   ` (2 preceding siblings ...)
  2023-01-03  2:13 ` [bug#60131] (no subject) mirai
@ 2023-01-03 17:54 ` Leo Famulari
  3 siblings, 0 replies; 5+ messages in thread
From: Leo Famulari @ 2023-01-03 17:54 UTC (permalink / raw)
  To: mirai; +Cc: 60131-done

[-- Attachment #1: Type: text/plain, Size: 316 bytes --]

On Sat, Dec 17, 2022 at 12:42:44AM +0000, mirai@makinata.eu wrote:
> Build 'avifenc' & 'avifdec' from libavif.
> 
> Bruno Victal (2):
>   gnu: libavif: Rewrite using G-Exps.
>   gnu: libavif: Add tools output.

Thanks! I added a copyright line for you and pushed as
216281b1ebbbc3ea08a5d7b372e024bbaf758f39

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-01-03 17:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [bug#60131] [PATCH 2/2] gnu: libavif: Add tools output mirai
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

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).