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

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

source:
  fn: wavethresh_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/wavethresh_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/wavethresh/wavethresh_{{ version }}.tar.gz
  sha256: 93b369c6eabcc0187b860b31d84a9d7c72c4a2ed5b23c1520c93bd7bea22e7db

build:
  merge_build_host: True  # [win]
  number: 1004
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-mass
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-mass

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

about:
  home: https://CRAN.R-project.org/package=wavethresh
  license: GPL (>= 2)
  summary: Performs 1, 2 and 3D real and complex-valued wavelet transforms, nondecimated transforms,
    wavelet packet transforms, nondecimated wavelet packet transforms, multiple wavelet
    transforms, complex-valued wavelet transforms, wavelet shrinkage for various kinds
    of data, locally stationary wavelet time series, nonstationary multiscale transfer
    function modeling, density estimation.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

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