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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/PMA_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/PMA/PMA_{{ version }}.tar.gz
  sha256: 3a155b89e380273dfd4ab301c422184a3f6d4679dc9e3d1bb65939392af511e6

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

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

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

about:
  home: https://github.com/bnaras/PMA
  license: GPL-2.0-or-later
  summary: 'Performs Penalized Multivariate Analysis: a penalized matrix decomposition, sparse
    principal components analysis, and sparse canonical correlation analysis, described
    in Witten, Tibshirani and Hastie (2009) <doi:10.1093/biostatistics/kxp008> and Witten
    and Tibshirani (2009) Extensions of sparse canonical correlation analysis, with
    applications to genomic data <doi:10.2202/1544-6115.1470>.'
  license_family: GPL2
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

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

# Package: PMA
# Type: Package
# Title: Penalized Multivariate Analysis
# Version: 1.2.1
# Date: 2020-02-04
# URL: https://github.com/bnaras/PMA
# BugReports: https://github.com/bnaras/PMA/issues
# Author: Daniela Witten and Rob Tibshirani
# Maintainer: Rob Tibshirani <tibs@stanford.edu>
# Description: Performs Penalized Multivariate Analysis: a penalized matrix decomposition, sparse principal components analysis, and sparse canonical correlation analysis, described in Witten, Tibshirani and Hastie (2009) <doi:10.1093/biostatistics/kxp008> and Witten and Tibshirani (2009) Extensions of sparse canonical correlation analysis, with applications to genomic data <doi:10.2202/1544-6115.1470>.
# Depends: R (>= 2.10)
# License: GPL (>= 2)
# Encoding: UTF-8
# RoxygenNote: 7.0.2
# NeedsCompilation: yes
# Packaged: 2020-02-03 16:55:16 UTC; tibs
# Repository: CRAN
# Date/Publication: 2020-02-03 17:30:07 UTC
