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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/fastICA_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/fastICA/fastICA_{{ version }}.tar.gz
  sha256: 32223593374102bf54c8fdca7b57231e4f4d0dd0be02d9f3500ad41b1996f1fe

build:
  merge_build_host: True  # [win]
  number: 2
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - libblas
    - liblapack
    - r-base
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]

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

about:
  home: https://CRAN.R-project.org/package=fastICA
  license: GPL-2.0-or-later
  summary: Implementation of FastICA algorithm to perform Independent Component Analysis (ICA)
    and Projection Pursuit.
  license_family: GPL3
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

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

# Package: fastICA
# Version: 1.2-2
# Date: 2019-07-08
# Title: FastICA Algorithms to Perform ICA and Projection Pursuit
# Author: J L Marchini, C Heaton and B D Ripley <ripley@stats.ox.ac.uk>
# Maintainer: Brian Ripley <ripley@stats.ox.ac.uk>
# Depends: R (>= 3.0.0)
# Suggests: MASS
# Description: Implementation of FastICA algorithm to perform Independent Component Analysis (ICA) and Projection Pursuit.
# License: GPL-2 | GPL-3
# NeedsCompilation: yes
# Packaged: 2019-07-08 14:58:13 UTC; ripley
# Repository: CRAN
# Date/Publication: 2019-07-08 14:59:51 UTC
