{% set version = '2021.1' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/SQUAREM_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/SQUAREM/SQUAREM_{{ version }}.tar.gz
  sha256: 66e5e18ca29903e4950750bbd810f0f9df85811ee4195ce0a86d939ba8183a58

build:
  merge_build_host: True  # [win]
  # If this is a new build for the same version, increment the build number.
  number: 0
  # no skip
  noarch: generic

  # This is required to make R link correctly on Linux.
  rpaths:
    - lib/R/lib/
    - lib/

# Suggests: setRNG
requirements:
  build:
    - {{ posix }}zip               # [win]

  host:
    - r-base

  run:
    - r-base

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('SQUAREM')"           # [not win]
    - "\"%R%\" -e \"library('SQUAREM')\""  # [win]

  # You can also put a file called run_test.py, run_test.sh, or run_test.bat
  # in the recipe that will be run at test time.

  # requires:
    # Put any additional test requirements here.

about:
  home: https://coah.jhu.edu/people/Faculty_personal_Pages/Varadhan.html
  license: GPL-2
  summary: 'Algorithms for accelerating the convergence of slow, monotone sequences from smooth,
    contraction mapping such as the EM algorithm. It can be used to accelerate any smooth,
    linearly convergent acceleration scheme.  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("SQUAREM"). Refer to the J Stat Software
    article: <doi:10.18637/jss.v092.i07>.'
  license_family: GPL2
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

extra:
  recipe-maintainers:
    - mingwandroid

# The original CRAN metadata for this package was:

# Package: SQUAREM
# Version: 2021.1
# Date: 2021-01-12
# Title: Squared Extrapolation Methods for Accelerating EM-Like Monotone Algorithms
# Description: Algorithms for accelerating the convergence of slow, monotone sequences from smooth, contraction mapping such as the EM algorithm. It can be used to accelerate any smooth, linearly convergent acceleration scheme.  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("SQUAREM"). Refer to the J Stat Software article: <doi:10.18637/jss.v092.i07>.
# Depends: R (>= 3.0)
# Suggests: setRNG
# LazyLoad: yes
# License: GPL (>= 2)
# Author: Ravi Varadhan
# Maintainer: Ravi Varadhan <ravi.varadhan@jhu.edu>
# URL: https://coah.jhu.edu/people/Faculty_personal_Pages/Varadhan.html
# Repository: CRAN
# NeedsCompilation: no
# Packaged: 2021-01-12 23:59:02 UTC; rvaradhan
# Date/Publication: 2021-01-13 06:40:10 UTC

# See
# https://docs.conda.io/projects/conda-build for
# more information about meta.yaml
