{% set version = '2014.10-1' %}

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

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

source:
  fn: BB_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/BB_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/BB/BB_{{ version }}.tar.gz
  sha256: a09f67e3a6ef36db660e4dc92832dfad4a7591ae9fadc2a265c8770ffb1e2fd2

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

requirements:
  build:
    - r-base
    - r-quadprog

  run:
    - r-base
    - r-quadprog

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

about:
  home: http://www.jhsph.edu/agingandhealth/People/Faculty_personal_pages/Varadhan.html
  license: GPL-3
  summary: Barzilai-Borwein spectral methods for solving nonlinear system of equations, and for
    optimizing nonlinear objective functions subject to simple constraints. A tutorial
    style introduction to this package is available in a vignette on the CRAN download
    page or, when the package is loaded in an R session, with vignette("BB").
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

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