{% set version = '2.2-7' %}

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

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

source:
  fn: coxme_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/coxme_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/coxme/coxme_{{ version }}.tar.gz
  sha256: 672753bfcbdfb6e01a7edc4e6f0f3a99e6148b7cef016f3aef6b415e0ae06a49

build:
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-matrix >=1.0
    - r-bdsmatrix
    - r-nlme
    - r-survival >=2.36.14
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - r-matrix >=1.0
    - r-bdsmatrix
    - r-nlme
    - r-survival >=2.36.14
    - libgcc  # [not win]

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

about:
  home: https://CRAN.R-project.org/package=coxme
  license: LGPL-2
  summary: Cox proportional hazards models containing Gaussian random effects, also known as
    frailty models.
  license_family: LGPL

extra:
  recipe-maintainers:
    - cbrueffer
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
