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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/lobstr_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/lobstr/lobstr_{{ version }}.tar.gz
  sha256: 9bc533ed7e8f816097a03acfbca33308c9940ba26d02674f4ba06311cf3a1718

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

requirements:
  build:
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - r-rlang >=1.0.0            # [build_platform != target_platform]
    - r-crayon                   # [build_platform != target_platform]
    - r-cpp11                    # [build_platform != target_platform]
    - r-prettyunits              # [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-cpp11
    - r-crayon
    - r-rlang >=1.0.0
    - r-prettyunits
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-cpp11
    - r-crayon
    - r-rlang >=1.0.0
    - r-prettyunits
    
test:
  commands:
    - $R -e "library('lobstr')"           # [not win]
    - "\"%R%\" -e \"library('lobstr')\""  # [win]

about:
  home: https://github.com/r-lib/lobstr
  license: GPL-3.0-only
  summary: A set of tools for inspecting and understanding R data structures inspired by str(). Includes ast() for visualizing abstract  syntax trees, ref() for showing shared references, cst() for showing  call stack trees, and obj_size() for computing object sizes.
  license_family: GPL3
  license_file: {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3

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

# Package: lobstr
# Title: Visualize R Data Structures with Trees
# Version: 1.1.1
# Authors@R: c( person("Hadley", "Wickham", , "hadley@rstudio.com", role = c("aut", "cre")), person("RStudio", role = "cph") )
# Description: A set of tools for inspecting and understanding R data structures inspired by str(). Includes ast() for visualizing abstract  syntax trees, ref() for showing shared references, cst() for showing  call stack trees, and obj_size() for computing object sizes.
# License: GPL-3
# URL: https://github.com/r-lib/lobstr
# BugReports: https://github.com/r-lib/lobstr/issues
# Depends: R (>= 3.2)
# Imports: crayon, Rcpp, rlang (>= 0.3.0)
# Suggests: covr, pillar, pkgdown, testthat
# LinkingTo: Rcpp
# Encoding: UTF-8
# LazyData: true
# RoxygenNote: 6.1.1
# NeedsCompilation: yes
# Packaged: 2019-07-02 17:00:44 UTC; hadley
# Author: Hadley Wickham [aut, cre], RStudio [cph]
# Maintainer: Hadley Wickham <hadley@rstudio.com>
# Repository: CRAN
# Date/Publication: 2019-07-02 23:10:04 UTC
