{% set version = '1.2' %}

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

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

source:
  fn: lars_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/lars_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/lars/lars_{{ version }}.tar.gz
  sha256: 64745b568f20b2cfdae3dad02fba92ebf78ffee466a71aaaafd4f48c3921922e

build:
  merge_build_host: True  # [win]
  number: 1002
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - posix                # [win]
    - {{ compiler('fortran') }}        # [unix]
    - {{ compiler('m2w64_fortran') }}  # [win]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
  host:
    - r-base

  run:
    - r-base

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

about:
  home: http://www-stat.stanford.edu/~hastie/Papers/#LARS
  license: GPL-2
  summary: Efficient procedures for fitting an entire lasso sequence with the cost of a single
    least squares fit. Least angle regression and infinitesimal forward stagewise regression
    are related to the lasso, as described in the paper below.
  license_family: GPL2

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