aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/ffts.rb
diff options
context:
space:
mode:
authorDavid Holm2014-11-29 10:33:37 +0100
committerMike McQuaid2014-11-29 11:34:05 +0000
commit03adfaa97ebd06972743887e251ff790eb07b472 (patch)
treeedb2f1179db9ebe789974baf5dc7621a6b359edc /Library/Formula/ffts.rb
parentc010c2a34a38769a0359239135f6a57739a71fb7 (diff)
downloadhomebrew-03adfaa97ebd06972743887e251ff790eb07b472.tar.bz2
ffts 0.7
Closes #34547. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula/ffts.rb')
-rw-r--r--Library/Formula/ffts.rb33
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