swftools: use optional deps

This commit is contained in:
Jack Nagel 2013-01-31 18:23:33 -06:00
parent 015a6f5ae4
commit 2acbec4cea

View file

@ -11,16 +11,12 @@ class Swftools < Formula
sha1 'd7cf8874c4187d2edd3e40d20ba325ca17b91973'
option 'with-xpdf', 'Build with PDF support'
option 'with-jpeg', 'Build with JPEG support'
option 'with-lame', 'Build with MP3 support'
option 'with-giflib', 'Build with GIF support'
option 'with-fftw', 'Build with FFTW support'
depends_on :x11 if build.include? "with-xpdf"
depends_on 'jpeg' if build.include? "with-jpeg"
depends_on 'lame' if build.include? "with-lame"
depends_on 'giflib' if build.include? "with-giflib"
depends_on 'fftw' if build.include? "with-fftw"
depends_on :x11 if build.with? "xpdf"
depends_on 'jpeg' => :optional
depends_on 'lame' => :optional
depends_on 'giflib' => :optional
depends_on 'fftw' => :optional
def patches
# Fixes a conftest for libfftwf.dylib that mistakenly calls fftw_malloc()
@ -31,7 +27,7 @@ class Swftools < Formula
end
def install
XpdfTarball.new.brew { (buildpath+'lib/pdf').install Dir['*'] } if build.include? "with-xpdf"
XpdfTarball.new.brew { (buildpath+'lib/pdf').install Dir['*'] } if build.with? "xpdf"
system "./configure", "--prefix=#{prefix}"
system "make"
system "make install"