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

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

source:
  fn: AlgDesign_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/AlgDesign_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/AlgDesign/AlgDesign_{{ version }}.tar.gz
  sha256: df0d56111401474b7f06eaf9ce7145a1cb73b3c5ec4817bad06f56db48af872e

build:
  merge_build_host: True  # [win]
  number: 1003
  skip: true  # [win32]
  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('AlgDesign')"           # [not win]
    - "\"%R%\" -e \"library('AlgDesign')\""  # [win]

about:
  home: https://github.com/jvbraun/AlgDesign
  license: GPL (>= 2)
  summary: Algorithmic experimental designs. Calculates exact and approximate theory experimental
    designs for D,A, and I criteria. Very large designs may be created. Experimental
    designs may be blocked or blocked designs created from a candidate list, using several
    criteria.  The blocking can be done when whole and within plot factors interact.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

extra:
  recipe-maintainers:
    - conda-forge/r
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
