aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/mozjpeg.rb31
1 files changed, 31 insertions, 0 deletions
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