{% set version = '7.3-12' %}

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

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

source:
  fn: nnet_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/nnet_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/nnet/nnet_{{ version }}.tar.gz
  sha256: 2723523e8581cc0e2215435ac773033577a16087a3f41d111757dd96b8c5559d

build:
  number: 0
  skip: true  # [win32]

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

requirements:
  build:
    - r-base
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base

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

about:
  home: http://www.stats.ox.ac.uk/pub/MASS4/
  license: GPL-2 | GPL-3
  summary: Software for feed-forward neural networks with a single hidden layer, and for multinomial
    log-linear models.
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
