aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/image.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-03-02 10:37:28 +0000
committerChristopher Baines <mail@cbaines.net>2023-03-02 10:55:08 +0000
commit7df09ee0ab3e7962ef27859ce87e06a323059284 (patch)
treed81334f742ddcb9a1ee63961ca6410922980af1c /gnu/packages/image.scm
parent2ac51ec99b58b50c08ba719a8c7e9dba0330b065 (diff)
parentaf95f2d8f98eb2c8c64954bb2fd0b70838899174 (diff)
downloadguix-7df09ee0ab3e7962ef27859ce87e06a323059284.tar
guix-7df09ee0ab3e7962ef27859ce87e06a323059284.tar.gz
Merge remote-tracking branch 'savannah/master' into core-updates
Conflicts: gnu/local.mk gnu/packages/autotools.scm gnu/packages/cmake.scm gnu/packages/gnuzilla.scm gnu/packages/haskell.scm gnu/packages/pdf.scm gnu/packages/python-xyz.scm gnu/packages/samba.scm gnu/packages/tex.scm gnu/packages/tls.scm gnu/packages/wxwidgets.scm
Diffstat (limited to 'gnu/packages/image.scm')
-rw-r--r--gnu/packages/image.scm161
1 files changed, 94 insertions, 67 deletions
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 36c2ba69df..9f14a06e89 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -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.
;;;
@@ -178,12 +178,11 @@ library. It supports almost all PNG features and is extensible.")
(license license:zlib)
(home-page "http://www.libpng.org/pub/png/libpng.html")))
-;; libpng-apng should be updated when the APNG patch is released:
-;; <https://bugs.gnu.org/27556>
(define-public libpng-apng
+ ;; The APNG patch is maintained separately and may lag behind upstream libpng.
(package
(name "libpng-apng")
- (version "1.6.37")
+ (version "1.6.39")
(source
(origin
(method url-fetch)
@@ -196,8 +195,7 @@ library. It supports almost all PNG features and is extensible.")
"ftp://ftp.simplesystems.org/pub/libpng/png/src/history"
"/libpng16/libpng-" version ".tar.xz")))
(sha256
- (base32
- "1jl8in381z0128vgxnvn33nln6hzckl7l7j9nqvkaf1m9n1p0pjh"))))
+ (base32 "0dv90dxvmqpk7mbywyjbz8lh08cv4b0ksqp1y62mzvmlf379cihz"))))
(build-system gnu-build-system)
(arguments
`(#:modules ((guix build gnu-build-system)
@@ -215,14 +213,12 @@ library. It supports almost all PNG features and is extensible.")
apng.gz)
(invoke "sh" "-c"
(string-append "gunzip < " apng.gz " > the-patch"))
- (apply-patch "the-patch")
- #t)))
+ (apply-patch "the-patch"))))
(add-before 'configure 'no-checks
(lambda _
(substitute* "Makefile.in"
(("^scripts/symbols.chk") "")
- (("check: scripts/symbols.chk") ""))
- #t)))))
+ (("check: scripts/symbols.chk") "")))))))
(inputs
`(("apng" ,(origin
(method url-fetch)
@@ -231,7 +227,7 @@ library. It supports almost all PNG features and is extensible.")
version "/libpng-" version "-apng.patch.gz"))
(sha256
(base32
- "1dh0250mw9b2hx7cdmnb2blk7ddl49n6vx8zz7jdmiwxy38v4fw2"))))))
+ "1z8cx011a2c7vagwgi92rbmky1wi8awmrdldqh9f5k80pbmbdi2a"))))))
(native-inputs
(list libtool))
;; libpng.la says "-lz", so propagate it.
@@ -606,7 +602,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)
@@ -615,7 +611,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
@@ -624,33 +620,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
@@ -937,7 +931,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
@@ -1411,7 +1405,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
@@ -1523,7 +1517,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
@@ -1572,7 +1566,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
@@ -1743,7 +1737,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
@@ -2016,7 +2010,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
@@ -2140,7 +2134,7 @@ This package can be used to create @code{favicon.ico} files for web sites.")
(define-public libavif
(package
(name "libavif")
- (version "0.9.2")
+ (version "0.11.1")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -2149,22 +2143,27 @@ This package can be used to create @code{favicon.ico} files for web sites.")
(file-name (git-file-name name version))
(sha256
(base32
- "1yxmgjlxm1srm98zyj79bj8r8vmg67daqnq0ggcvxknq54plkznk"))))
+ "02zmb62g0yx6rfz4w1isyzfrckv5i7dzyz26rp2mspbx9w6v8j4r"))))
(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
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke "./aviftest" "../source/tests/data"))))
+ (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-" #$version)))
@@ -2174,29 +2173,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*))))))))
+ (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
@@ -2320,7 +2342,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.
@@ -2392,7 +2414,7 @@ Wacom-style graphics tablets.")
(define-public phockup
(package
(name "phockup")
- (version "1.9.0")
+ (version "1.9.2")
(source
(origin
(method git-fetch)
@@ -2401,8 +2423,7 @@ Wacom-style graphics tablets.")
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32
- "1xs2h3nj19wsfffl87akinx14drk5nn2svjwyj0csv10apk0q4pp"))))
+ (base32 "0j4mnsy12bhsmd80vgqknv004xbqd165y8gpalw87gp8i8xv172r"))))
(build-system copy-build-system)
(arguments
`(#:install-plan '(("src" "share/phockup/")
@@ -2411,12 +2432,18 @@ Wacom-style graphics tablets.")
(modify-phases %standard-phases
(add-after 'unpack 'configure
(lambda* (#:key inputs #:allow-other-keys)
- (substitute* (list "src/dependency.py" "src/exif.py")
- (("'exiftool'")
- (string-append "'" (search-input-file inputs "/bin/exiftool") "'")))))
+ (substitute* (list "src/dependency.py"
+ "src/exif.py")
+ (("'exiftool")
+ (string-append "'" (search-input-file inputs "bin/exiftool"))))))
(add-before 'install 'check
(lambda _
- (invoke "pytest")))
+ ;; Test without PATH to make sure ‘exiftool’ is properly found.
+ (let ((path (getenv "PATH"))
+ (pytest (which "pytest")))
+ (setenv "PATH" "")
+ (invoke pytest)
+ (setenv "PATH" path))))
(add-after 'install 'install-bin
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))