homebrew-core/Formula/webp.rb
David McKeone 2aadf385a9 webp: add --universal
Closes Homebrew/homebrew#25124.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-12-10 23:01:39 -08:00

28 lines
815 B
Ruby

require 'formula'
class Webp < Formula
homepage 'http://code.google.com/speed/webp/'
url 'https://webp.googlecode.com/files/libwebp-0.3.1.tar.gz'
sha1 '52e3d2b6c0b80319baa33b8ebed89618769d9dd8'
option :universal
depends_on :libpng
depends_on 'jpeg' => :recommended
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", \
"/usr/share/doc/cups/images/cups.png", "-o", "webp_test.png"
system "#{bin}/dwebp", "webp_test.png", "-o", "webp_test.webp"
end
end