diff options
author | Hartmut Goebel <h.goebel@crazy-compilers.com> | 2017-05-07 19:23:56 +0200 |
---|---|---|
committer | Hartmut Goebel <h.goebel@crazy-compilers.com> | 2017-05-09 20:08:30 +0200 |
commit | 2f8b9c4648ef7b52e0bbae040914b007f565f877 (patch) | |
tree | cdb2ec570ec5e029f84fd8e3c50da02710de9e68 | |
parent | 1d438b03bc0cb42b9a477fbe7d9538f57c8d3972 (diff) | |
download | gnu-guix-2f8b9c4648ef7b52e0bbae040914b007f565f877.tar gnu-guix-2f8b9c4648ef7b52e0bbae040914b007f565f877.tar.gz |
gnu: Add pngcrunch.
* gnu/packages/image.scm (pngcrunch): New variable.
-rw-r--r-- | gnu/packages/image.scm | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 1a1108563d..de8043d236 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -15,6 +15,7 @@ ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net> ;;; Copyright © 2016, 2017 Kei Kebreau <kei@openmailbox.org> ;;; Copyright © 2017 ng0 <contact.ng0@cryptolab.net> +;;; Copyright © 2017 Hartmut Goebel <h.goebel@crazy-compilers.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -155,6 +156,41 @@ APNG patch provides APNG support to libpng.") (sha256 (base32 "1n2lrzjkm5jhfg2bs10q398lkwbbx742fi27zgdgx0x23zhj0ihg")))))) +(define-public pngcrunch + (package + (name "pngcrunch") + (version "1.8.11") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/pmt/pngcrush/" + version "/pngcrush-" version ".tar.xz")) + (sha256 (base32 + "1c7m316i91jp3h1dj1ppppdv6zilm2njk1wrpqy2zj0fcll06lwd")))) + (build-system gnu-build-system) + (arguments + '(#:make-flags '("-f" "Makefile-nolib") + #:tests? #f ; no check target + #:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + (substitute* "Makefile-nolib" + (("^(PNG(INC|LIB) = )/usr/local/" line vardef) + (string-append vardef (assoc-ref inputs "libpng") "/")) + (("^(Z(INC|LIB) = )/usr/local/" line vardef) + (string-append vardef (assoc-ref inputs "zlib") "/")) + ;; The Makefile is written by hand and not using $PREFIX + (("\\$\\(DESTDIR\\)/usr/") + (string-append (assoc-ref outputs "out") "/")))))))) + (inputs + `(("libpng" ,libpng) + ("zlib" , zlib))) + (home-page "https://pmt.sourceforge.net/pngcrush") + (synopsis "Utility to compress PNG files") + (description "pngcrusqh is an optimizer for PNG (Portable Network Graphics) +files. It can compress them as much as 40% losslessly.") + (license license:zlib))) + (define-public libjpeg (package (name "libjpeg") |