Artyom V. Poptsov wrote 2 years ago
(address . guix-patches@gnu.org)
From 3b672b4a728c950c861770ab0b5498730435da5b Mon Sep 17 00:00:00 2001
Message-Id: <3b672b4a728c950c861770ab0b5498730435da5b.1683369521.git.poptsov.artyom@gmail.com>
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
Date: Sat, 6 May 2023 13:34:30 +0300
Subject: [PATCH] gnu: Add pngcheck.
* gnu/packages/image.scm (pngcheck): New variable.
---
gnu/packages/image.scm | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
Toggle diff (62 lines)
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 2485bbb943..058afa1f39 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -37,6 +37,7 @@
;;; Copyright © 2022-2023 Bruno Victal <mirai@makinata.eu>
;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2023 Nicolas Goaziou <mail@nicolasgoaziou.fr>
+;;; Copyright © 2023 Artyom V. Poptsov <poptsov.artyom@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -322,6 +323,45 @@ (define-public pngcrush
images. It can further losslessly compress them by as much as 40%.")
(license license:zlib)))
+(define-public pngcheck
+ (package
+ (name "pngcheck")
+ (version "3.0.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://www.libpng.org/pub/png/src/pngcheck-" version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "1rny14v57d2zvnqcqbh3m87mkya22qr2394fg7vm3xsacf8l8sn3"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:tests? #f ;no check target
+ #:phases (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (invoke "make" "-f" "Makefile.unx")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin/")))
+ (install-file "pngcheck" bin)))))))
+ (inputs (list zlib))
+ (home-page "http://www.libpng.org/pub/png/apps/pngcheck.html")
+ (synopsis "Print info and check PNG, JNG and MNG files")
+ (description
+ "@code{pngcheck} verifies the integrity of PNG, JNG and MNG files (by
+checking the internal 32-bit CRCs, a.k.a. checksums, and decompressing the image
+data); it can optionally dump almost all of the chunk-level information in the image
+in human-readable form. For example, it can be used to print the basic statistics
+about an image (dimensions, bit depth, etc.); to list the color and transparency info
+in its palette (assuming it has one); or to extract the embedded text annotations.
+This is a command-line program with batch capabilities (e.g. @code{pngcheck
+*.png}.)")
+ (license license:expat)))
+
(define-public pnglite
(let ((commit "11695c56f7d7db806920bd9229b69f230e6ffb38")
(revision "1"))
base-commit: 64086a4fa449a9f6d2f835fcdf5498222b309e3a
--
2.34.1
Thanks,
- Artyom
--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----
iQFNBAEBCgA3FiEE0MLqwTMQgi2Y3rV86cWi2QiYoC8FAmRWLvkZHHBvcHRzb3Yu
YXJ0eW9tQGdtYWlsLmNvbQAKCRDpxaLZCJigL1duCACpJ9cvtjmBzN4OhOvISpUc
UBrd32zw4Cm2vqiPMzw5WyPoZ4orziBUQDmMLRsV8JQgmD5zx4vfkRuu0q0TFo3A
1cepzohgY37lUzdAH9nHtU7grfuGTZz9jk0wemwMDw3Ciwc3DvfIxNIHETtN9v3a
07zo95ndvUxudKzDLbBQyJj1qA1DjIs1MtKjZIIfkxvHkaqVOSwiyLZKnm//r3Pd
RsEGEvKSpP25vOlqpbYhddgM8RjDAESvPwloeOELAfQ497Djn3ApKVpUc7liGc5V
ajmOLs5KfsRDpa2SBfbvRMD3+ykD9yU3d+51sx9y4nET9mbVhoECub/AWkyU1yhY
=ZVBx
-----END PGP SIGNATURE-----