{% set version = '1.4.3' %}

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

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

source:
  fn: reshape2_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/reshape2_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/reshape2/reshape2_{{ version }}.tar.gz
  sha256: 8aff94c935e75032344b52407593392ddd4e16a88bb206984340c816d42c710e

build:
  merge_build_host: True  # [win]
  number: 1
  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
    - r-plyr >=1.8.1
    - r-stringr

  run:
    - r-base
    - r-rcpp
    - r-plyr >=1.8.1
    - r-stringr

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

about:
  home: https://github.com/hadley/reshape
  license: MIT
  summary: 'Flexibly restructure and aggregate data using just two functions: melt and ''dcast''
    (or ''acast'').'
  license_family: MIT

extra:
  recipe-maintainers:
    - lpantano
    - cbrueffer
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
