homebrew-core/Formula/pngcrush.rb
2013-02-26 08:01:34 -08: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.51/pngcrush-1.7.51.tar.gz'
sha1 'e9bcf17fe601b4a6260a58106400594da95efd11'
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