{% set version = "0.20-137" %}
{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/RhpcBLASctl_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/RhpcBLASctl/RhpcBLASctl_{{ version }}.tar.gz
  sha256: db02cbdad32fc54bc60bb27baf0799e919c09c09710c33bf72c741f93421616f

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}sed               # [win]
    - {{ posix }}grep              # [win]
    - {{ posix }}autoconf
    - {{ posix }}automake          # [not win]
    - {{ posix }}automake-wrapper  # [win]
    - {{ posix }}pkg-config
    - {{ posix }}make
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]

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

about:
  home: http://prs.ism.ac.jp/~nakama/Rhpc/
  license: AGPL-3
  summary: Control the number of threads on 'BLAS' (Aka 'GotoBLAS', 'OpenBLAS', 'ACML', 'BLIS' and 'MKL'). And possible to control the number of threads in 'OpenMP'. Get a number of logical cores and physical cores if feasible.
  license_family: AGPL
  license_file: {{ environ["PREFIX"] }}/lib/R/share/licenses/AGPL-3

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

# Package: RhpcBLASctl
# Version: 0.18-205
# Date: 2018-07-24
# Title: Control the Number of Threads on 'BLAS'
# Author: Junji NAKANO <nakanoj@ism.ac.jp> and Ei-ji Nakama <nakama@ki.rim.or.jp>
# Maintainer: Ei-ji Nakama <nakama@ki.rim.or.jp>
# Description: Control the number of threads on 'BLAS' (Aka 'GotoBLAS', 'OpenBLAS', 'ACML', 'BLIS' and 'MKL'). And possible to control the number of threads in 'OpenMP'. Get a number of logical cores and physical cores if feasible.
# License: AGPL-3
# URL: http://prs.ism.ac.jp/~nakama/Rhpc/
# ByteCompile: true
# NeedsCompilation: yes
# Packaged: 2018-07-24 04:37:50 UTC; nakama
# Repository: CRAN
# Date/Publication: 2018-07-24 12:10:03 UTC
