homebrew-core/Formula/pngcrush.rb
Chongyu Zhu ab4f381fe1 pngcrush 1.7.50
Closes Homebrew/homebrew#17834.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-02-14 12:17:23 -06:00

20 lines
682 B
Ruby

require 'formula'
class Pngcrush < Formula
homepage 'http://pmt.sourceforge.net/pngcrush/'
url 'http://downloads.sourceforge.net/project/pmt/pngcrush/1.7.50/pngcrush-1.7.50.tar.gz'
sha1 '467f58ed0028cc4c430efa9ff2150095482d5ab9'
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