Skip to content

Instantly share code, notes, and snippets.

@kashif
Created November 3, 2010 00:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kashif/660570 to your computer and use it in GitHub Desktop.
Save kashif/660570 to your computer and use it in GitHub Desktop.
Homebrew formula for libjpeg-turbo, a high-speed version of libjpeg for x86 and x86-64 processors which uses SIMD instructions (MMX, SSE2, etc.) to accelerate baseline JPEG compression and decompression.
require 'formula'
class LibjpegTurbo <Formula
url 'http://downloads.sourceforge.net/sourceforge/libjpeg-turbo/libjpeg-turbo-1.0.1.tar.gz'
homepage 'http://libjpeg-turbo.virtualgl.org/'
md5 'e94b72694c9afd716458367dfe84ce1e'
if Hardware.is_64_bit?
depends_on 'nasm'
end
def install
configure_flags = ["--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}"]
if Hardware.is_64_bit?
configure_flags << "--host x86_64-apple-darwin NASM=#{HOMEBREW_PREFIX}/bin/nasm"
end
system "./configure", *configure_flags
system "make install"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment