From 0b7875c3e3dfb1965991985c9508b63ec6e13cf3 Mon Sep 17 00:00:00 2001 From: David Christenson Date: Wed, 9 Jul 2014 00:34:49 -0600 Subject: mozjpeg 1.0.1 (new formula) Add mozjpeg, a JPEG encoder created by Mozilla that focuses on efficient encoding. --- Library/Formula/mozjpeg.rb | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Library/Formula/mozjpeg.rb (limited to 'Library') diff --git a/Library/Formula/mozjpeg.rb b/Library/Formula/mozjpeg.rb new file mode 100644 index 000000000..87ff3d525 --- /dev/null +++ b/Library/Formula/mozjpeg.rb @@ -0,0 +1,31 @@ +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" + + 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 -- cgit v1.2.3