homebrew-core/Formula/pngcrush.rb
J. Patrick Sunday 701fd71dd0 pngcrush 1.7.54
Closes Homebrew/homebrew#18743.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-03-26 01:30:24 -05:00

20 lines
679 B
Ruby

require 'formula'
class Pngcrush < Formula
homepage 'http://pmt.sourceforge.net/pngcrush/'
url 'http://sourceforge.net/projects/pmt/files/pngcrush/1.7.54/pngcrush-1.7.54.tar.gz'
sha1 '3528cbde3e0acef2906e9e48f57b92bd9a1890e6'
def install
# Required to successfully build the bundled zlib 1.2.6
ENV.append_to_cflags "-DZ_SOLO"
# Required to enable "-cc" (color counting) option (disabled by default since 1.5.1)
ENV.append_to_cflags "-DPNGCRUSH_COUNT_COLORS"
system "make", "CC=#{ENV.cc}",
"LD=#{ENV.cc}",
"CFLAGS=#{ENV.cflags}",
"LDFLAGS=#{ENV.ldflags}"
bin.install 'pngcrush'
end
end