diff --git a/projects/fftw.org/fftw.c b/projects/fftw.org/fftw.c new file mode 100644 index 00000000..a780cf18 --- /dev/null +++ b/projects/fftw.org/fftw.c @@ -0,0 +1,14 @@ +#include +int main(int argc, char* *argv) +{ + fftw_complex *in, *out; + fftw_plan p; + long N = 1; + in = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * N); + out = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * N); + p = fftw_plan_dft_1d(N, in, out, FFTW_FORWARD, FFTW_ESTIMATE); + fftw_execute(p); /* repeat as needed */ + fftw_destroy_plan(p); + fftw_free(in); fftw_free(out); + return 0; +} \ No newline at end of file diff --git a/projects/fftw.org/package.yml b/projects/fftw.org/package.yml new file mode 100644 index 00000000..c854c1b2 --- /dev/null +++ b/projects/fftw.org/package.yml @@ -0,0 +1,45 @@ +distributable: + url: https://fftw.org/fftw-{{version}}.tar.gz + strip-components: 1 +versions: + url: https://fftw.org/download.html + match: /fftw-\d+\.\d+\.\d+\.tar\.gz/ + strip: + - /^fftw-/ + - /\.tar\.gz/ +dependencies: + open-mpi.org: '*' +build: + dependencies: + tea.xyz/gx/cc: c99 + tea.xyz/gx/make: '*' + freedesktop.org/pkg-config: '*' + script: + - ./configure --enable-single $ARGS + - make --jobs {{hw.concurrency}} install + - make clean + - ./configure $ARGS + - make --jobs {{hw.concurrency}} install + - make clean + - ./configure --enable-long-double $ARGS + - make --jobs {{hw.concurrency}} install + env: + CC: "{{deps.tea.xyz/gx/cc.prefix}}/bin/clang" + ARGS: + - --enable-shared + - --disable-debug + - --prefix={{prefix}} + - --enable-threads + - --disable-dependency-tracking +provides: + - bin/fftw-wisdom + - bin/fftw-wisdom-to-conf + - bin/fftwf-wisdom + - bin/fftwl-wisdom +test: + dependencies: + tea.xyz/gx/cc: c99 + script: + - fftw-wisdom --version | grep {{version}} + - cc -o fftw fftw.c -lfftw3 + - ./fftw