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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/Rtsne_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/Rtsne/Rtsne_{{ version }}.tar.gz
  sha256: 52a05adc826c28212e97d11c54eba3fec45d14eb52039c0f47f62a8e338ffbd5

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

requirements:
  build:
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - r-rcpp                     # [build_platform != target_platform]
    - {{ 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
    - libblas
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp >=0.11.0
    - libblas

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

about:
  home: https://github.com/jkrijthe/Rtsne
  license: LicenseRef-FOSS AND LicenseRef-BSDLike
  summary: An R wrapper around the fast T-distributed Stochastic Neighbor Embedding implementation by Van der Maaten  (see <https://github.com/lvdmaaten/bhtsne/> for more information on the original implementation).
  license_family: OTHER
  license_file:
    - LICENSE

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

# Package: Rtsne
# Type: Package
# Title: T-Distributed Stochastic Neighbor Embedding using a Barnes-Hut Implementation
# Version: 0.15
# Authors@R: c( person("Jesse", "Krijthe", ,"jkrijthe@gmail.com", role = c("aut", "cre")), person("Laurens", "van der Maaten", role = c("cph"), comment = "Author of original C++ code") )
# Description: An R wrapper around the fast T-distributed Stochastic Neighbor Embedding implementation by Van der Maaten  (see <https://github.com/lvdmaaten/bhtsne/> for more information on the original implementation).
# License: file LICENSE
# URL: https://github.com/jkrijthe/Rtsne
# Imports: Rcpp (>= 0.11.0), stats
# LinkingTo: Rcpp
# Suggests: irlba, testthat
# RoxygenNote: 6.1.0
# NeedsCompilation: yes
# Packaged: 2018-11-01 17:33:54 UTC; jkrijthe
# Author: Jesse Krijthe [aut, cre], Laurens van der Maaten [cph] (Author of original C++ code)
# Maintainer: Jesse Krijthe <jkrijthe@gmail.com>
# License_is_FOSS: yes
# Repository: CRAN
# Date/Publication: 2018-11-10 16:30:21 UTC
