blob: b9b3a54df13bd9a823daf7800cc016b71e41ca61 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
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'
revision 1
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
|