From bfb2a6b078f437ffbdc5681405840a8fea6988f8 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Fri, 10 Apr 2015 17:52:06 +0800 Subject: pngcheck: modernize and add test --- Library/Formula/pngcheck.rb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'Library') diff --git a/Library/Formula/pngcheck.rb b/Library/Formula/pngcheck.rb index fc51d195a..80f576fc0 100644 --- a/Library/Formula/pngcheck.rb +++ b/Library/Formula/pngcheck.rb @@ -1,9 +1,7 @@ -require 'formula' - class Pngcheck < Formula - homepage 'http://www.libpng.org/pub/png/apps/pngcheck.html' - url 'https://downloads.sourceforge.net/project/png-mng/pngcheck/2.3.0/pngcheck-2.3.0.tar.gz' - sha1 'e7f1535abbf2f809e036a9a43c759eeac5e39350' + homepage "http://www.libpng.org/pub/png/apps/pngcheck.html" + url "https://downloads.sourceforge.net/project/png-mng/pngcheck/2.3.0/pngcheck-2.3.0.tar.gz" + sha1 "e7f1535abbf2f809e036a9a43c759eeac5e39350" revision 1 bottle do @@ -14,7 +12,11 @@ class Pngcheck < Formula end def install - system 'make -f Makefile.unx ZINC= ZLIB=-lz' + system "make", "-f", "Makefile.unx", "ZINC=", "ZLIB=-lz" bin.install %w[pngcheck pngsplit png-fix-IDAT-windowsize] end + + test do + system bin/"pngcheck", test_fixtures("test.png") + end end -- cgit v1.2.3