diff mbox series

[bug#47311] gnu: Add libheif.

Message ID 20210322042940.439266-1-monego@posteo.net
State Accepted
Headers show
Series [bug#47311] gnu: Add libheif. | expand

Checks

Context Check Description
cbaines/submitting builds success
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Vinicius Monego March 22, 2021, 4:29 a.m. UTC
* gnu/packages/image.scm (libheif): New variable.
---
 gnu/packages/image.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

Comments

Leo Famulari March 22, 2021, 6:01 p.m. UTC | #1
On Mon, Mar 22, 2021 at 01:29:40AM -0300, Vinicius Monego wrote:
> * gnu/packages/image.scm (libheif): New variable.

Thanks!
> +    (home-page "https://github.com/strukturag/libheif")

It says that these programs can use libheif:

GIMP
Krita
ImageMagick
digiKam 7.0.0
libvips
Kodi HEIF image decoder plugin

> +    (inputs
> +     `(("dav1d" ,dav1d)
> +       ("gdk-pixbuf" ,gdk-pixbuf) ;optional
> +       ("libaom" ,libaom)
> +       ("libde265" ,libde265)
> +       ("libjpeg" ,libjpeg-turbo)
> +       ("libpng" ,libpng)
> +       ("rav1e" ,rav1e)
> +       ("x265" ,x265)))

I wonder, are both libaom and rav1e mandatory dependencies?

I ask because they offer the same functionality (AV1 encoding), and it's
still a bit tricky to introduce Rust dependencies in Guix. Rav1e is
written in Rust, but we only support Rust on x86_64.
Vinicius Monego March 22, 2021, 8:35 p.m. UTC | #2
Oh, and the license is wrong, it's lgpl3+.
Leo Famulari March 22, 2021, 9:21 p.m. UTC | #3
On Mon, Mar 22, 2021 at 05:35:23PM -0300, Vinicius Monego wrote:
> Oh, and the license is wrong, it's lgpl3+.

Noted
Leo Famulari March 23, 2021, 5:30 p.m. UTC | #4
On Mon, Mar 22, 2021 at 01:29:40AM -0300, Vinicius Monego wrote:
> * gnu/packages/image.scm (libheif): New variable.

Pushed as 8fae75a3584c19c9b2c705b49c600c23dccc8799 with the changes we
discussed.

Thanks again!
diff mbox series

Patch

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index de6872b9b2..7a751c1eba 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -2164,6 +2164,43 @@  by AOM, including with alpha.")
     (license (list license:bsd-2    ; libavif itself
                    license:expat)))) ; cJSON in the test suite
 
+(define-public libheif
+  (package
+    (name "libheif")
+    (version "1.11.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/strukturag/libheif")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "036n63vlk4sk7y25q2kzyvvw4r5vv323ysbmbrcaprg9hdyjqgf5"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f)) ;no test target although there is a tests folder
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("dav1d" ,dav1d)
+       ("gdk-pixbuf" ,gdk-pixbuf) ;optional
+       ("libaom" ,libaom)
+       ("libde265" ,libde265)
+       ("libjpeg" ,libjpeg-turbo)
+       ("libpng" ,libpng)
+       ("rav1e" ,rav1e)
+       ("x265" ,x265)))
+    (home-page "https://github.com/strukturag/libheif")
+    (synopsis "HEIF and AVIF file format decoder and encoder")
+    (description
+     "@code{libheif} is an ISO/IEC 23008-12:2017 HEIF and AVIF (AV1 Image File
+Format) file format decoder and encoder.")
+    (license license:gpl3+)))
+
 (define-public mtpaint
   (package
     (name "mtpaint")