{% set version = '1.0-6' %}
{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

package:
  name: r-fftw
  version: {{ version|replace("-", "_") }}

source:
  url:
    - {{ cran_mirror }}/src/contrib/fftw_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/fftw/fftw_{{ version }}.tar.gz
  sha256: 397ef5ec354b919884f74fba4202bfc13ad11a70b16285c41677aad1d3b170ce

build:
  merge_build_host: True  # [win]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}sed               # [win]
    - {{ posix }}grep              # [win]
    - {{ posix }}autoconf
    - {{ posix }}automake          # [not win]
    - {{ posix }}automake-wrapper  # [win]
    - {{ posix }}pkg-config
    - {{ posix }}make
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - fftw >=3
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - fftw >=3

test:
  commands:
    - $R -e "library('fftw')"           # [not win]
    - "\"%R%\" -e \"library('fftw')\""  # [win]

about:
  home: https://CRAN.R-project.org/package=fftw
  license: GPL-2.0-only
  summary: Provides a simple and efficient wrapper around the fastest Fourier transform in the
    west (FFTW) library <http://www.fftw.org/>.
  license_family: GPL2
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

extra:
  recipe-maintainers:
    - conda-forge/r

# Package: fftw
# Version: 1.0-6
# Title: Fast FFT and DCT Based on the FFTW Library
# Description: Provides a simple and efficient wrapper around the fastest Fourier transform in the west (FFTW) library <http://www.fftw.org/>.
# Authors@R: c( person("Olaf", "Mersmann", email="olafm@p-value.net", role=c("aut")), person("Sebastian", "Krey", email="skrey@statistik.tu-dortmund.de", role=c("ctb")), person("Uwe", "Ligges", email="ligges@statistik.tu-dortmund.de", role=c("ctb", "cre")) )
# Depends: R (>= 3.0.0)
# SystemRequirements: fftw3 (>= 3.1.2)
# License: GPL-2
# RoxygenNote: 6.0.1
# NeedsCompilation: yes
# Packaged: 2020-02-24 17:00:36 UTC; ligges
# Author: Olaf Mersmann [aut], Sebastian Krey [ctb], Uwe Ligges [ctb, cre]
# Maintainer: Uwe Ligges <ligges@statistik.tu-dortmund.de>
# Repository: CRAN
# Date/Publication: 2020-02-24 17:30:09 UTC
