{% set version = '0.2.1' %}

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

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

source:
  fn: lazyeval_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/lazyeval_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/lazyeval/lazyeval_{{ version }}.tar.gz
  sha256: 83b3a43e94c40fe7977e43eb607be0a3cd64c02800eae4f2774e7866d1e93f61

build:
  merge_build_host: True  # [win]
  number: 2

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{native}}toolchain        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]

  host:
    - r-base

  run:
    - r-base
    - {{native}}gcc-libs         # [win]

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

about:
  home: https://CRAN.R-project.org/package=lazyeval
  license: GPL-3
  summary: An alternative approach to non-standard evaluation using formulas. Provides a full
    implementation of LISP style 'quasiquotation', making it easier to generate code
    with other code.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

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