2011-12-22 00:05:22 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Chromaprint < Formula
|
|
|
|
homepage 'http://acoustid.org/chromaprint'
|
2012-02-10 12:20:50 +00:00
|
|
|
url 'https://github.com/downloads/lalinsky/chromaprint/chromaprint-0.6.tar.gz'
|
|
|
|
md5 '6b5a4f2685395e68d8abc40d1c2a8785'
|
|
|
|
|
|
|
|
def options
|
|
|
|
[['--without-examples', "Don't build examples (including fpcalc)"]]
|
|
|
|
end
|
2011-12-22 00:05:22 +00:00
|
|
|
|
|
|
|
depends_on 'cmake' => :build
|
2012-02-10 12:20:50 +00:00
|
|
|
depends_on 'ffmpeg' unless ARGV.include? '--without-examples'
|
2011-12-22 00:05:22 +00:00
|
|
|
|
|
|
|
def install
|
2012-02-10 12:20:50 +00:00
|
|
|
if ARGV.include? '--without-examples'
|
2012-02-22 05:12:27 +00:00
|
|
|
args = std_cmake_parameters
|
2012-02-10 12:20:50 +00:00
|
|
|
else
|
2012-02-22 05:12:27 +00:00
|
|
|
args = std_cmake_parameters + ' -DBUILD_EXAMPLES=ON'
|
2012-02-10 12:20:50 +00:00
|
|
|
end
|
2012-02-22 05:12:27 +00:00
|
|
|
system "cmake #{args} ."
|
2011-12-22 00:05:22 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|