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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/RNiftyReg_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/RNiftyReg/RNiftyReg_{{ version }}.tar.gz
  sha256: e15f9940038c536ba3135a4668d7beadab245b85a679d8a692695929d917fa78

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 }}sed               # [win]
    - {{ posix }}grep              # [win]
    - {{ posix }}autoconf
    - {{ posix }}automake          # [not win]
    - {{ posix }}automake-wrapper  # [win]
    - {{ posix }}pkg-config
    - {{ posix }}make
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-rnifti >=0.4.0
    - r-rcpp >=0.11.0
    - r-rcppeigen
    - r-ore
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rnifti >=0.4.0
    - r-rcpp >=0.11.0
    - r-rcppeigen
    - r-ore

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

about:
  home: https://github.com/jonclayden/RNiftyReg
  license: GPL-2
  summary: Provides an 'R' interface to the 'NiftyReg' image registration tools <http://sourceforge.net/projects/niftyreg/>. Linear and nonlinear registration are supported, in two and three dimensions.
  license_family: GPL2
  license_file: {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

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

# Package: RNiftyReg
# Version: 2.6.6
# Date: 2019-03-17
# Title: Image Registration Using the 'NiftyReg' Library
# Authors@R: c(person("Jon","Clayden",role=c("cre","aut"),email="code@clayden.org"), person("Marc","Modat",role="aut"), person("Benoit","Presles",role="aut"), person("Thanasis","Anthopoulos",role="aut"), person("Pankaj","Daga",role="aut"))
# Maintainer: Jon Clayden <code@clayden.org>
# Imports: Rcpp (>= 0.11.0), RNifti (>= 0.4.0), ore
# Suggests: jpeg, loder, mmand, testthat (>= 0.11.0)
# LinkingTo: Rcpp, RcppEigen, RNifti
# Description: Provides an 'R' interface to the 'NiftyReg' image registration tools <http://sourceforge.net/projects/niftyreg/>. Linear and nonlinear registration are supported, in two and three dimensions.
# License: GPL-2
# URL: https://github.com/jonclayden/RNiftyReg
# BugReports: https://github.com/jonclayden/RNiftyReg/issues
# Encoding: UTF-8
# RoxygenNote: 6.1.0
# NeedsCompilation: yes
# Packaged: 2019-03-18 11:23:34 UTC; jon
# Author: Jon Clayden [cre, aut], Marc Modat [aut], Benoit Presles [aut], Thanasis Anthopoulos [aut], Pankaj Daga [aut]
# Repository: CRAN
# Date/Publication: 2019-03-20 13:23:24 UTC
