-
Notifications
You must be signed in to change notification settings - Fork 6
37 lines (32 loc) · 1.06 KB
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
30
31
32
33
34
35
36
37
class MozjpegAT33 < Formula
desc "Improved JPEG encoder"
homepage "https://github.com/mozilla/mozjpeg"
url "https://github.com/mozilla/mozjpeg/archive/v3.3.1.tar.gz"
sha256 "aebbea60ea038a84a2d1ed3de38fdbca34027e2e54ee2b7d08a97578be72599d"
license "BSD-3-Clause"
revision 1
livecheck do
url :stable
regex(/^v?(\d+(?:\.\d+)+)$/i)
end
keg_only "mozjpeg is not linked to prevent conflicts with the standard libjpeg"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
depends_on "nasm" => :build
depends_on "pkg-config" => :build
depends_on "libpng"
def install
system "autoreconf", "-fvi"
system "./configure", "--prefix=#{prefix}",
"--disable-dependency-tracking",
"--with-jpeg8"
system "make", "install"
end
test do
system bin/"jpegtran", "-crop", "1x1",
"-transpose", "-optimize",
"-outfile", "out.jpg",
test_fixtures("test.jpg")
end
end