{% set version = "8.2" %}

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

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

source:
  fn: forecast_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/forecast_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/forecast/forecast_{{ version }}.tar.gz
  sha256: eb3fab64ed139d068e7d026cd3880f1b623f4153a832fb71845488fa75e8b812

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

requirements:
  build:
    - posix                # [win]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
    - {{ compiler('cxx') }}        # [unix]
    - {{ compiler('m2w64_cxx') }}  # [win]
  host:
    - r-base
    - r-rcpp >=0.11.0
    - r-rcpparmadillo >=0.2.35
    - r-colorspace
    - r-fracdiff
    - r-ggplot2 >=2.0.0
    - r-lmtest
    - r-magrittr
    - r-nnet
    - r-timedate
    - r-tseries
    - r-zoo

  run:
    - r-base
    - r-rcpp >=0.11.0
    - r-rcpparmadillo >=0.2.35
    - r-colorspace
    - r-fracdiff
    - r-ggplot2 >=2.0.0
    - r-lmtest
    - r-magrittr
    - r-nnet
    - r-timedate
    - r-tseries
    - r-zoo

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

about:
  home: http://github.com/robjhyndman/forecast
  license: GPL (>= 2)
  summary: Methods and tools for displaying and analysing univariate time series forecasts including
    exponential smoothing via state space models and automatic ARIMA modelling.
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
