{% set version = "3.3.6" %}

package:
  name: fftw-mpi
  version: {{ version }}

source:
  fn: fftw-{{ version }}.tar.gz
  url: http://www.fftw.org/fftw-{{ version }}-pl1.tar.gz
  sha256: 1ef4aa8427d9785839bc767f3eb6a84fcb5e9a37c31ed77a04e7e047519a183d

build:
  skip: True  # [win]
  number: 0


test:
  commands:
    - exit $(test -f ${PREFIX}/lib/libfftw3f.a)          # [not win]
    - exit $(test -f ${PREFIX}/lib/libfftw3.a)           # [not win]
    - exit $(test -f ${PREFIX}/lib/libfftw3f_threads.a)  # [not win]
    - exit $(test -f ${PREFIX}/lib/libfftw3_threads.a)   # [not win]

    # Verify headers are installed
    - test -f ${PREFIX}/include/fftw3.h                  # [not win]
    - test -f ${PREFIX}/include/fftw3-mpi.h              # [not win]

    # Verify shared libraries are installed
    {% set fftw_libs = [
            "libfftw3",
            "libfftw3_threads",
            "libfftw3f",
            "libfftw3f_threads",
            "libfftw3_mpi",
            "libfftw3f_mpi",
    ] %}

    {% for lib in fftw_libs %}
    - test -f ${PREFIX}/lib/{{ lib }}.dylib    # [osx]
    - test -f ${PREFIX}/lib/{{ lib }}.so       # [linux]
    {% endfor %}

about:
  home: http://fftw.org
  license: GPL 2
  summary: "The fastest Fourier transform in the west."
