From patchwork Sat May 6 12:38:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Artyom V. Poptsov" X-Patchwork-Id: 49830 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 889EE27BBEA; Sat, 6 May 2023 13:39:21 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED,URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0C4FE27BBE2 for ; Sat, 6 May 2023 13:39:20 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pvHBo-0001op-LF; Sat, 06 May 2023 08:39:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pvHBm-0001oJ-PO for guix-patches@gnu.org; Sat, 06 May 2023 08:39:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pvHBm-0004LV-38 for guix-patches@gnu.org; Sat, 06 May 2023 08:39:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pvHBl-0006rv-Pp for guix-patches@gnu.org; Sat, 06 May 2023 08:39:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63326] [PATCH] gnu: Add pngcheck. Resent-From: "Artyom V. Poptsov" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 06 May 2023 12:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63326 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63326@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168337669726345 (code B ref -1); Sat, 06 May 2023 12:39:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 May 2023 12:38:17 +0000 Received: from localhost ([127.0.0.1]:59605 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvHB2-0006qq-L7 for submit@debbugs.gnu.org; Sat, 06 May 2023 08:38:17 -0400 Received: from lists.gnu.org ([209.51.188.17]:42116) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pvHB0-0006qg-5M for submit@debbugs.gnu.org; Sat, 06 May 2023 08:38:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pvHAz-0001HY-UT for guix-patches@gnu.org; Sat, 06 May 2023 08:38:13 -0400 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pvHAx-00040x-U0 for guix-patches@gnu.org; Sat, 06 May 2023 08:38:13 -0400 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-4f0108a7d20so3151117e87.3 for ; Sat, 06 May 2023 05:38:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683376688; x=1685968688; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:to:from:from:to:cc:subject:date:message-id:reply-to; bh=/nTqCWtnmynhCD2ro+oV6iyqVOlqKeHCJ7f1p2KwI1Q=; b=PHs9Eqp+DJBTsKIMC83p3h4MPMtturCsLUJbyRWTK1y0lFo5YVb9A3lbCrSroZEefV Pvvcs9vUqc0PM1PnC5ZV811QPS0CYvQg8wZspzByb7KvZwCP3GZrIkyysfZLuf4j1hA2 Bx5s94tvI3HphOzLxoFPd0fNHLxXatxQKPDzxDtSurVSArAkFAg0prHBJvdX2TMXq6t3 P4qMOQIsvXVpVjFbCZHlB/9O9zRwnUdqkP4yhHWx1XJJBsX4BJDNhf99rvSOlkVlzmfG PIYqgZ5NK+/+JL6XmZRTtHyZ/D6gL/eGp7XNR03oNOApSfXzYy9Jl/FU/tumQODLf2kW 3A5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683376688; x=1685968688; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=/nTqCWtnmynhCD2ro+oV6iyqVOlqKeHCJ7f1p2KwI1Q=; b=TGWVNSEmgTPARbcaCEM+UFxgpSwY92W39L5wHsWru+Vyd9D0k57nQDQP671TiKLoDe cWV5MQEYPgtUVmjR+tDiI2QrDh/weRzehLjRH/ZCFXbmO+msrPGouqYvwgjlxBFxvh2u 7jfszTqPkK2625m4MDGPuZipaEamkUuG/TWuf8+GRGVjcW8msRbpR++piT8eCLdYyQ/S MrLg1w6ZpeWD18Zr6/UCGSZZXL1m3cg9aP71khHsBSgtyIWCsNYF3InUuLN8bnzFhDn+ hwMq0m2mjMGqxcxREExHzE28fuugmz0TYe7Kl6iiY6czL/WtYtl1LEQYoVyS3X5xLO/N I0dA== X-Gm-Message-State: AC+VfDymoaL4nhPQbtmCKQa9X0VS/xwoyOdXRbtGa0cAIFpk9yCvFH4c PRdL7XMHd6eUWACaGB1QgJNGeuEHtJg= X-Google-Smtp-Source: ACHHUZ70/v/18xktO3qK9/YfQEy0n0fnSijko5zrT744yebC//pQeMoXg7U+1V5KOTBACQlB0ML1+Q== X-Received: by 2002:a19:f004:0:b0:4f1:223c:dc83 with SMTP id p4-20020a19f004000000b004f1223cdc83mr1242112lfc.48.1683376688349; Sat, 06 May 2023 05:38:08 -0700 (PDT) Received: from elephant ([95.79.66.161]) by smtp.gmail.com with ESMTPSA id f7-20020ac24e47000000b004e90dee5469sm639743lfr.157.2023.05.06.05.38.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 May 2023 05:38:07 -0700 (PDT) From: "Artyom V. Poptsov" References: <87h6sphhc6.fsf@gmail.com> Date: Sat, 06 May 2023 15:38:03 +0300 In-Reply-To: <87h6sphhc6.fsf@gmail.com> (Artyom V. Poptsov's message of "Sat, 06 May 2023 13:42:01 +0300") Message-ID: <87cz3dhbys.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::133; envelope-from=poptsov.artyom@gmail.com; helo=mail-lf1-x133.google.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_SBL_A=0.1 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches I found some inconsistencies in my patch so here's the fixed version. Changes: - It seems that "pngcheck" has X11 license, according to FSF: 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 From 139f4ae8e39ece3c8dc9aec009149bdff81d0589 Mon Sep 17 00:00:00 2001 Message-Id: <139f4ae8e39ece3c8dc9aec009149bdff81d0589.1683376614.git.poptsov.artyom@gmail.com> From: "Artyom V. Poptsov" 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 ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2023 Nicolas Goaziou +;;; Copyright © 2023 Artyom V. Poptsov ;;; ;;; 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