diff options
| author | royhodgman | 2011-03-01 01:45:00 +0200 |
|---|---|---|
| committer | Adam Vandenberg | 2011-04-13 23:15:54 -0700 |
| commit | 098b060d82962902dcd4741338d5f0a447a88d84 (patch) | |
| tree | c9e35cef3893f872415ff3cec07bf802362330e5 /Library/Formula | |
| parent | f41a3b896c2850f0efbb051113bd8860b74af27b (diff) | |
| download | homebrew-098b060d82962902dcd4741338d5f0a447a88d84.tar.bz2 | |
phash 0.9.4
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/phash.rb | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Library/Formula/phash.rb b/Library/Formula/phash.rb new file mode 100644 index 000000000..226e3d442 --- /dev/null +++ b/Library/Formula/phash.rb @@ -0,0 +1,38 @@ +require 'formula' + +class Phash < Formula + url 'http://www.phash.org/releases/pHash-0.9.4.tar.gz' + homepage 'http://www.phash.org/' + sha1 '9710b8a1d4d24e7fc3ac43c33eac8e89d9e727d7' + + depends_on 'cimg' unless ARGV.include? "--disable-image-hash" and ARGV.include? "--disable-video-hash" + depends_on 'ffmpeg' unless ARGV.include? "--disable-video-hash" + + unless ARGV.include? "--disable-audio-hash" + depends_on 'libsndfile' + depends_on 'libsamplerate' + depends_on 'mpg123' + end + + def options + [ + ["--disable-image-hash", "Disable image hash"], + ["--disable-video-hash", "Disable video hash"], + ["--disable-audio-hash", "Disable audio hash"] + ] + end + + def install + args = ["--disable-debug", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--enable-shared"] + + # disable specific hashes if specified as an option + args << "--disable-image-hash" if ARGV.include? "--disable-image-hash" + args << "--disable-video-hash" if ARGV.include? "--disable-video-hash" + args << "--disable-audio-hash" if ARGV.include? "--disable-audio-hash" + + system "./configure", *args + system "make install" + end +end |
