2014-07-09 06:34:49 +00:00
|
|
|
require "formula"
|
|
|
|
|
|
|
|
class Mozjpeg < Formula
|
|
|
|
homepage "https://github.com/mozilla/mozjpeg"
|
|
|
|
url "https://github.com/mozilla/mozjpeg/archive/v1.0.1.tar.gz"
|
|
|
|
sha1 "daa28d6396a66d04b92fad223b763dd306d68bd9"
|
|
|
|
|
|
|
|
head "https://github.com/mozilla/mozjpeg.git"
|
|
|
|
|
2014-07-09 17:35:12 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "77a8c981cda61d97804d155484f7ea89a0a729b3" => :mavericks
|
|
|
|
sha1 "bff1e31287c8e23c91d5254b20288f93e0494e2d" => :mountain_lion
|
|
|
|
sha1 "2438fd34c748e6b4ff39ef9f3c66a7864b10b71c" => :lion
|
|
|
|
end
|
|
|
|
|
2014-07-09 06:34:49 +00:00
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "libtool" => :build
|
|
|
|
depends_on "nasm" => :build
|
|
|
|
|
|
|
|
keg_only "mozjpeg is not linked to prevent conflicts with the standard libjpeg."
|
|
|
|
|
|
|
|
def install
|
|
|
|
system "autoreconf", "-i"
|
|
|
|
system "./configure", "--prefix=#{prefix}",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--with-jpeg8"
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/jpegtran", "-crop", "500x500+200+500",
|
|
|
|
"-transpose", "-optimize",
|
|
|
|
"-outfile", "test.jpg",
|
|
|
|
"/System/Library/CoreServices/DefaultDesktop.jpg"
|
|
|
|
end
|
|
|
|
end
|