{% set version = '1.7.5' %}

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

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

source:
  fn: waveslim_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/waveslim_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/waveslim/waveslim_{{ version }}.tar.gz
  sha256: 31b698f7b19aadcdc02068ee69bf7676cd9dea2913420ce3caa7e507e3a41a53

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

requirements:
  build:
    - posix                # [win]
    - {{ compiler('fortran') }}        # [unix]
    - {{ compiler('m2w64_fortran') }}  # [win]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
  host:
    - r-base

  run:
    - r-base

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

about:
  home: http://waveslim.blogspot.com, http://www2.imperial.ac.uk/~bwhitche/book
  license: BSD_3_clause
  summary: Basic wavelet routines for time series (1D), image (2D)  and array (3D) analysis.  The
    code provided here is based on wavelet methodology developed in Percival and Walden
    (2000); Gencay, Selcuk and Whitcher (2001); the dual-tree complex wavelet transform
    (DTCWT) from Kingsbury (1999, 2001) as implemented by Selesnick; and Hilbert wavelet
    pairs (Selesnick 2001, 2002).  All figures in chapters 4-7 of GSW (2001) are reproducible
    using this  package and R code available at the book website(s) below.
  license_family: BSD

extra:
  recipe-maintainers:
    - dpryan79
    - johanneskoester
    - bgruening
    - daler
