2011-06-13 19:56:25 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Webp < Formula
|
|
|
|
homepage 'http://code.google.com/speed/webp/'
|
2014-01-15 17:33:49 +00:00
|
|
|
url 'https://webp.googlecode.com/files/libwebp-0.4.0.tar.gz'
|
|
|
|
sha1 '326c4b6787a01e5e32a9b30bae76442d18d2d1b6'
|
2014-04-22 20:07:53 +00:00
|
|
|
head 'https://chromium.googlesource.com/webm/libwebp', :branch => 'master'
|
2014-06-09 16:05:57 +00:00
|
|
|
|
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "917f008789d42387a236bf2f91c7c32e35ac8726" => :mavericks
|
|
|
|
sha1 "8585b90461bfee0e0a79a82a0ea939ad5aa9e64d" => :mountain_lion
|
|
|
|
sha1 "3faef81ac165696eaf3631a8ce27c5a5f5ceb83b" => :lion
|
|
|
|
end
|
|
|
|
|
2014-03-23 02:51:41 +00:00
|
|
|
revision 1
|
2011-06-13 19:56:25 +00:00
|
|
|
|
2013-12-10 22:00:41 +00:00
|
|
|
option :universal
|
|
|
|
|
2014-03-23 02:51:41 +00:00
|
|
|
depends_on 'libpng'
|
2012-09-02 08:14:31 +00:00
|
|
|
depends_on 'jpeg' => :recommended
|
2014-04-22 20:00:07 +00:00
|
|
|
depends_on 'libtiff' => :optional
|
|
|
|
depends_on 'giflib' => :optional
|
2011-11-19 22:14:52 +00:00
|
|
|
|
2011-06-13 19:56:25 +00:00
|
|
|
def install
|
2013-12-10 22:00:41 +00:00
|
|
|
ENV.universal_binary if build.universal?
|
2012-07-29 14:55:04 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
2013-07-08 18:42:03 +00:00
|
|
|
"--enable-libwebpmux",
|
|
|
|
"--enable-libwebpdemux",
|
|
|
|
"--enable-libwebpdecoder",
|
2012-07-29 14:55:04 +00:00
|
|
|
"--prefix=#{prefix}"
|
2011-06-13 19:56:25 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
2012-09-02 08:14:31 +00:00
|
|
|
|
2013-02-02 05:12:57 +00:00
|
|
|
test do
|
|
|
|
system "#{bin}/cwebp", \
|
2013-07-12 14:44:53 +00:00
|
|
|
"/usr/share/doc/cups/images/cups.png", "-o", "webp_test.png"
|
2013-02-02 05:12:57 +00:00
|
|
|
system "#{bin}/dwebp", "webp_test.png", "-o", "webp_test.webp"
|
2012-09-02 08:14:31 +00:00
|
|
|
end
|
2011-11-30 18:56:07 +00:00
|
|
|
end
|