2014-06-17 06:50:23 +00:00
|
|
|
require "formula"
|
2009-06-04 18:21:19 +00:00
|
|
|
|
2014-04-27 20:03:34 +00:00
|
|
|
# Stay at least one version behind and use the old-versions directory, because
|
|
|
|
# tarballs are routinely removed and upstream won't change this practice.
|
2011-03-10 05:11:03 +00:00
|
|
|
class Pngcrush < Formula
|
2014-06-17 06:50:23 +00:00
|
|
|
homepage "http://pmt.sourceforge.net/pngcrush/"
|
|
|
|
url "https://downloads.sourceforge.net/project/pmt/pngcrush/1.7.76/pngcrush-1.7.76.tar.gz"
|
|
|
|
sha1 "bfe29dc46196cef792ffaebf7349256dcc6e7017"
|
2009-06-04 18:21:19 +00:00
|
|
|
|
|
|
|
def install
|
2012-04-18 20:53:57 +00:00
|
|
|
# Required to successfully build the bundled zlib 1.2.6
|
|
|
|
ENV.append_to_cflags "-DZ_SOLO"
|
2012-09-13 12:49:56 +00:00
|
|
|
# Required to enable "-cc" (color counting) option (disabled by default since 1.5.1)
|
|
|
|
ENV.append_to_cflags "-DPNGCRUSH_COUNT_COLORS"
|
2012-04-18 20:53:57 +00:00
|
|
|
|
2012-03-11 21:43:58 +00:00
|
|
|
system "make", "CC=#{ENV.cc}",
|
|
|
|
"LD=#{ENV.cc}",
|
|
|
|
"CFLAGS=#{ENV.cflags}",
|
|
|
|
"LDFLAGS=#{ENV.ldflags}"
|
2014-06-17 06:50:23 +00:00
|
|
|
bin.install "pngcrush"
|
2009-06-04 18:21:19 +00:00
|
|
|
end
|
2009-07-31 00:28:27 +00:00
|
|
|
end
|