Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | DESCRIPTION = "FFTW" |
| 2 | SECTION = "libs" |
| 3 | LICENSE = "GPLv2" |
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" |
| 5 | |
| 6 | SRC_URI = " \ |
| 7 | http://www.fftw.org/fftw-${PV}.tar.gz \ |
| 8 | file://0001-NEON-autodetection-segfaults-assume-neon-present.patch \ |
| 9 | " |
| 10 | SRC_URI[md5sum] = "8aac833c943d8e90d51b697b27d4384d" |
| 11 | SRC_URI[sha256sum] = "6113262f6e92c5bd474f2875fa1b01054c4ad5040f6b0da7c03c98821d9ae303" |
| 12 | |
| 13 | inherit autotools pkgconfig |
| 14 | |
| 15 | # we had multiple recipes in the past |
| 16 | PROVIDES = "fftwl fftwf" |
| 17 | |
| 18 | EXTRA_OECONF = "--disable-fortran --enable-shared --enable-threads" |
| 19 | |
| 20 | CFLAGS += "-D_GNU_SOURCE" |
| 21 | |
| 22 | # neon is optional for arm version < 8 -> check tune features |
| 23 | FFTW_NEON = "${@bb.utils.contains('TUNE_FEATURES', 'neon', '--enable-neon', '', d)}" |
| 24 | # neon is suppored for arm version = 8 -> enable |
| 25 | FFTW_NEON_aarch64 = "--enable-neon" |
| 26 | FFTW_NEON_class-native = "" |
| 27 | |
| 28 | do_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 | |
| 54 | do_compile() { |
| 55 | for lib in fftw fftwl fftwf; do |
| 56 | cd ${WORKDIR}/build-$lib |
| 57 | autotools_do_compile |
| 58 | done |
| 59 | } |
| 60 | |
| 61 | do_install() { |
| 62 | for lib in fftw fftwl fftwf; do |
| 63 | cd ${WORKDIR}/build-$lib |
| 64 | autotools_do_install |
| 65 | done |
| 66 | } |
| 67 | |
| 68 | |
| 69 | PACKAGES =+ "libfftw libfftwl libfftwf" |
| 70 | FILES_libfftw = "${libdir}/libfftw3.so.* ${libdir}/libfftw3_*.so.*" |
| 71 | FILES_libfftwl = "${libdir}/libfftw3l.so.* ${libdir}/libfftw3l_*.so.*" |
| 72 | FILES_libfftwf = "${libdir}/libfftw3f.so.* ${libdir}/libfftw3f_*.so.*" |
| 73 | |
| 74 | PACKAGES =+ "fftw-wisdom fftwl-wisdom fftwf-wisdom fftw-wisdom-to-conf" |
| 75 | FILES_fftw-wisdom = "${bindir}/fftw-wisdom" |
| 76 | FILES_fftwl-wisdom = "${bindir}/fftwl-wisdom" |
| 77 | FILES_fftwf-wisdom = "${bindir}/fftwf-wisdom" |
| 78 | FILES_fftw-wisdom-to-conf = "${bindir}/fftw-wisdom-to-conf" |
| 79 | |
| 80 | FILES_${PN}-dev += "${libdir}/cmake" |
| 81 | RDEPENDS_${PN}-dev = "libfftw libfftwl libfftwf" |
| 82 | |
| 83 | BBCLASSEXTEND = "native" |