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

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

source:
  fn: pan_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/pan_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/pan/pan_{{ version }}.tar.gz
  sha256: adc0df816ae38bc188bce0aef3aeb71d19c0fc26e063107eeee71a81a49463b6

build:
  merge_build_host: True  # [win]
  number: 4
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

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

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

about:
  home: https://CRAN.R-project.org/package=pan
  license: GPL-3
  summary: Multiple imputation for multivariate panel or clustered data.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

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