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

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

source:
  fn: ddalpha_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/ddalpha_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/ddalpha/ddalpha_{{ version }}.tar.gz
  sha256: 41ba9952deb2e81713f2e308357d3b7adfe348135ba7e3c94c347db5e0029699

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [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
    - r-bh
    - r-mass
    - r-rcpp >=0.11.0
    - r-class
    - r-geometry
    - r-robustbase
    - r-sfsmisc
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-bh
    - r-mass
    - r-rcpp >=0.11.0
    - r-class
    - r-geometry
    - r-robustbase
    - r-sfsmisc

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

about:
  home: https://CRAN.R-project.org/package=ddalpha
  license: GPL-2
  summary: Contains procedures for depth-based supervised learning, which are entirely non-parametric,
    in particular the DDalpha-procedure (Lange, Mosler and Mozharovskyi, 2014 <doi:10.1007/s00362-012-0488-4>).
    The training data sample is transformed by a statistical depth function to a compact
    low-dimensional space, where the final classification is done. It also offers an
    extension to functional data and routines for calculating certain notions of statistical
    depth functions. 50 multivariate and 5 functional classification problems are included.
  license_family: GPL2
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-2'  # [win]

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