diff mbox

gnu: Add optipng.

Message ID 20160925015836.13632-1-arunisaac@systemreboot.net
State New
Headers show

Commit Message

Arun Sept. 25, 2016, 1:58 a.m. UTC
* gnu/packages/image.scm (optipng): New variable.
---
 gnu/packages/image.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

Comments

Arun Sept. 25, 2016, 7:25 a.m. UTC | #1
I just noticed that I forgot to add the copyright header. If someone
reviews the patch and everything else is fine, I'll send an updated
patch with the copyright header.

Thanks.
Kei Yamashita Sept. 25, 2016, 4:20 p.m. UTC | #2
Arun Isaac <arunisaac@systemreboot.net> writes:

> I just noticed that I forgot to add the copyright header. If someone
> reviews the patch and everything else is fine, I'll send an updated
> patch with the copyright header.
>
> Thanks.

Everything looks and works fine for me.
Leo Famulari Sept. 25, 2016, 4:52 p.m. UTC | #3
On Sun, Sep 25, 2016 at 12:20:40PM -0400, Kei Kebreau wrote:
> Arun Isaac <arunisaac@systemreboot.net> writes:
> 
> > I just noticed that I forgot to add the copyright header. If someone
> > reviews the patch and everything else is fine, I'll send an updated
> > patch with the copyright header.
> >
> > Thanks.
> 
> Everything looks and works fine for me.

LGTM assuming that `guix lint` does not complain about anything :)
Arun Sept. 25, 2016, 8:28 p.m. UTC | #4
`guix lint` reports no issues on my side. Somebody should probably check it on
their machine anyway. I am sending an updated patch with the copyright header
included.
diff mbox

Patch

diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 931cad1..b998f45 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -932,3 +932,35 @@  statistical tests.")
 all included libraries only the image loading and decoding library is
 installed as @code{stb_image}.")
       (license license:public-domain))))
+
+(define-public optipng
+  (package
+    (name "optipng")
+    (version "0.7.6")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://prdownloads.sourceforge.net/optipng/optipng-"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "105yk5qykvhiahzag67gm36s2kplxf6qn5hay02md0nkrcgn6w28"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("zlib" ,zlib)))
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         ;; configure script does not accept arguments CONFIG_SHELL and SHELL
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (zero? (system* "sh" "configure"
+                             (string-append "--prefix=" (assoc-ref outputs "out")))))))))
+    (synopsis "Optimizer that recompresses PNG image files to a
+smaller size")
+    (description "OptiPNG is a PNG optimizer that recompresses image
+files to a smaller size, without losing any information.  This program
+also converts external formats (BMP, GIF, PNM and TIFF) to optimized
+PNG, and performs PNG integrity checks and corrections.")
+    (home-page "http://optipng.sourceforge.net/")
+    (license license:zlib)))