2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-06-04 18:21:19 +00:00
|
|
|
|
|
|
|
class Fftw <Formula
|
|
|
|
@homepage='http://www.fftw.org'
|
2010-02-24 15:09:58 +00:00
|
|
|
@url='http://www.fftw.org/fftw-3.2.2.tar.gz'
|
|
|
|
@md5='b616e5c91218cc778b5aa735fefb61ae'
|
2009-06-04 18:21:19 +00:00
|
|
|
|
|
|
|
def install
|
2010-04-11 14:08:07 +00:00
|
|
|
# single precision
|
|
|
|
# enable-sse only works with single
|
2009-08-07 14:41:43 +00:00
|
|
|
system "./configure", "--enable-shared",
|
|
|
|
"--disable-debug",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--enable-threads",
|
|
|
|
"--enable-single",
|
|
|
|
"--enable-sse",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--disable-fortran"
|
2009-06-04 18:21:19 +00:00
|
|
|
system "make install"
|
2009-08-07 14:41:43 +00:00
|
|
|
|
2010-04-11 14:08:07 +00:00
|
|
|
# clean up so we can compile the double precision variant
|
|
|
|
system "make clean"
|
|
|
|
|
|
|
|
# double precision
|
|
|
|
# enable-sse2 only works with double precision (default)
|
|
|
|
system "./configure", "--enable-shared",
|
|
|
|
"--disable-debug",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--enable-threads",
|
|
|
|
"--enable-sse2",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--disable-fortran"
|
|
|
|
|
|
|
|
system "make install"
|
|
|
|
|
|
|
|
# clean up so we can compile the long-double precision variant
|
|
|
|
system "make clean"
|
|
|
|
|
|
|
|
# long-double precision
|
|
|
|
# no SIMD optimization available
|
|
|
|
system "./configure", "--enable-shared",
|
|
|
|
"--disable-debug",
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--enable-threads",
|
|
|
|
"--enable-long-double",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--disable-fortran"
|
|
|
|
|
|
|
|
system "make install"
|
|
|
|
|
2009-06-04 18:21:19 +00:00
|
|
|
#wtf file?
|
2010-06-04 18:56:52 +00:00
|
|
|
(prefix+'share/info/dir').unlink
|
2009-06-04 18:21:19 +00:00
|
|
|
end
|
2010-04-11 14:08:07 +00:00
|
|
|
end
|