blob: d9e0ea3409c06e067f84df1f62e345ef8ad163d0 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001DESCRIPTION = "FFTW"
2SECTION = "libs"
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
5
6SRC_URI = " \
7 http://www.fftw.org/fftw-${PV}.tar.gz \
8 file://0001-NEON-autodetection-segfaults-assume-neon-present.patch \
9"
10SRC_URI[md5sum] = "8aac833c943d8e90d51b697b27d4384d"
11SRC_URI[sha256sum] = "6113262f6e92c5bd474f2875fa1b01054c4ad5040f6b0da7c03c98821d9ae303"
12
13inherit autotools pkgconfig
14
15# we had multiple recipes in the past
16PROVIDES = "fftwl fftwf"
17
18EXTRA_OECONF = "--disable-fortran --enable-shared --enable-threads"
19
20CFLAGS += "-D_GNU_SOURCE"
21
22# neon is optional for arm version < 8 -> check tune features
23FFTW_NEON = "${@bb.utils.contains('TUNE_FEATURES', 'neon', '--enable-neon', '', d)}"
24# neon is suppored for arm version = 8 -> enable
25FFTW_NEON_aarch64 = "--enable-neon"
26FFTW_NEON_class-native = ""
27
28do_configure() {
29 # configure fftw
30 rm -rf ${WORKDIR}/build-fftw
31 mkdir -p ${B}
32 cd ${B}
33 # full (re)configure
34 autotools_do_configure
35 mv ${B} ${WORKDIR}/build-fftw
36
37 # configure fftwl
38 rm -rf ${WORKDIR}/build-fftwl
39 mkdir -p ${B}
40 cd ${B}
41 # configure only
42 oe_runconf --enable-long-double
43 mv ${B} ${WORKDIR}/build-fftwl
44
45 # configure fftwf
46 rm -rf ${WORKDIR}/build-fftwf
47 mkdir -p ${B}
48 cd ${B}
49 # configure only
50 oe_runconf --enable-single ${FFTW_NEON}
51 mv ${B} ${WORKDIR}/build-fftwf
52}
53
54do_compile() {
55 for lib in fftw fftwl fftwf; do
56 cd ${WORKDIR}/build-$lib
57 autotools_do_compile
58 done
59}
60
61do_install() {
62 for lib in fftw fftwl fftwf; do
63 cd ${WORKDIR}/build-$lib
64 autotools_do_install
65 done
66}
67
68
69PACKAGES =+ "libfftw libfftwl libfftwf"
70FILES_libfftw = "${libdir}/libfftw3.so.* ${libdir}/libfftw3_*.so.*"
71FILES_libfftwl = "${libdir}/libfftw3l.so.* ${libdir}/libfftw3l_*.so.*"
72FILES_libfftwf = "${libdir}/libfftw3f.so.* ${libdir}/libfftw3f_*.so.*"
73
74PACKAGES =+ "fftw-wisdom fftwl-wisdom fftwf-wisdom fftw-wisdom-to-conf"
75FILES_fftw-wisdom = "${bindir}/fftw-wisdom"
76FILES_fftwl-wisdom = "${bindir}/fftwl-wisdom"
77FILES_fftwf-wisdom = "${bindir}/fftwf-wisdom"
78FILES_fftw-wisdom-to-conf = "${bindir}/fftw-wisdom-to-conf"
79
80FILES_${PN}-dev += "${libdir}/cmake"
81RDEPENDS_${PN}-dev = "libfftw libfftwl libfftwf"
82
83BBCLASSEXTEND = "native"