summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-support/fftw/fftw/club-libtool.patch9
-rw-r--r--meta-oe/recipes-support/fftw/fftw/install-bench.patch41
-rw-r--r--meta-oe/recipes-support/fftw/fftw/run-ptest30
-rw-r--r--meta-oe/recipes-support/fftw/fftw_3.3.8.bb22
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
3cd fftw
4/usr/bin/perl -w ./check.pl -r -c=30 -v `pwd`/bench
5fftw_result=$?
6cd ../fftwf
7/usr/bin/perl -w ./check.pl -r -c=30 -v `pwd`/benchf
8fftwf_result=$?
9cd ../fftwl
10/usr/bin/perl -w ./check.pl -r -c=30 -v `pwd`/benchl
11fftwl_result=$?
12
13echo -n "fftw test result:"
14if [ $fftw_result = "0" ]; then
15 echo PASSED
16else
17 echo FAILED
18fi
19echo -n "fftwf test result:"
20if [ $fftwf_result = "0" ]; then
21 echo PASSED
22else
23 echo FAILED
24fi
25echo -n "fftwl test result:"
26if [ $fftwl_result = "0" ]; then
27 echo PASSED
28else
29 echo FAILED
30fi
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"
6SRC_URI = " \ 6SRC_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"
10SRC_URI[md5sum] = "8aac833c943d8e90d51b697b27d4384d" 12SRC_URI[md5sum] = "8aac833c943d8e90d51b697b27d4384d"
11SRC_URI[sha256sum] = "6113262f6e92c5bd474f2875fa1b01054c4ad5040f6b0da7c03c98821d9ae303" 13SRC_URI[sha256sum] = "6113262f6e92c5bd474f2875fa1b01054c4ad5040f6b0da7c03c98821d9ae303"
12 14
13inherit autotools pkgconfig 15inherit autotools pkgconfig ptest
14 16
15# we had multiple recipes in the past 17# we had multiple recipes in the past
16PROVIDES = "fftwl fftwf" 18PROVIDES = "fftwl fftwf"
@@ -65,6 +67,22 @@ do_install() {
65 done 67 done
66} 68}
67 69
70do_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
69PACKAGES =+ "libfftw libfftwl libfftwf" 87PACKAGES =+ "libfftw libfftwl libfftwf"
70FILES_libfftw = "${libdir}/libfftw3.so.* ${libdir}/libfftw3_*.so.*" 88FILES_libfftw = "${libdir}/libfftw3.so.* ${libdir}/libfftw3_*.so.*"
@@ -79,5 +97,7 @@ FILES_fftw-wisdom-to-conf = "${bindir}/fftw-wisdom-to-conf"
79 97
80FILES_${PN}-dev += "${libdir}/cmake" 98FILES_${PN}-dev += "${libdir}/cmake"
81RDEPENDS_${PN}-dev = "libfftw libfftwl libfftwf" 99RDEPENDS_${PN}-dev = "libfftw libfftwl libfftwf"
100RDEPENDS_${PN}-ptest += "perl"
101RDEPENDS_${PN}-ptest_remove = "fftw"
82 102
83BBCLASSEXTEND = "native" 103BBCLASSEXTEND = "native"