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

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

source:
  fn: splus2R_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/splus2R_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/splus2R/splus2R_{{ version }}.tar.gz
  sha256: 5f1b3c3fc3bea998ef91478742d9215cc2d1c2d94ba17a2834ec02df37922b77

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('fortran') }}  # [not win]
    - {{native}}toolchain        # [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('splus2R')"           # [not win]
    - "\"%R%\" -e \"library('splus2R')\""  # [win]

about:
  home: https://CRAN.R-project.org/package=splus2R
  license: GPL-2
  summary: Currently there are many functions in S-PLUS that are missing in R. To facilitate
    the conversion of S-PLUS packages to R packages, this package provides some missing
    S-PLUS functionality in R.
  license_family: GPL2
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

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