blob: aae6ec952ada075ae558d8925e456d3846f3eeb1 [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001DESCRIPTION = "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] = "0d5915d7d39b3253c1cc05030d79ac47"
11SRC_URI[sha256sum] = "3b609b7feba5230e8f6dd8d245ddbefac324c5a6ae4186947670d9ac2cd25573"
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
22FFTW_NEON = "${@bb.utils.contains('TUNE_FEATURES', 'neon', '--enable-neon', '', d)}"
23FFTW_NEON_class-native = ""
24
25do_configure() {
26 # configure fftw
27 rm -rf ${WORKDIR}/build-fftw
28 mkdir -p ${B}
29 cd ${B}
30 # full (re)configure
31 autotools_do_configure
32 mv ${B} ${WORKDIR}/build-fftw
33
34 # configure fftwl
35 rm -rf ${WORKDIR}/build-fftwl
36 mkdir -p ${B}
37 cd ${B}
38 # configure only
39 oe_runconf --enable-long-double
40 mv ${B} ${WORKDIR}/build-fftwl
41
42 # configure fftwf
43 rm -rf ${WORKDIR}/build-fftwf
44 mkdir -p ${B}
45 cd ${B}
46 # configure only
47 oe_runconf --enable-single ${FFTW_NEON}
48 mv ${B} ${WORKDIR}/build-fftwf
49}
50
51do_compile() {
52 for lib in fftw fftwl fftwf; do
53 cd ${WORKDIR}/build-$lib
54 autotools_do_compile
55 done
56}
57
58do_install() {
59 for lib in fftw fftwl fftwf; do
60 cd ${WORKDIR}/build-$lib
61 autotools_do_install
62 done
63}
64
65
66PACKAGES =+ "libfftw libfftwl libfftwf"
67FILES_libfftw = "${libdir}/libfftw3.so.* ${libdir}/libfftw3_*.so.*"
68FILES_libfftwl = "${libdir}/libfftw3l.so.* ${libdir}/libfftw3l_*.so.*"
69FILES_libfftwf = "${libdir}/libfftw3f.so.* ${libdir}/libfftw3f_*.so.*"
70
71PACKAGES =+ "fftw-wisdom fftwl-wisdom fftwf-wisdom fftw-wisdom-to-conf"
72FILES_fftw-wisdom = "${bindir}/fftw-wisdom"
73FILES_fftwl-wisdom = "${bindir}/fftwl-wisdom"
74FILES_fftwf-wisdom = "${bindir}/fftwf-wisdom"
75FILES_fftw-wisdom-to-conf = "${bindir}/fftw-wisdom-to-conf"
76
77FILES_${PN}-dev += "${libdir}/cmake"
78RDEPENDS_${PN}-dev = "libfftw libfftwl libfftwf"
79
80BBCLASSEXTEND = "native"