{% 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]
  # If this is a new build for the same version, increment the build number.
  number: 0
  # no skip

  # This is required to make R link correctly on Linux.
  rpaths:
    - lib/R/lib/
    - lib/

# Suggests: testthat (>= 2.1.1)
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

  run:
    - r-base
    - {{native}}gcc-libs         # [win]

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('fastmap')"           # [not win]
    - "\"%R%\" -e \"library('fastmap')\""  # [win]

  # You can also put a file called run_test.py, run_test.sh, or run_test.bat
  # in the recipe that will be run at test time.

  # requires:
    # Put any additional test requirements here.

about:
  home: https://r-lib.github.io/fastmap/, https://github.com/r-lib/fastmap
  license: MIT
  summary: Fast implementation of data structures, including a key-value store, stack, and queue.
    Environments are commonly used as key-value stores in R, 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:
    - katietz

# The original CRAN metadata for this package was:

# Package: fastmap
# Title: Fast Data Structures
# Version: 1.1.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 data structures, including a key-value store, stack, and queue. Environments are commonly used as key-value stores in R, 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
# RoxygenNote: 7.2.3
# 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: 2023-02-24 16:01:27 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: 2023-02-24 16:30:02 UTC

# See
# https://docs.conda.io/projects/conda-build for
# more information about meta.yaml
