diff options
| author | Rui Pereira | 2012-04-26 10:44:51 +0200 |
|---|---|---|
| committer | Adam Vandenberg | 2012-06-29 19:48:36 -0700 |
| commit | 5b364d475f28cb59750832b768326ec4c7ef8f24 (patch) | |
| tree | 1ea8255decbc93d5394331381504ed0ef5cb2ce1 /Library/Formula | |
| parent | 129a7644276c1739a3de57f8281c1014440b992a (diff) | |
| download | homebrew-5b364d475f28cb59750832b768326ec4c7ef8f24.tar.bz2 | |
libjpeg-turbo 1.2.0
libjpeg-turbo is a derivative of libjpeg that uses
SIMD instructions (MMX, SSE2, NEON) to accelerate
baseline JPEG compression and decompression on
x86, x86-64, and ARM systems.
Closes #11894.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/jpeg-turbo.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Library/Formula/jpeg-turbo.rb b/Library/Formula/jpeg-turbo.rb new file mode 100644 index 000000000..0b4e6b711 --- /dev/null +++ b/Library/Formula/jpeg-turbo.rb @@ -0,0 +1,25 @@ +require 'formula' + +class JpegTurbo < Formula + homepage 'http://www.libjpeg-turbo.org/' + url 'http://downloads.sourceforge.net/project/libjpeg-turbo/1.2.0/libjpeg-turbo-1.2.0.tar.gz' + sha1 '4ab00afc9a8d54cd2e7a67aacb9c49e01a8bccac' + + depends_on 'nasm' => :build if MacOS.prefer_64_bit? + + keg_only "libjpeg-turbo is not linked to prevent conflicts with the standard libjpeg." + + def install + args = ["--disable-dependency-tracking", "--prefix=#{prefix}"] + args << "--host=x86_64-apple-darwin" if MacOS.prefer_64_bit? + system "./configure", *args + system "make install" + end + + def test + mktemp do + system "#{bin}/jpegtran -crop 500x500+200+500 -transpose -perfect -outfile test.jpg /System/Library/CoreServices/DefaultDesktop.jpg" + system "/usr/bin/qlmanage", "-p", "test.jpg" + end + end +end |
