homebrew-core/Formula/pngcrush.rb
Christian Schuhmann f6ce6263f1 pngcrush: add DPNGCRUSH_COUNT_COLORS flag
Fixes Homebrew/homebrew#8670.
Closes Homebrew/homebrew#14908.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-10-01 19:27:29 -07: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.38/pngcrush-1.7.38.tar.gz'
sha1 'ed156aaa53b1b48fa0d3e32466d0d5512b25a67a'
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