2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-06-04 18:21:19 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Pngcrush < Formula
|
2009-09-28 03:43:50 +00:00
|
|
|
homepage 'http://pmt.sourceforge.net/pngcrush/'
|
2013-04-12 04:25:32 +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.
|
2013-06-20 23:08:35 +00:00
|
|
|
url 'http://downloads.sourceforge.net/project/pmt/pngcrush/old-versions/1.7/1.7.56/pngcrush-1.7.56.tar.gz'
|
2013-04-03 14:27:43 +00:00
|
|
|
sha1 'deb45dadf5a162d2e02efd242ea4eee0d3b31727'
|
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}"
|
2009-06-14 23:55:18 +00:00
|
|
|
bin.install 'pngcrush'
|
2009-06-04 18:21:19 +00:00
|
|
|
end
|
2009-07-31 00:28:27 +00:00
|
|
|
end
|