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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/backports_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/backports/backports_{{ version }}.tar.gz
  sha256: 845c3c59fbb05e5a892c4231b955a0afdd331d82b7cc815bcff0672023242474

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

requirements:
  build:
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('m2w64_c') }}        # [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('backports')"           # [not win]
    - "\"%R%\" -e \"library('backports')\""  # [win]

about:
  home: https://github.com/r-lib/backports
  license: GPL-2.0-or-later
  summary: ' Functions introduced or changed since R v3.0.0 are re-implemented in this package. The backports are conditionally exported in order to let R resolve the function name to either the implemented backport, or the respective base version, if available. Package developers can make use of new functions or arguments
    by selectively importing specific backports to support older installations.'
  license_family: GPL2
  license_file: {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

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

# Package: backports
# Type: Package
# Title: Reimplementations of Functions Introduced Since R-3.0.0
# Version: 1.1.3
# Authors@R: c( person("Michel", "Lang", NULL, "michellang@gmail.com", role = c("cre", "aut"), comment = c(ORCID = "0000-0001-9754-0393")), person("R Core Team", role = "aut"))
# Maintainer: Michel Lang <michellang@gmail.com>
# Description:  Functions introduced or changed since R v3.0.0 are re-implemented in this package. The backports are conditionally exported in order to let R resolve the function name to either the implemented backport, or the respective base version, if available. Package developers can make use of new functions or arguments by selectively importing specific backports to support older installations.
# URL: https://github.com/r-lib/backports
# BugReports: https://github.com/r-lib/backports/issues
# License: GPL-2
# NeedsCompilation: yes
# ByteCompile: yes
# Depends: R (>= 3.0.0)
# Imports: utils
# Encoding: UTF-8
# RoxygenNote: 6.1.1
# Packaged: 2018-12-14 09:54:10 UTC; lang
# Author: Michel Lang [cre, aut] (<https://orcid.org/0000-0001-9754-0393>), R Core Team [aut]
# Repository: CRAN
# Date/Publication: 2018-12-14 10:30:03 UTC
