From 03adfaa97ebd06972743887e251ff790eb07b472 Mon Sep 17 00:00:00 2001 From: David Holm Date: Sat, 29 Nov 2014 10:33:37 +0100 Subject: ffts 0.7 Closes #34547. Signed-off-by: Mike McQuaid --- Library/Formula/ffts.rb | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Library/Formula/ffts.rb (limited to 'Library/Formula') 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 + #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 -- cgit v1.2.3