{% set version = "0.3-1" %}
{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/iotools_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/iotools/iotools_{{ version }}.tar.gz
  sha256: 0ea177d320dc171b0c6dd5fb00844f3739f30c72129fd26fdff86da8d1d04474

build:
  merge_build_host: true  # [win]
  number: 1
  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 }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]

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

about:
  home: http://www.rforge.net/iotools
  license: GPL-2 | GPL-3
  summary: Basic I/O tools for streaming and data parsing.
  license_family: GPL3
  license_file: {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3

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