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

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

source:
  fn: raster_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/raster_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/raster/raster_{{ version }}.tar.gz
  sha256: fb91804fd465a4a6d9d9858e29fd05f41a99b8efdcc5cf4370ea253b68e42b01

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [not win]
    - {{native}}toolchain        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-rcpp
    - r-sp >=1.2_0
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-rcpp
    - r-sp >=1.2_0

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

about:
  home: http://www.rspatial.org/
  license: GPL (>= 3)
  summary: Reading, writing, manipulating, analyzing and modeling of gridded spatial data. The
    package implements basic and high-level functions. Processing of very large files
    is supported.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

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