diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-03-23 21:45:21 -0400 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-03-23 21:45:21 -0400 |
commit | 839bb4616f13171a23ad7937bf57d0a01d61d42a (patch) | |
tree | 01de78a5ce973b9fb7ac0f9216d64f736f8e163d /gnu/packages/image.scm | |
parent | 0357bbbcd850f9220078a62da3c30358b8983765 (diff) | |
parent | ef71e3290916583973724316e815cee840c1b6d8 (diff) | |
download | guix-839bb4616f13171a23ad7937bf57d0a01d61d42a.tar.gz |
Merge remote-tracking branch 'origin/master' into staging.
With resolved conflicts in: gnu/packages/ibus.scm gnu/packages/image.scm gnu/packages/lisp.scm gnu/packages/virtualization.scm
Diffstat (limited to 'gnu/packages/image.scm')
-rw-r--r-- | gnu/packages/image.scm | 154 |
1 files changed, 108 insertions, 46 deletions
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 2d40573668..4c0f0ae6f5 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -25,7 +25,7 @@ ;;; Copyright © 2018 Rutger Helling <rhelling@mykolab.com> ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org> ;;; Copyright © 2020 R Veera Kumar <vkor@vkten.in> -;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2020, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com> ;;; Copyright © 2020, 2021, 2022 Vinicius Monego <monego@posteo.net> @@ -34,7 +34,7 @@ ;;; Copyright © 2021 Alexandr Vityazev <avityazev@posteo.org> ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com> ;;; Copyright © 2022 ( <paren@disroot.org> -;;; Copyright © 2022 Bruno Victal <mirai@makinata.eu> +;;; Copyright © 2022-2023 Bruno Victal <mirai@makinata.eu> ;;; ;;; This file is part of GNU Guix. ;;; @@ -601,7 +601,7 @@ collection of tools for doing simple manipulations of TIFF images.") (define-public leptonica (package (name "leptonica") - (version "1.80.0") + (version "1.83.1") (source (origin (method git-fetch) @@ -610,7 +610,7 @@ collection of tools for doing simple manipulations of TIFF images.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "12ddln72z5l3icz0i9rpsfkg5xik8fcwcn8lb0cp3jigjxi8gvkg")))) + (base32 "1j7qf9flb48q0aymf0yx9rypy3bs6hfjcln08zmy8qn2qcjzrmvi")))) (build-system gnu-build-system) (native-inputs (list gnuplot ;needed for test suite @@ -619,33 +619,31 @@ collection of tools for doing simple manipulations of TIFF images.") libtool pkg-config)) (inputs - `(("giflib" ,giflib) - ("libjpeg" ,libjpeg-turbo) - ("libpng" ,libpng) - ("libtiff" ,libtiff) - ("libwebp" ,libwebp) - ("openjpeg" ,openjpeg) - ("zlib" ,zlib))) + (list giflib + libjpeg-turbo + libpng + libtiff + libwebp + openjpeg + zlib)) (arguments - '(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-reg-wrapper - (lambda _ - (substitute* "prog/reg_wrapper.sh" - ((" /bin/sh ") - (string-append " " (which "sh") " ")) - (("which gnuplot") - "true")) - #t)) - (add-after 'install 'provide-absolute-giflib-reference - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (giflib (assoc-ref inputs "giflib"))) - ;; Add an absolute reference to giflib to avoid propagation. - (with-directory-excursion (string-append out "/lib") - (substitute* '("liblept.la" "pkgconfig/lept.pc") - (("-lgif") (string-append "-L" giflib "/lib -lgif")))) - #t)))))) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-reg-wrapper + (lambda _ + (substitute* "prog/reg_wrapper.sh" + ((" /bin/sh ") + (string-append " " (which "sh") " ")) + (("which gnuplot") + "true")))) + (add-after 'install 'provide-absolute-giflib-reference + (lambda _ + (let ((giflib #$(this-package-input "giflib"))) + ;; Add an absolute reference to giflib to avoid propagation. + (with-directory-excursion (string-append #$output "/lib") + (substitute* '("libleptonica.la" "pkgconfig/lept.pc") + (("-lgif") (string-append "-L" giflib "/lib -lgif")))))))))) (home-page "http://www.leptonica.com/") (synopsis "Library and tools for image processing and analysis") (description @@ -657,6 +655,39 @@ scale and pixel depth, and pixelwise masking, blending, enhancement, and arithmetic ops.") (license license:bsd-2))) +(define-public leptonica-1.80 + (package + (inherit leptonica) + (name "leptonica") + (version "1.80.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/DanBloomberg/leptonica") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "12ddln72z5l3icz0i9rpsfkg5xik8fcwcn8lb0cp3jigjxi8gvkg")))) + (arguments + (substitute-keyword-arguments (package-arguments leptonica) + ((#:tests? _ #t) + ;; The pngio_reg test fails, probably because the libpng used is + ;; newer. + #f) + ((#:phases phases '%standard-phases) + #~(modify-phases #$phases + (replace 'provide-absolute-giflib-reference + (lambda _ + (let ((giflib #$(this-package-input "giflib"))) + ;; Add an absolute reference to giflib to avoid propagation. + ;; This is the same as for the parent package, but at that + ;; time the file name was 'liblept.la, not libleptonica.la. + (with-directory-excursion (string-append #$output "/lib") + (substitute* '("liblept.la" "pkgconfig/lept.pc") + (("-lgif") + (string-append "-L" giflib "/lib -lgif"))))))))))))) + (define-public jbig2dec (package (name "jbig2dec") @@ -946,7 +977,7 @@ compose, and analyze GIF images.") (format #f "EXECINPUT=~a~%" execinput))) (invoke "sh" "testit.sh")))))))) (native-inputs (list drm-tools)) ;for tests - (home-page "http://libuemf.sourceforge.net/") + (home-page "https://libuemf.sourceforge.net/") (synopsis "Library for working with WFM, EMF and EMF+ images") (description "The libUEMF library is a portable C99 implementation for reading and writing @acronym{WFM, Windows Metafile}, @acronym{EMF, Enhanced @@ -1419,7 +1450,7 @@ and XMP metadata of images in various formats.") (description "Developer's Image Library (DevIL) is a library to develop applications with support for many types of images. DevIL can load, save, convert, manipulate, filter and display a wide variety of image formats.") - (home-page "http://openil.sourceforge.net") + (home-page "https://openil.sourceforge.net") (license license:lgpl2.1+))) (define-public jasper @@ -1531,7 +1562,7 @@ differences in file encoding, image quality, and other small variations.") (list gettext-minimal libtool perl)) (inputs (list libjpeg-turbo libmhash libmcrypt zlib)) - (home-page "http://steghide.sourceforge.net") + (home-page "https://steghide.sourceforge.net") (synopsis "`Hide' (nonconfidential) data in image or audio files") (description "Steghide is a program to `hide' data in various kinds of image and audio @@ -1580,7 +1611,7 @@ specifically at this tool.") files to a smaller size, without losing any information. This program also converts external formats (BMP, GIF, PNM and TIFF) to optimized PNG, and performs PNG integrity checks and corrections.") - (home-page "http://optipng.sourceforge.net/") + (home-page "https://optipng.sourceforge.net/") (license license:zlib))) (define-public imgp @@ -1756,7 +1787,7 @@ and decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.).") files in the nifti-1 data format - a binary file format for storing medical image data, e.g. magnetic resonance image (MRI) and functional MRI (fMRI) brain images.") - (home-page "http://niftilib.sourceforge.net") + (home-page "https://niftilib.sourceforge.net") (license license:public-domain))) (define-public gpick @@ -2029,7 +2060,7 @@ to the standard output. It works well together with grim.") "/share/X11/rgb.txt")))) (inputs (list xorg-rgb libpng)) (native-inputs (list pngsuite)) - (home-page "http://sng.sourceforge.net") + (home-page "https://sng.sourceforge.net") (synopsis "Markup language for representing PNG contents") (description "SNG (Scriptable Network Graphics) is a minilanguage designed specifically to represent the entire contents of a PNG (Portable Network @@ -2166,14 +2197,23 @@ This package can be used to create @code{favicon.ico} files for web sites.") (build-system cmake-build-system) (arguments (list + #:modules '((guix build cmake-build-system) + (guix build utils) + (srfi srfi-26)) #:configure-flags #~(list "-DAVIF_CODEC_AOM=ON" "-DAVIF_CODEC_DAV1D=ON" #$@(if (this-package-input "rav1e") '("-DAVIF_CODEC_RAV1E=ON") '()) - "-DAVIF_BUILD_TESTS=ON" "-DAVIF_BUILD_APPS=ON") + "-DAVIF_BUILD_TESTS=ON" "-DAVIF_ENABLE_GTEST=ON" + "-DAVIF_BUILD_APPS=ON" "-DAVIF_BUILD_GDK_PIXBUF=ON") #:phases #~(modify-phases %standard-phases + (add-before 'configure 'patch-thumbnailer + (lambda _ + (substitute* "contrib/gdk-pixbuf/avif.thumbnailer.in" + (("@CMAKE_INSTALL_FULL_BINDIR@/gdk-pixbuf-thumbnailer") + (string-append #$gdk-pixbuf "/bin/gdk-pixbuf-thumbnailer"))))) (add-after 'install 'install-readme (lambda _ (let ((doc (string-append #$output "/share/doc/libavif-" @@ -2184,30 +2224,52 @@ This package can be used to create @code{favicon.ico} files for web sites.") (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"))) + (avifdec* (string-append #$output:tools "/bin/avifdec")) + + (thumbnailer (string-append + #$output + "/share/thumbnailers/avif.thumbnailer")) + (thumbnailer* (string-append + #$output:pixbuf-loader + "/share/thumbnailers/avif.thumbnailer")) + (pixbuf-loader (string-append + #$output + "/lib/gdk-pixbuf-2.0/2.10.0/loaders/" + "libpixbufloader-avif.so")) + (pixbuf-loader* (string-append + #$output:pixbuf-loader + "/lib/gdk-pixbuf-2.0/2.10.0/loaders/" + "libpixbufloader-avif.so"))) (mkdir-p (string-append #$output:tools "/bin")) + (for-each (compose mkdir-p + (cut string-append + #$output:pixbuf-loader <>)) + '("/share/thumbnailers" + "/lib/gdk-pixbuf-2.0/2.10.0/loaders/")) (for-each (lambda (old new) (copy-file old new) (delete-file old) (chmod new #o555)) - (list avifenc avifdec) - (list avifenc* avifdec*)))))))) - (native-inputs (list googletest)) + (list avifenc avifdec + thumbnailer pixbuf-loader) + (list avifenc* avifdec* + thumbnailer* pixbuf-loader*)))))))) + (native-inputs (list googletest pkg-config)) (inputs (append (if (member (%current-system) (package-transitive-supported-systems rav1e)) (list rav1e) '()) - (list dav1d libaom zlib libpng libjpeg-turbo))) + (list dav1d libaom zlib libpng libjpeg-turbo gdk-pixbuf))) (outputs (list "out" - "tools")) ; avifenc & avifdec + "tools" ; avifenc & avifdec + "pixbuf-loader")) (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 by AOM, including with alpha.") (home-page "https://github.com/AOMediaCodec/libavif") - (license (list license:bsd-2 ; libavif itself - license:expat)))) ; cJSON in the test suite + (license (list license:bsd-2)))) (define-public libheif (package @@ -2331,7 +2393,7 @@ Format) file format decoder and encoder.") (list "intl" ; build internationalized version "man") ; build the man page #:tests? #f)) ; no test suite - (home-page "http://mtpaint.sourceforge.net/") + (home-page "https://mtpaint.sourceforge.net/") (synopsis "Create pixel art and manipulate digital images") (description "Mtpaint is a graphic editing program which uses the GTK+ toolkit. |