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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/multitaper_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/multitaper/multitaper_{{ version }}.tar.gz
  sha256: 837d71f3b46fbce2bea210449cf75e609f5363ff23b7808f5f115fdc51e6a3be

build:
  merge_build_host: true  # [win]
  number: 1
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('fortran') }}        # [not win]
    - {{ compiler('m2w64_fortran') }}  # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
  host:
    - r-base
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]

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

about:
  home: https://github.com/krahim/multitaper/
  license: GPL-2.0-or-later
  summary: "Implements multitaper spectral analysis using discrete prolate spheroidal sequences (Slepians) and sine tapers. It includes an adaptive weighted multitaper spectral estimate, a coherence estimate, Thomson's Harmonic F-test, and complex demodulation. The Slepians sequences are generated efficiently using a tridiagonal\
    \ matrix solution, and jackknifed confidence intervals are available for most estimates.   "
  license_family: GPL3
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

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

# Package: multitaper
# Version: 1.0-14
# Title: Spectral Analysis Tools using the Multitaper Method
# Author: Karim Rahim <karim.rahim@queensu.ca>, Wesley S. Burr <wesley.burr@gmail.com>
# Maintainer: Karim Rahim <karim.rahim@queensu.ca>
# Depends: R (>= 3.0), methods
# Suggests: psd, astrochron, fftwtools, slp
# Description: Implements multitaper spectral analysis using discrete prolate spheroidal sequences (Slepians) and sine tapers. It includes an adaptive weighted multitaper spectral estimate, a coherence estimate, Thomson's Harmonic F-test, and complex demodulation. The Slepians sequences are generated efficiently using a tridiagonal matrix solution, and jackknifed confidence intervals are available for most estimates.
# License: GPL (>= 2)
# ByteCompile: true
# URL: https://github.com/krahim/multitaper/
# NeedsCompilation: yes
# Packaged: 2017-10-25 03:47:43 UTC; karim
# Repository: CRAN
# Date/Publication: 2017-10-25 07:26:22 UTC
