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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/fastmap_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/fastmap/fastmap_{{ version }}.tar.gz
  sha256: 3623809dd016ae8abd235200ba7834effc4b916915a059deb76044137c5c7173

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

requirements:
  build:
    - cross-r-base {{ r_base }}  # [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
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]

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

about:
  home: https://r-lib.github.io/fastmap/, https://github.com/r-lib/fastmap
  license: MIT
  summary: Fast implementation of a key-value store. Environments are commonly used as key-value stores, but every time a new key is used, it is added to R's global symbol table, causing a small amount of memory leakage. This can be problematic in cases where many different keys are used. Fastmap avoids this memory leak
    issue by implementing the map using data structures in C++.
  license_family: MIT
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/MIT
    - LICENSE

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

# Package: fastmap
# Title: Fast Implementation of a Key-Value Store
# Version: 1.0.1
# Authors@R: c( person("Winston", "Chang", email = "winston@rstudio.com", role = c("aut", "cre")), person(given = "RStudio", role = c("cph", "fnd")), person(given = "Tessil", role = "cph", comment = "hopscotch_map library") )
# Description: Fast implementation of a key-value store. Environments are commonly used as key-value stores, but every time a new key is used, it is added to R's global symbol table, causing a small amount of memory leakage. This can be problematic in cases where many different keys are used. Fastmap avoids this memory leak issue by implementing the map using data structures in C++.
# License: MIT + file LICENSE
# Encoding: UTF-8
# LazyData: true
# RoxygenNote: 6.1.1
# Suggests: testthat (>= 2.1.1)
# URL: https://r-lib.github.io/fastmap/, https://github.com/r-lib/fastmap
# BugReports: https://github.com/r-lib/fastmap/issues
# NeedsCompilation: yes
# Packaged: 2019-10-07 23:14:48 UTC; winston
# Author: Winston Chang [aut, cre], RStudio [cph, fnd], Tessil [cph] (hopscotch_map library)
# Maintainer: Winston Chang <winston@rstudio.com>
# Repository: CRAN
# Date/Publication: 2019-10-08 05:20:02 UTC
