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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/xptr_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/xptr/xptr_{{ version }}.tar.gz
  sha256: 3ba42f9d672edc11c6cebfe334b9784d8daf60ca290f67f97d3098df90dea20c

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

requirements:
  build:
    - {{ 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('xptr')"           # [not win]
    - "\"%R%\" -e \"library('xptr')\""  # [win]

about:
  home: https://randy3k.github.io/xptr/
  license: MIT
  summary: There is limited native support for external pointers in the R interface. This package provides some basic tools to verify, create and modify 'externalptr'
    objects.
  license_family: MIT
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/MIT
    - LICENSE

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

# Package: xptr
# Type: Package
# Title: Manipulating External Pointer
# Version: 1.1.1
# Date: 2019-01-13
# Authors@R: c( person("Randy", "Lai", , "randy.cs.lai@gmail.com", role = c("aut", "cre")) )
# Maintainer: Randy Lai <randy.cs.lai@gmail.com>
# URL: https://randy3k.github.io/xptr/
# Description: There is limited native support for external pointers in the R interface. This package provides some basic tools to verify, create and modify 'externalptr' objects.
# Depends: R (>= 3.4.0)
# License: MIT + file LICENSE
# NeedsCompilation: yes
# RoxygenNote: 6.0.1
# Packaged: 2019-01-13 14:10:14 UTC; Randy
# Author: Randy Lai [aut, cre]
# Repository: CRAN
# Date/Publication: 2019-01-13 14:20:02 UTC
