homebrew-core/Formula/pngcrush.rb

21 lines
682 B
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class Pngcrush < Formula
homepage 'http://pmt.sourceforge.net/pngcrush/'
url 'http://downloads.sourceforge.net/project/pmt/pngcrush/1.7.41/pngcrush-1.7.41.tar.gz'
sha1 '1048f086479c5b7660eabbf5bbd426ba1d53026c'
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}"
2009-06-14 23:55:18 +00:00
bin.install 'pngcrush'
end
end