diff options
| author | Mike McQuaid | 2012-09-02 01:12:52 -0700 |
|---|---|---|
| committer | Mike McQuaid | 2012-09-04 19:44:44 -0700 |
| commit | 49572b7f1089da9422857e8fa7b479c109d3211b (patch) | |
| tree | 766eb60a28396ef3b6d82a69e5ef206993a9c528 /Library | |
| parent | 2cba36324ad5b297507a46714ec3c781c8382b8e (diff) | |
| download | homebrew-49572b7f1089da9422857e8fa7b479c109d3211b.tar.bz2 | |
swftools: fix test and X11 dependency.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/swftools.rb | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/Library/Formula/swftools.rb b/Library/Formula/swftools.rb index 0ff7a1e49..3dc19f76f 100644 --- a/Library/Formula/swftools.rb +++ b/Library/Formula/swftools.rb @@ -10,11 +10,17 @@ class Swftools < Formula url 'http://www.swftools.org/swftools-0.9.2.tar.gz' sha1 'd7cf8874c4187d2edd3e40d20ba325ca17b91973' - depends_on :x11 - depends_on 'jpeg' - depends_on 'lame' - depends_on 'giflib' - depends_on 'fftw' + 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" def patches # Fixes a conftest for libfftwf.dylib that mistakenly calls fftw_malloc() @@ -25,11 +31,18 @@ class Swftools < Formula end def install - Xpdf.new.brew { (buildpath+'lib/pdf').install Dir['*'] } + Xpdf.new.brew { (buildpath+'lib/pdf').install Dir['*'] } if build.include? "with-xpdf" system "./configure", "--prefix=#{prefix}" system "make" system "make install" end + + def test + mktemp do + system "#{bin}/png2swf", "swftools_test.swf", \ + "/System/Library/Frameworks/SecurityInterface.framework/Versions/A/Resources/Key_Large.png" + end + end end __END__ |
