homebrew-core/Formula/webp.rb
Bennett Blodinger 6c3d632d1a webp: add extra optional dependencies
Closes Homebrew/homebrew#28619.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2014-04-23 23:16:49 -07:00

32 lines
977 B
Ruby

require 'formula'
class Webp < Formula
homepage 'http://code.google.com/speed/webp/'
url 'https://webp.googlecode.com/files/libwebp-0.4.0.tar.gz'
sha1 '326c4b6787a01e5e32a9b30bae76442d18d2d1b6'
head 'https://chromium.googlesource.com/webm/libwebp', :branch => 'master'
revision 1
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", \
"/usr/share/doc/cups/images/cups.png", "-o", "webp_test.png"
system "#{bin}/dwebp", "webp_test.png", "-o", "webp_test.webp"
end
end