{% set version = '1.9-0' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/mgcv_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/mgcv/mgcv_{{ version }}.tar.gz
  sha256: b2b10078c1f8b2ce3cadcca405496eedacc8d4632ee4357e17632cae1b043b70

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

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

# Suggests: parallel, survival, MASS
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:
    - r-base
    - r-matrix
    - r-nlme >=3.1_64

  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-matrix
    - r-nlme >=3.1_64

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('mgcv')"           # [not win]
    - "\"%R%\" -e \"library('mgcv')\""  # [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://CRAN.R-project.org/package=mgcv
  license: GPL-2
  summary: Generalized additive (mixed) models, some of their extensions and other generalized
    ridge regression with multiple smoothing parameter estimation by (Restricted) Marginal
    Likelihood, Generalized Cross Validation and similar, or using iterated nested Laplace
    approximation for fully Bayesian inference. See Wood (2017) <doi:10.1201/9781315370279>
    for an overview. Includes a gam() function, a wide variety of smoothers, 'JAGS'
    support and distributions beyond the exponential family.
  license_family: GPL2
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - mingwandroid

# The original CRAN metadata for this package was:

# Package: mgcv
# Version: 1.9-0
# Author: Simon Wood <simon.wood@r-project.org>
# Maintainer: Simon Wood <simon.wood@r-project.org>
# Title: Mixed GAM Computation Vehicle with Automatic Smoothness Estimation
# Description: Generalized additive (mixed) models, some of their extensions and other generalized ridge regression with multiple smoothing parameter estimation by (Restricted) Marginal Likelihood, Generalized Cross Validation and similar, or using iterated nested Laplace approximation for fully Bayesian inference. See Wood (2017) <doi:10.1201/9781315370279> for an overview. Includes a gam() function, a wide variety of smoothers, 'JAGS' support and distributions beyond the exponential family.
# Priority: recommended
# Depends: R (>= 3.6.0), nlme (>= 3.1-64)
# Imports: methods, stats, graphics, Matrix, splines, utils
# Suggests: parallel, survival, MASS
# LazyLoad: yes
# ByteCompile: yes
# License: GPL (>= 2)
# NeedsCompilation: yes
# Packaged: 2023-07-07 06:01:32 UTC; sw283
# Repository: CRAN
# Date/Publication: 2023-07-11 08:40:18 UTC

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