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

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

source:
  url:
    - https://cran.r-project.org/src/contrib/circular_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/circular/circular_{{ version }}.tar.gz
  sha256: b9ba433ca8bfd76d2a273ffa257a6cc8a0c7a7a5a0dec3fcde2abc634d5b5671

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

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('fortran') }}        # [not win]
    - {{ compiler('m2w64_fortran') }}  # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-boot
    - r-mvtnorm
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-boot
    - r-mvtnorm

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

about:
  home: https://CRAN.R-project.org/package=circular
  license: GPL-2.0-only
  summary: Circular Statistics, from "Topics in circular Statistics" (2001) S. Rao Jammalamadaka and A. SenGupta, World Scientific.
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

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