homebrew-core/Formula/webp.rb
2015-03-18 12:39:59 +00:00

35 lines
1.2 KiB
Ruby

class Webp < Formula
homepage "https://developers.google.com/speed/webp/"
url "http://downloads.webmproject.org/releases/webp/libwebp-0.4.3.tar.gz"
sha256 "efbe0d58fda936f2ed99d0b837ed7087d064d6838931f282c4618d2a3f7390c4"
bottle do
cellar :any
sha256 "5aaf06ba6c36b7877b19629f704918708d32d2a5a9b3e100b7fc2f033223e0cb" => :yosemite
sha256 "3a44d990fd058d594b46a5d24b579e0f5da10c1a2779e992a980c6bd946be41f" => :mavericks
sha256 "a96249caa1541d335ab594fdd0af221109be00baa94d82429048deb56ed88008" => :mountain_lion
end
option :universal
depends_on "libpng"
depends_on "jpeg" => :recommended
depends_on "libtiff" => :optional
depends_on "giflib" => :optional
def install
ENV.universal_binary if build.universal?
system "./configure", "--disable-dependency-tracking",
"--enable-libwebpmux",
"--enable-libwebpdemux",
"--enable-libwebpdecoder",
"--prefix=#{prefix}"
system "make", "install"
end
test do
system "#{bin}/cwebp", test_fixtures("test.png"), "-o", "webp_test.png"
system "#{bin}/dwebp", "webp_test.png", "-o", "webp_test.webp"
assert File.exist?("webp_test.webp")
end
end