homebrew-core/Formula/pngcrush.rb
Brian Donovan 7cd7e90147 pngcrush 1.7.69
1.7.60 seems to have been removed from the downloads folder.

Closes Homebrew/homebrew#26820.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-02-18 14:48:17 -05:00

23 lines
860 B
Ruby

require 'formula'
class Pngcrush < Formula
homepage 'http://pmt.sourceforge.net/pngcrush/'
# Stay at least one version behind and use the old-versions directory,
# because tarballs are routinely removed and upstream won't change this
# practice.
url 'http://downloads.sourceforge.net/project/pmt/pngcrush/old-versions/1.7/1.7.69/pngcrush-1.7.69.tar.gz'
sha1 'ccc2a4c678da44673087dd63c98fafca68b1670d'
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