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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/SeuratObject_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/SeuratObject/SeuratObject_{{ version }}.tar.gz
  sha256: 9ca406cb3bd95c588e1a81c5383e3173a446cc0667142b139ca32685b4b20a05

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]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
  host:
    - r-base
    - r-matrix >=1.3.3
    - r-rcpp >=1.0.5
    - r-rcppeigen
    - r-future
    - r-future.apply
    - r-progressr
    - r-rgeos
    - r-rlang >=0.4.7
    - r-sp
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-matrix >=1.3.3
    - r-rcpp >=1.0.5
    - r-rcppeigen
    - r-future
    - r-future.apply
    - r-progressr
    - r-rgeos
    - r-rlang >=0.4.7
    - r-sp

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

about:
  home: https://satijalab.org/seurat, https://github.com/mojaveazure/seurat-object
  license: MIT
  summary: Defines S4 classes for single-cell genomic data and associated information, such as dimensionality reduction embeddings, nearest-neighbor graphs, and spatially-resolved coordinates. Provides data access methods and R-native hooks to ensure the Seurat object is familiar to other R users. See Satija R, Farrell J,
    Gennert D, et al (2015) <doi:10.1038/nbt.3192>, Macosko E, Basu A, Satija R, et al (2015) <doi:10.1016/j.cell.2015.05.002>, and Stuart T, Butler A, et al (2019) <doi:10.1016/j.cell.2019.05.031> for more details.
  license_family: MIT
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/MIT

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