diff options
-rw-r--r-- | meta-oe/recipes-support/fftw/fftw/club-libtool.patch | 9 | ||||
-rw-r--r-- | meta-oe/recipes-support/fftw/fftw/install-bench.patch | 41 | ||||
-rw-r--r-- | meta-oe/recipes-support/fftw/fftw/run-ptest | 30 | ||||
-rw-r--r-- | meta-oe/recipes-support/fftw/fftw_3.3.8.bb | 22 |
4 files changed, 101 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/fftw/fftw/club-libtool.patch b/meta-oe/recipes-support/fftw/fftw/club-libtool.patch new file mode 100644 index 000000000..d4a1ef8d0 --- /dev/null +++ b/meta-oe/recipes-support/fftw/fftw/club-libtool.patch | |||
@@ -0,0 +1,9 @@ | |||
1 | --- ./tests/Makefile.am.orig 2021-03-23 11:45:12.756371739 -0400 | ||
2 | +++ ./tests/Makefile.am 2021-03-23 11:46:43.224132851 -0400 | ||
3 | @@ -1,5 +1,5 @@ | ||
4 | AM_CPPFLAGS = -I $(top_srcdir) | ||
5 | -noinst_PROGRAMS = bench | ||
6 | +bin_PROGRAMS = bench@PREC_SUFFIX@ | ||
7 | EXTRA_DIST = check.pl README | ||
8 | |||
9 | if THREADS | ||
diff --git a/meta-oe/recipes-support/fftw/fftw/install-bench.patch b/meta-oe/recipes-support/fftw/fftw/install-bench.patch new file mode 100644 index 000000000..ef570b19d --- /dev/null +++ b/meta-oe/recipes-support/fftw/fftw/install-bench.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | --- ./tests/Makefile.am.orig 2021-03-23 11:45:12.756371739 -0400 | ||
2 | +++ ./tests/Makefile.am 2021-03-23 19:29:19.692180793 -0400 | ||
3 | @@ -1,21 +1,21 @@ | ||
4 | AM_CPPFLAGS = -I $(top_srcdir) | ||
5 | -noinst_PROGRAMS = bench | ||
6 | +bin_PROGRAMS = bench@PREC_SUFFIX@ | ||
7 | EXTRA_DIST = check.pl README | ||
8 | |||
9 | if THREADS | ||
10 | -bench_CFLAGS = $(PTHREAD_CFLAGS) | ||
11 | +bench@PREC_SUFFIX@_CFLAGS = $(PTHREAD_CFLAGS) | ||
12 | if !COMBINED_THREADS | ||
13 | LIBFFTWTHREADS = $(top_builddir)/threads/libfftw3@PREC_SUFFIX@_threads.la | ||
14 | endif | ||
15 | else | ||
16 | if OPENMP | ||
17 | -bench_CFLAGS = $(OPENMP_CFLAGS) | ||
18 | +bench@PREC_SUFFIX@_CFLAGS = $(OPENMP_CFLAGS) | ||
19 | LIBFFTWTHREADS = $(top_builddir)/threads/libfftw3@PREC_SUFFIX@_omp.la | ||
20 | endif | ||
21 | endif | ||
22 | |||
23 | -bench_SOURCES = bench.c hook.c fftw-bench.c fftw-bench.h | ||
24 | -bench_LDADD = $(LIBFFTWTHREADS) \ | ||
25 | +bench@PREC_SUFFIX@_SOURCES = bench.c hook.c fftw-bench.c fftw-bench.h | ||
26 | +bench@PREC_SUFFIX@_LDADD = $(LIBFFTWTHREADS) \ | ||
27 | $(top_builddir)/libfftw3@PREC_SUFFIX@.la \ | ||
28 | $(top_builddir)/libbench2/libbench2.a $(THREADLIBS) | ||
29 | |||
30 | --- ./tools/Makefile.am.orig 2021-03-24 08:22:31.845581620 -0400 | ||
31 | +++ ./tools/Makefile.am 2021-03-24 08:24:26.454053573 -0400 | ||
32 | @@ -24,7 +24,7 @@ | ||
33 | endif | ||
34 | |||
35 | fftw@PREC_SUFFIX@_wisdom_SOURCES = fftw-wisdom.c | ||
36 | -fftw@PREC_SUFFIX@_wisdom_LDADD = $(top_builddir)/tests/bench-bench.o \ | ||
37 | -$(top_builddir)/tests/bench-fftw-bench.o $(LIBFFTWTHREADS) \ | ||
38 | +fftw@PREC_SUFFIX@_wisdom_LDADD = $(top_builddir)/tests/bench@PREC_SUFFIX@-bench.o \ | ||
39 | +$(top_builddir)/tests/bench@PREC_SUFFIX@-fftw-bench.o $(LIBFFTWTHREADS) \ | ||
40 | $(top_builddir)/libfftw3@PREC_SUFFIX@.la \ | ||
41 | $(top_builddir)/libbench2/libbench2.a $(THREADLIBS) | ||
diff --git a/meta-oe/recipes-support/fftw/fftw/run-ptest b/meta-oe/recipes-support/fftw/fftw/run-ptest new file mode 100644 index 000000000..6d8dd96f0 --- /dev/null +++ b/meta-oe/recipes-support/fftw/fftw/run-ptest | |||
@@ -0,0 +1,30 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | cd fftw | ||
4 | /usr/bin/perl -w ./check.pl -r -c=30 -v `pwd`/bench | ||
5 | fftw_result=$? | ||
6 | cd ../fftwf | ||
7 | /usr/bin/perl -w ./check.pl -r -c=30 -v `pwd`/benchf | ||
8 | fftwf_result=$? | ||
9 | cd ../fftwl | ||
10 | /usr/bin/perl -w ./check.pl -r -c=30 -v `pwd`/benchl | ||
11 | fftwl_result=$? | ||
12 | |||
13 | echo -n "fftw test result:" | ||
14 | if [ $fftw_result = "0" ]; then | ||
15 | echo PASSED | ||
16 | else | ||
17 | echo FAILED | ||
18 | fi | ||
19 | echo -n "fftwf test result:" | ||
20 | if [ $fftwf_result = "0" ]; then | ||
21 | echo PASSED | ||
22 | else | ||
23 | echo FAILED | ||
24 | fi | ||
25 | echo -n "fftwl test result:" | ||
26 | if [ $fftwl_result = "0" ]; then | ||
27 | echo PASSED | ||
28 | else | ||
29 | echo FAILED | ||
30 | fi | ||
diff --git a/meta-oe/recipes-support/fftw/fftw_3.3.8.bb b/meta-oe/recipes-support/fftw/fftw_3.3.8.bb index d9e0ea340..de175d629 100644 --- a/meta-oe/recipes-support/fftw/fftw_3.3.8.bb +++ b/meta-oe/recipes-support/fftw/fftw_3.3.8.bb | |||
@@ -6,11 +6,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" | |||
6 | SRC_URI = " \ | 6 | SRC_URI = " \ |
7 | http://www.fftw.org/fftw-${PV}.tar.gz \ | 7 | http://www.fftw.org/fftw-${PV}.tar.gz \ |
8 | file://0001-NEON-autodetection-segfaults-assume-neon-present.patch \ | 8 | file://0001-NEON-autodetection-segfaults-assume-neon-present.patch \ |
9 | file://install-bench.patch \ | ||
10 | file://run-ptest \ | ||
9 | " | 11 | " |
10 | SRC_URI[md5sum] = "8aac833c943d8e90d51b697b27d4384d" | 12 | SRC_URI[md5sum] = "8aac833c943d8e90d51b697b27d4384d" |
11 | SRC_URI[sha256sum] = "6113262f6e92c5bd474f2875fa1b01054c4ad5040f6b0da7c03c98821d9ae303" | 13 | SRC_URI[sha256sum] = "6113262f6e92c5bd474f2875fa1b01054c4ad5040f6b0da7c03c98821d9ae303" |
12 | 14 | ||
13 | inherit autotools pkgconfig | 15 | inherit autotools pkgconfig ptest |
14 | 16 | ||
15 | # we had multiple recipes in the past | 17 | # we had multiple recipes in the past |
16 | PROVIDES = "fftwl fftwf" | 18 | PROVIDES = "fftwl fftwf" |
@@ -65,6 +67,22 @@ do_install() { | |||
65 | done | 67 | done |
66 | } | 68 | } |
67 | 69 | ||
70 | do_install_ptest() { | ||
71 | for lib in fftw fftwl fftwf; do | ||
72 | install -d ${D}${PTEST_PATH}/$lib | ||
73 | install -m 0755 ${S}/tests/check.pl ${D}${PTEST_PATH}/$lib | ||
74 | cd ${WORKDIR}/build-$lib | ||
75 | if [ $lib = "fftw" ]; then | ||
76 | mv ${D}${bindir}/bench ${D}${PTEST_PATH}/$lib | ||
77 | fi | ||
78 | if [ $lib = "fftwl" ]; then | ||
79 | mv ${D}${bindir}/benchl ${D}${PTEST_PATH}/$lib | ||
80 | fi | ||
81 | if [ $lib = "fftwf" ]; then | ||
82 | mv ${D}${bindir}/benchf ${D}${PTEST_PATH}/$lib | ||
83 | fi | ||
84 | done | ||
85 | } | ||
68 | 86 | ||
69 | PACKAGES =+ "libfftw libfftwl libfftwf" | 87 | PACKAGES =+ "libfftw libfftwl libfftwf" |
70 | FILES_libfftw = "${libdir}/libfftw3.so.* ${libdir}/libfftw3_*.so.*" | 88 | FILES_libfftw = "${libdir}/libfftw3.so.* ${libdir}/libfftw3_*.so.*" |
@@ -79,5 +97,7 @@ FILES_fftw-wisdom-to-conf = "${bindir}/fftw-wisdom-to-conf" | |||
79 | 97 | ||
80 | FILES_${PN}-dev += "${libdir}/cmake" | 98 | FILES_${PN}-dev += "${libdir}/cmake" |
81 | RDEPENDS_${PN}-dev = "libfftw libfftwl libfftwf" | 99 | RDEPENDS_${PN}-dev = "libfftw libfftwl libfftwf" |
100 | RDEPENDS_${PN}-ptest += "perl" | ||
101 | RDEPENDS_${PN}-ptest_remove = "fftw" | ||
82 | 102 | ||
83 | BBCLASSEXTEND = "native" | 103 | BBCLASSEXTEND = "native" |