2011-12-22 00:05:22 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Chromaprint < Formula
|
|
|
|
homepage 'http://acoustid.org/chromaprint'
|
2013-10-11 16:27:42 +00:00
|
|
|
url 'https://bitbucket.org/acoustid/chromaprint/downloads/chromaprint-1.0.tar.gz'
|
|
|
|
sha1 '919e012af588a7e6fea862b29a30e3a5da67526a'
|
2012-02-10 12:20:50 +00:00
|
|
|
|
2012-08-26 06:30:52 +00:00
|
|
|
option 'without-examples', "Don't build examples (including fpcalc)"
|
2011-12-22 00:05:22 +00:00
|
|
|
|
|
|
|
depends_on 'cmake' => :build
|
2014-03-06 20:40:26 +00:00
|
|
|
depends_on 'ffmpeg' if build.with? "examples"
|
2011-12-22 00:05:22 +00:00
|
|
|
|
2013-11-17 03:55:41 +00:00
|
|
|
# Upstream patch:
|
|
|
|
# https://bitbucket.org/acoustid/chromaprint/commits/d0a8d8bc7c1ad5bda3294836f49184fe34a92454
|
2014-03-18 17:13:30 +00:00
|
|
|
patch :DATA
|
2013-11-17 03:55:41 +00:00
|
|
|
|
2011-12-22 00:05:22 +00:00
|
|
|
def install
|
2012-05-22 21:37:04 +00:00
|
|
|
args = std_cmake_args
|
2014-03-06 20:40:26 +00:00
|
|
|
args << '-DBUILD_EXAMPLES=ON' if build.with? "examples"
|
2012-05-22 21:37:04 +00:00
|
|
|
system "cmake", ".", *args
|
2011-12-22 00:05:22 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
2013-11-17 03:55:41 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/src/utils.h b/src/utils.h
|
|
|
|
index 47c6b98..76fb240 100644
|
|
|
|
--- a/src/utils.h
|
|
|
|
+++ b/src/utils.h
|
|
|
|
@@ -28,6 +28,7 @@
|
|
|
|
#include <math.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
+#include <algorithm>
|
|
|
|
#include <limits>
|
|
|
|
#include <iterator>
|