From 4196133e2250e2c853fd8390b6e4b48130f62768 Mon Sep 17 00:00:00 2001 From: andrejrabcenko Date: Mon, 25 Sep 2023 01:07:46 +0300 Subject: [PATCH] new file: projects/fftw.org/package.yml new file: projects/fftw.org/fftw.c --- projects/fftw.org/fftw.c | 14 +++++++++++ projects/fftw.org/package.yml | 45 +++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 projects/fftw.org/fftw.c create mode 100644 projects/fftw.org/package.yml 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