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

* bug#26817: [PATCH] gnu: Add pngcrunch.
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Leo Famulari @ 2017-05-07 23:36 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: 26817

[-- Attachment #1: Type: text/plain, Size: 404 bytes --]

On Sun, May 07, 2017 at 07:24:59PM +0200, Hartmut Goebel wrote:
> * gnu/packages/image.scm (pngcrunch): New variable.

Thanks, LGTM overall!

> +              (("\\$\\(DESTDIR\\)/usr/")
> +               (string-append (assoc-ref outputs "out") "/"))))))))

That's strange; DESTDIR is typically an intermediate location between
the source directory and PREFIX. I assume this Makefile is written by
hand?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* bug#26817: [PATCH] gnu: Add pngcrunch.
  2017-05-07 23:36 ` Leo Famulari
@ 2017-05-08  7:27   ` Hartmut Goebel
  2017-05-08 17:26     ` Leo Famulari
  0 siblings, 1 reply; 5+ messages in thread
From: Hartmut Goebel @ 2017-05-08  7:27 UTC (permalink / raw)
  To: Leo Famulari; +Cc: 26817

[-- Attachment #1: Type: text/plain, Size: 576 bytes --]

Am 08.05.2017 um 01:36 schrieb Leo Famulari:
>> > +              (("\\$\\(DESTDIR\\)/usr/")
>> > +               (string-append (assoc-ref outputs "out") "/"))))))))
> That's strange; DESTDIR is typically an intermediate location between
> the source directory and PREFIX. I assume this Makefile is written by
> hand?

Yes, it is written by hand and not using e.g PREFIX :-(

Should I add a comment?

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |


[-- Attachment #2: Type: text/html, Size: 1419 bytes --]

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

* bug#26817: [PATCH] gnu: Add pngcrunch.
  2017-05-08  7:27   ` Hartmut Goebel
@ 2017-05-08 17:26     ` Leo Famulari
  2017-05-09 18:12       ` Hartmut Goebel
  0 siblings, 1 reply; 5+ messages in thread
From: Leo Famulari @ 2017-05-08 17:26 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: 26817

[-- Attachment #1: Type: text/plain, Size: 562 bytes --]

On Mon, May 08, 2017 at 09:27:36AM +0200, Hartmut Goebel wrote:
> Am 08.05.2017 um 01:36 schrieb Leo Famulari:
> >> > +              (("\\$\\(DESTDIR\\)/usr/")
> >> > +               (string-append (assoc-ref outputs "out") "/"))))))))
> > That's strange; DESTDIR is typically an intermediate location between
> > the source directory and PREFIX. I assume this Makefile is written by
> > hand?
> 
> Yes, it is written by hand and not using e.g PREFIX :-(
> 
> Should I add a comment?

Yes, I think a brief comment would help other readers later on.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* bug#26817: [PATCH] gnu: Add pngcrunch.
  2017-05-08 17:26     ` Leo Famulari
@ 2017-05-09 18:12       ` Hartmut Goebel
  0 siblings, 0 replies; 5+ messages in thread
From: Hartmut Goebel @ 2017-05-09 18:12 UTC (permalink / raw)
  To: 26817-close

Add a comment and pushed as
2f8b9c4648ef7b52e0bbae040914b007f565f877

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

^ permalink raw reply	[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.