Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [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] = "0d5915d7d39b3253c1cc05030d79ac47" |
| 11 | SRC_URI[sha256sum] = "3b609b7feba5230e8f6dd8d245ddbefac324c5a6ae4186947670d9ac2cd25573" |
| 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 | FFTW_NEON = "${@bb.utils.contains('TUNE_FEATURES', 'neon', '--enable-neon', '', d)}" |
| 23 | FFTW_NEON_class-native = "" |
| 24 | |
| 25 | do_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 | |
| 51 | do_compile() { |
| 52 | for lib in fftw fftwl fftwf; do |
| 53 | cd ${WORKDIR}/build-$lib |
| 54 | autotools_do_compile |
| 55 | done |
| 56 | } |
| 57 | |
| 58 | do_install() { |
| 59 | for lib in fftw fftwl fftwf; do |
| 60 | cd ${WORKDIR}/build-$lib |
| 61 | autotools_do_install |
| 62 | done |
| 63 | } |
| 64 | |
| 65 | |
| 66 | PACKAGES =+ "libfftw libfftwl libfftwf" |
| 67 | FILES_libfftw = "${libdir}/libfftw3.so.* ${libdir}/libfftw3_*.so.*" |
| 68 | FILES_libfftwl = "${libdir}/libfftw3l.so.* ${libdir}/libfftw3l_*.so.*" |
| 69 | FILES_libfftwf = "${libdir}/libfftw3f.so.* ${libdir}/libfftw3f_*.so.*" |
| 70 | |
| 71 | PACKAGES =+ "fftw-wisdom fftwl-wisdom fftwf-wisdom fftw-wisdom-to-conf" |
| 72 | FILES_fftw-wisdom = "${bindir}/fftw-wisdom" |
| 73 | FILES_fftwl-wisdom = "${bindir}/fftwl-wisdom" |
| 74 | FILES_fftwf-wisdom = "${bindir}/fftwf-wisdom" |
| 75 | FILES_fftw-wisdom-to-conf = "${bindir}/fftw-wisdom-to-conf" |
| 76 | |
| 77 | FILES_${PN}-dev += "${libdir}/cmake" |
| 78 | RDEPENDS_${PN}-dev = "libfftw libfftwl libfftwf" |
| 79 | |
| 80 | BBCLASSEXTEND = "native" |