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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/RNifti_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/RNifti/RNifti_{{ version }}.tar.gz
  sha256: 4f1dbb5d4d3e00828cb29ad9b3ab726e8235d7761e1d9c62e5b05d469305083e

build:
  merge_build_host: true  # [win]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

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

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

about:
  home: https://github.com/jonclayden/RNifti
  license: GPL-2.0-only
  summary: Provides very fast read and write access to images stored in the NIfTI-1 and ANALYZE-7.5 formats, with seamless synchronisation between compiled C and interpreted R code. Also provides a C/C++ API that can be used by other packages. Not to be confused with 'RNiftyReg', which performs image registration.
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

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

# Package: RNifti
# Version: 0.11.1
# Date: 2019-08-01
# Title: Fast R and C++ Access to NIfTI Images
# Authors@R: c(person("Jon","Clayden",role=c("cre","aut"),email="code@clayden.org"), person("Bob","Cox",role="aut"), person("Mark","Jenkinson",role="aut"), person("Matt","Hall",role="ctb"), person("Rick","Reynolds",role="ctb"), person("Kate","Fissell",role="ctb"), person("Jean-loup","Gailly",role="cph"), person("Mark","Adler",role="cph"))
# Imports: Rcpp (>= 0.11.0)
# Suggests: testthat (>= 0.11.0), covr, reportr
# Enhances: oro.nifti, tractor.base
# LinkingTo: Rcpp
# Description: Provides very fast read and write access to images stored in the NIfTI-1 and ANALYZE-7.5 formats, with seamless synchronisation between compiled C and interpreted R code. Also provides a C/C++ API that can be used by other packages. Not to be confused with 'RNiftyReg', which performs image registration.
# License: GPL-2
# URL: https://github.com/jonclayden/RNifti
# BugReports: https://github.com/jonclayden/RNifti/issues
# Encoding: UTF-8
# RoxygenNote: 6.1.1
# NeedsCompilation: yes
# Packaged: 2019-08-01 11:55:51 UTC; jon
# Author: Jon Clayden [cre, aut], Bob Cox [aut], Mark Jenkinson [aut], Matt Hall [ctb], Rick Reynolds [ctb], Kate Fissell [ctb], Jean-loup Gailly [cph], Mark Adler [cph]
# Maintainer: Jon Clayden <code@clayden.org>
# Repository: CRAN
# Date/Publication: 2019-08-01 13:50:02 UTC
