summaryrefslogtreecommitdiff
path: root/gnu/packages/image.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/image.scm')
-rw-r--r--gnu/packages/image.scm210
1 files changed, 135 insertions, 75 deletions
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 33e8b32c10..04c06bd902 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -11,7 +11,7 @@
;;; Copyright © 2016-2025 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016–2022 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
-;;; Copyright © 2016, 2017, 2020, 2021, 2022 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2016, 2017, 2020, 2021, 2022, 2025 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2016, 2017 Kei Kebreau <kkebreau@posteo.net>
;;; Copyright © 2017 Nikita <nikita@n0.is>
;;; Copyright © 2017,2019,2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
@@ -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, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020, 2023 Maxim Cournoyer <maxim@guixotic.coop>
;;; Copyright © 2020, 2025 Janneke Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com>
;;; Copyright © 2020, 2021, 2022, 2023, 2024 Vinicius Monego <monego@posteo.net>
@@ -95,6 +95,7 @@
#:use-module (gnu packages popt)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-check)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
#:use-module (gnu packages ragel)
@@ -332,36 +333,35 @@ APNG patch provides APNG support to libpng.")
;; Temporary, until 76798 merges into core-packages-team, and that merges into
;; master.
-(define-public libpng-apng-for-librewolf
- (hidden-package
- (package
- (inherit libpng-apng)
- (version "1.6.46")
- (source
- (origin
- (method url-fetch)
- (uri (list (string-append "mirror://sourceforge/libpng/libpng16/"
- version "/libpng-" version ".tar.xz")
- (string-append
- "ftp://ftp.simplesystems.org/pub/libpng/png/src"
- "/libpng16/libpng-" version ".tar.xz")
- (string-append
- "ftp://ftp.simplesystems.org/pub/libpng/png/src/history"
- "/libpng16/libpng-" version ".tar.xz")))
- (sha256
- (base32
- "1cbwf20zlm4gcv8rpjivkngrjgl5366w21lr9qmbk2lr0dq8papk"))))
- (inputs
- (modify-inputs (package-inputs libpng-apng)
- (replace "apng"
- (origin
- (method url-fetch)
- (uri
- (string-append "mirror://sourceforge/libpng-apng/libpng16/"
- version "/libpng-" version "-apng.patch.gz"))
- (sha256
- (base32
- "00ykl1bzb79xsjwrq7dl0yz9dz5g3zwj0lry5zam3vs6s3gw5gi9")))))))))
+(define-public libpng-apng-next
+ (package
+ (inherit libpng-apng)
+ (version "1.6.46")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (list (string-append "mirror://sourceforge/libpng/libpng16/"
+ version "/libpng-" version ".tar.xz")
+ (string-append
+ "ftp://ftp.simplesystems.org/pub/libpng/png/src"
+ "/libpng16/libpng-" version ".tar.xz")
+ (string-append
+ "ftp://ftp.simplesystems.org/pub/libpng/png/src/history"
+ "/libpng16/libpng-" version ".tar.xz")))
+ (sha256
+ (base32
+ "1cbwf20zlm4gcv8rpjivkngrjgl5366w21lr9qmbk2lr0dq8papk"))))
+ (inputs
+ (modify-inputs (package-inputs libpng-apng)
+ (replace "apng"
+ (origin
+ (method url-fetch)
+ (uri
+ (string-append "mirror://sourceforge/libpng-apng/libpng16/"
+ version "/libpng-" version "-apng.patch.gz"))
+ (sha256
+ (base32
+ "00ykl1bzb79xsjwrq7dl0yz9dz5g3zwj0lry5zam3vs6s3gw5gi9"))))))))
(define-public pngcrush
(package
@@ -761,19 +761,26 @@ maximum quality factor.")
"1hjm8lwap7bjyyxsyi94fh5817xzqhk4kb5y0b7mb6675xw10prk"))))
(build-system gnu-build-system)
(arguments
- (if (and (target-riscv64?)
- (%current-target-system))
- (list #:phases
- #~(modify-phases %standard-phases
- (add-after 'unpack 'update-config-scripts
- (lambda* (#:key native-inputs inputs #:allow-other-keys)
- (for-each (lambda (file)
- (install-file
- (search-input-file
- (or native-inputs inputs)
- (string-append "/bin/" file)) "."))
- '("config.guess" "config.sub"))))) )
- '()))
+ (append
+ (list
+ #:configure-flags
+ #~(list (string-append "CFLAGS= "
+ ;; Relax GCC 14's checks.
+ "-Wno-error=builtin-declaration-mismatch "
+ "-Wno-error=implicit-function-declaration")))
+ (if (and (target-riscv64?)
+ (%current-target-system))
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'update-config-scripts
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ (for-each (lambda (file)
+ (install-file
+ (search-input-file
+ (or native-inputs inputs)
+ (string-append "/bin/" file)) "."))
+ '("config.guess" "config.sub"))))))
+ '())))
(native-inputs
(if (and (target-riscv64?)
(%current-target-system))
@@ -1380,7 +1387,7 @@ graphics image formats like PNG, BMP, JPEG, TIFF and others.")
(define-public ggg
(package
(name "ggg")
- (version "0.3.13")
+ (version "0.4.16")
(source
(origin
(method git-fetch)
@@ -1389,7 +1396,7 @@ graphics image formats like PNG, BMP, JPEG, TIFF and others.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "0l0pbnp2jqi25s5hcqh2dhbdhcig4zyjx2cxwijbb5nn5shrp1wj"))))
+ (base32 "0igdnjw2i9b7qy66x05v70r1vsd043ydpvgic3hdra3dpx6f8ppf"))))
(arguments
`(#:source-directory "src"
#:phases (modify-phases %standard-phases
@@ -1399,8 +1406,6 @@ graphics image formats like PNG, BMP, JPEG, TIFF and others.")
"/bin"))
(share (string-append (assoc-ref outputs "out")
"/share")))
- (mkdir-p (string-append share "/scripts"))
- (mkdir-p (string-append share "/resources"))
(install-file "resources/help.txt"
(string-append share
"/resources"))
@@ -1408,12 +1413,12 @@ graphics image formats like PNG, BMP, JPEG, TIFF and others.")
(string-append share
"/resources/svg-paths"))
(install-file "scripts/ggg" bin)
- (install-file "scripts/log.sh"
+ (install-file "scripts/log.bash"
(string-append share "/scripts/"))
(chmod (string-append bin "/ggg") #o755)))))))
(build-system guile-build-system)
(native-inputs (list guile-3.0))
- (inputs (list guile-3.0 bash-minimal))
+ (inputs (list guile-3.0 bash-minimal imagemagick))
(synopsis
"GGG is a SVG image generator for project and web badges")
(description
@@ -1673,6 +1678,15 @@ and XMP metadata of images in various formats.")
;; <https://launchpad.net/ubuntu/precise/+source/exiv2/+copyright>.
(license license:gpl2+)))
+(define-public exiv2-static
+ (package
+ (inherit exiv2)
+ (arguments
+ (substitute-keyword-arguments (package-arguments exiv2)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (delete 'delete-static-libraries)))))))
+
(define-public devil
(package
(name "devil")
@@ -1995,6 +2009,20 @@ and decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.).")
license:ijg ;the libjpeg library and associated tools
license:zlib)))) ;the libjpeg-turbo SIMD extensions
+(define-public libjpeg-turbo-3
+ (package
+ (inherit libjpeg-turbo)
+ (name "libjpeg-turbo")
+ (version "3.1.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/" name "/" name
+ "/releases/download/" version "/" name
+ "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1kyhczwa17qp8ik3v876yjqsf4zrjj0z3464j04fak269cii404g"))))))
+
(define-public niftilib
(package
(name "niftilib")
@@ -2670,6 +2698,7 @@ Format) file format decoder and encoder.")
(package
(name "libjxl")
(version "0.11.1")
+ (outputs (list "out" "pixbuf-loader"))
(source
(origin
(method git-fetch)
@@ -2691,35 +2720,63 @@ Format) file format decoder and encoder.")
"libpng" "zlib"))))))
(build-system cmake-build-system)
(arguments
- `(#:configure-flags
+ `(#:modules ((guix build cmake-build-system)
+ (guix build utils)
+ (srfi srfi-26))
+ #:configure-flags
(list "-DJPEGXL_FORCE_SYSTEM_GTEST=true"
"-DJPEGXL_FORCE_SYSTEM_BROTLI=true"
"-DJPEGXL_FORCE_SYSTEM_LCMS2=true"
"-DJPEGXL_FORCE_SYSTEM_HWY=true"
- "-DJPEGXL_BUNDLE_LIBPNG=false")
- ,@(cond
- ((target-riscv64?)
- '(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'fix-atomic
+ "-DJPEGXL_BUNDLE_LIBPNG=false"
+ "-DJPEGXL_ENABLE_PLUGINS=true")
+ #:phases
+ (modify-phases %standard-phases
+ ,@(cond
+ ((target-riscv64?)
+ '((add-after 'unpack 'fix-atomic
(lambda _
(substitute* "lib/jxl/enc_xyb.cc"
(("#include \"lib/jxl/enc_xyb.h\"" a)
- (string-append a "\n#include <atomic>"))))))))
- ((target-x86-32?)
- '(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'loosen-test-parameter
+ (string-append a "\n#include <atomic>")))))))
+ ((target-x86-32?)
+ '((add-after 'unpack 'loosen-test-parameter
(lambda _
;; This test fails likely due to a floating point
;; rounding difference.
(substitute* "lib/jxl/color_management_test.cc"
- (("8\\.7e-4") "8.7e-3")))))))
- (#t '()))))
+ (("8\\.7e-4") "8.7e-3"))))))
+ (#t '()))
+ (add-after 'install 'split
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (out:pixbuf (assoc-ref outputs "pixbuf-loader"))
+ (thumbnailer (string-append
+ out
+ "/share/thumbnailers/jxl.thumbnailer"))
+ (thumbnailer* (string-append
+ out:pixbuf
+ "/share/thumbnailers/jxl.thumbnailer"))
+ (pixbuf-loader (string-append
+ out
+ "/lib/gdk-pixbuf-2.0/2.10.0/loaders/"
+ "libpixbufloader-jxl.so"))
+ (pixbuf-loader* (string-append
+ out:pixbuf
+ "/lib/gdk-pixbuf-2.0/2.10.0/loaders/"
+ "libpixbufloader-jxl.so")))
+
+ (for-each (lambda (old new)
+ (install-file old (dirname new))
+ (delete-file old)
+ (chmod new #o555))
+ (list thumbnailer pixbuf-loader)
+ (list thumbnailer* pixbuf-loader*))))))))
(native-inputs
(list asciidoc doxygen googletest pkg-config python))
(inputs
(list freeglut
+ gdk-pixbuf
gflags
giflib
imath
@@ -2737,6 +2794,8 @@ Format) file format decoder and encoder.")
(synopsis "JPEG XL image format reference implementation")
(description "This package contains a reference implementation of JPEG XL
(encoder and decoder).")
+ (properties
+ `((output-synopsis "pixbuf-loader" "gdk-pixbuf loader for the JXL format")))
(license license:bsd-3)))
(define-public libjxl-0.10
@@ -2905,7 +2964,7 @@ Wacom-style graphics tablets.")
(define-public phockup
(package
(name "phockup")
- (version "1.9.2")
+ (version "1.13.0")
(source
(origin
(method git-fetch)
@@ -2914,7 +2973,7 @@ Wacom-style graphics tablets.")
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "0j4mnsy12bhsmd80vgqknv004xbqd165y8gpalw87gp8i8xv172r"))))
+ (base32 "1kwz2qy8mx0j25g3gyda08qaz5rgwm6vycsrqhgkd5cqqz76bbmc"))))
(build-system copy-build-system)
(arguments
`(#:install-plan '(("src" "share/phockup/")
@@ -2928,13 +2987,14 @@ Wacom-style graphics tablets.")
(("'exiftool")
(string-append "'" (search-input-file inputs "bin/exiftool"))))))
(add-before 'install 'check
- (lambda _
- ;; Test without PATH to make sure ‘exiftool’ is properly found.
- (let ((path (getenv "PATH"))
- (pytest (which "pytest")))
- (setenv "PATH" "")
- (invoke pytest)
- (setenv "PATH" path))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ ;; 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")))
@@ -2951,7 +3011,7 @@ Wacom-style graphics tablets.")
(inputs
(list bash-minimal perl-image-exiftool python python-tqdm))
(native-inputs
- (list python-pytest python-pytest-mock))
+ (list python-pytest python-pytest-mock python-pytest-socket))
(home-page "https://github.com/ivandokov/phockup")
(synopsis "Organize photos and videos in folders")
(description "Phockup is a media sorting tool that uses creation date and