diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/ffts.rb | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Library/Formula/ffts.rb b/Library/Formula/ffts.rb new file mode 100644 index 000000000..5bcaba8ab --- /dev/null +++ b/Library/Formula/ffts.rb @@ -0,0 +1,33 @@ +require "formula" + +class Ffts < Formula + homepage "http://anthonix.com/ffts/" + head "https://github.com/anthonix/ffts.git" + url "http://anthonix.com/ffts/releases/ffts-0.7.tar.gz" + sha1 "8318dc460413d952d2468c8bc9aa2e484bb72d98" + + def install + system "./configure", "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--enable-sse", + "--enable-single" + system "make", "install" + end + + test do + (testpath/"test.c").write <<-EOS.undent + #include <ffts/ffts.h> + #define align(x) __attribute__((aligned(x))) + int main(void) { + const size_t n = 8; + float align(32) input[n] = {0.0, }; + float align(32) output[n]; + ffts_plan_t* plan = ffts_init_1d(n, 1); + ffts_execute(plan, input, output); + ffts_free(plan); + } + EOS + system ENV.cc, "test.c", "-lffts", "-o", "test" + system "./test" + end +end |
