all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#26817: [PATCH] gnu: Add pngcrunch.
@ 2017-05-07 17:24 Hartmut Goebel
  2017-05-07 23:36 ` Leo Famulari
  0 siblings, 1 reply; 5+ messages in thread
From: Hartmut Goebel @ 2017-05-07 17:24 UTC (permalink / raw)
  To: 26817

* gnu/packages/image.scm (pngcrunch): New variable.
---
 gnu/packages/image.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 1a11085..3368e23 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -155,6 +155,40 @@ 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") "/"))
+              (("\\$\\(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")
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-05-09 18:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-07 17:24 bug#26817: [PATCH] gnu: Add pngcrunch Hartmut Goebel
2017-05-07 23:36 ` Leo Famulari
2017-05-08  7:27   ` Hartmut Goebel
2017-05-08 17:26     ` Leo Famulari
2017-05-09 18:12       ` Hartmut Goebel

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.