* [bug#63326] [PATCH] gnu: Add pngcheck.
@ 2023-05-06 10:42 Artyom V. Poptsov
2023-05-06 12:38 ` Artyom V. Poptsov
0 siblings, 1 reply; 3+ messages in thread
From: Artyom V. Poptsov @ 2023-05-06 10:42 UTC (permalink / raw)
To: 63326
[-- Attachment #1.1: Type: text/plain, Size: 87 bytes --]
Hello,
this patch adds "pngcheck":
http://www.libpng.org/pub/png/apps/pngcheck.html
[-- Attachment #1.2: 0001-gnu-Add-pngcheck.patch --]
[-- Type: text/x-diff, Size: 3153 bytes --]
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(+)
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
[-- Attachment #1.3: Type: text/plain, Size: 230 bytes --]
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 519 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [bug#63326] [PATCH] gnu: Add pngcheck.
2023-05-06 10:42 [bug#63326] [PATCH] gnu: Add pngcheck Artyom V. Poptsov
@ 2023-05-06 12:38 ` Artyom V. Poptsov
2023-06-14 21:18 ` bug#63326: " Ludovic Courtès
0 siblings, 1 reply; 3+ messages in thread
From: Artyom V. Poptsov @ 2023-05-06 12:38 UTC (permalink / raw)
To: 63326
[-- Attachment #1.1: Type: text/plain, Size: 70 bytes --]
I found some inconsistencies in my patch so here's the fixed version.
[-- Attachment #1.2: 0001-gnu-Add-pngcheck.patch --]
[-- Type: text/x-diff, Size: 4267 bytes --]
From 139f4ae8e39ece3c8dc9aec009149bdff81d0589 Mon Sep 17 00:00:00 2001
Message-Id: <139f4ae8e39ece3c8dc9aec009149bdff81d0589.1683376614.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 | 57 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 2485bbb943..dfe885a0d9 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,62 @@ (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")))
+ (add-after 'build 'compress-man-pages
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (invoke "gzip" "pngcheck.1")
+ (invoke "gzip" "gpl/pngsplit.1")
+ (invoke "gzip" "gpl/png-fix-IDAT-windowsize.1")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin/"))
+ (man (string-append out "/share/man/man1/")))
+ (install-file "pngcheck" bin)
+ (install-file "pngcheck.1.gz" man)
+ (install-file "pngsplit" bin)
+ (install-file "gpl/pngsplit.1.gz" man)
+ (install-file "png-fix-IDAT-windowsize" bin)
+ (install-file "gpl/png-fix-IDAT-windowsize.1.gz" man)))))))
+ (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}.)
+
+Also includes @code{pngsplit} which can split a PNG, MNG or JNG file into individual,
+numbered chunks, and @code{png-fix-IDAT-windowsize} that allow to reset first IDAT's
+zlib window-size bytes and fix up CRC to match.")
+ ;; "pngsplit" and "png-fix-IDAT-windowsize" are licensed under the terms of
+ ;; GNU GPL2+. See "gpl/COPYING" in the repository."
+ (license (list license:x11 license:gpl2+))))
+
(define-public pnglite
(let ((commit "11695c56f7d7db806920bd9229b69f230e6ffb38")
(revision "1"))
base-commit: 64086a4fa449a9f6d2f835fcdf5498222b309e3a
--
2.34.1
[-- Attachment #1.3: Type: text/plain, Size: 580 bytes --]
Changes:
- It seems that "pngcheck" has X11 license, according to FSF:
<https://directory.fsf.org/wiki/Pngcheck#tab=Details>
So I've added "license:gpl2+" to the package licenses.
- I've updated the patch to install "pngsplit" and
"png-fix-IDAT-windowsize" binaries as well.
- Now MAN pages for all three programs are installed too.
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 519 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#63326: [PATCH] gnu: Add pngcheck.
2023-05-06 12:38 ` Artyom V. Poptsov
@ 2023-06-14 21:18 ` Ludovic Courtès
0 siblings, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2023-06-14 21:18 UTC (permalink / raw)
To: Artyom V. Poptsov; +Cc: 63326-done
Hi,
"Artyom V. Poptsov" <poptsov.artyom@gmail.com> skribis:
> From 139f4ae8e39ece3c8dc9aec009149bdff81d0589 Mon Sep 17 00:00:00 2001
> Message-Id: <139f4ae8e39ece3c8dc9aec009149bdff81d0589.1683376614.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.
Applied, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-14 21:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-06 10:42 [bug#63326] [PATCH] gnu: Add pngcheck Artyom V. Poptsov
2023-05-06 12:38 ` Artyom V. Poptsov
2023-06-14 21:18 ` bug#63326: " Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.