2011-01-28 19:43:36 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Ecasound < Formula
|
2011-01-28 19:43:36 +00:00
|
|
|
homepage 'http://www.eca.cx/ecasound/'
|
2013-12-09 21:31:56 +00:00
|
|
|
url 'http://ecasound.seul.org/download/ecasound-2.9.0.tar.gz'
|
|
|
|
sha1 'aed604742968085a8e95cdebb21dc62f1d90d2b5'
|
2011-01-28 19:43:36 +00:00
|
|
|
|
2012-08-28 04:31:40 +00:00
|
|
|
option "with-ruby", "Compile with ruby support"
|
2011-10-31 07:59:36 +00:00
|
|
|
|
2013-12-09 21:31:56 +00:00
|
|
|
# 2.9.0 uses clock_gettime which is not available on OS X, patch upstream:
|
|
|
|
# http://sourceforge.net/p/ecasound/code/ci/6524048e0717dfbbf7e243edb5b96b40e5983782/tree/kvutils/kvu_threads.cpp?diff=4db2d070691fbabf6af47c68f054a9efcb6d8d47
|
|
|
|
def patches; DATA; end
|
|
|
|
|
|
|
|
fails_with :clang do
|
|
|
|
build 500
|
|
|
|
cause <<-EOS.undent
|
|
|
|
clang does not like the fstream imports ecasound uses.
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
|
2011-01-28 19:43:36 +00:00
|
|
|
def install
|
2012-08-28 04:31:40 +00:00
|
|
|
args = %W[
|
|
|
|
--disable-debug
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--prefix=#{prefix}
|
|
|
|
]
|
2013-11-30 16:55:43 +00:00
|
|
|
args << ("--enable-rubyecasound=" + ((build.with? 'ruby') ? 'yes' : 'no'))
|
2011-10-31 07:59:36 +00:00
|
|
|
system "./configure", *args
|
2011-01-28 19:43:36 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
2013-12-09 21:31:56 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
--- a/kvutils/kvu_threads.cpp
|
|
|
|
+++ b/kvutils/kvu_threads.cpp
|
|
|
|
@@ -122,8 +122,15 @@
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
+#if defined(CLOCK_REALTIME)
|
|
|
|
res = clock_gettime(CLOCK_REALTIME, out);
|
|
|
|
out->tv_sec += seconds;
|
|
|
|
+#else
|
|
|
|
+ struct timeval tv;
|
|
|
|
+ res = gettimeofday(&tv, NULL);
|
|
|
|
+ out->tv_sec = tv.tv_sec + seconds;
|
|
|
|
+ out->tv_nsec = tv.tv_usec * 1000;
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
return res;
|