{% set version = '1.6-1.1' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/Matrix_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/Matrix/Matrix_{{ version }}.tar.gz
  sha256: 331eb1f1fe9441d4224d8551072443596001b50e8c15618f59cb938b46ee8cc2

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: MASS, datasets, sfsmisc
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-lattice

  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-lattice

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('Matrix')"           # [not win]
    - "\"%R%\" -e \"library('Matrix')\""  # [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://Matrix.R-forge.R-project.org
  license: GPL-2
  summary: A rich hierarchy of sparse and dense matrix classes, including general, symmetric,
    triangular, and diagonal matrices with numeric, logical, or pattern entries.  Efficient
    methods for operating on such matrices, often wrapping the 'BLAS', 'LAPACK', and
    'SuiteSparse' libraries.
  license_family: GPL2
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'
    - LICENCE

extra:
  recipe-maintainers:
    - ocefpaf
    - mingwandroid

# The original CRAN metadata for this package was:

# Package: Matrix
# Version: 1.6-1.1
# Date: 2023-09-08
# Priority: recommended
# Title: Sparse and Dense Matrix Classes and Methods
# Description: A rich hierarchy of sparse and dense matrix classes, including general, symmetric, triangular, and diagonal matrices with numeric, logical, or pattern entries.  Efficient methods for operating on such matrices, often wrapping the 'BLAS', 'LAPACK', and 'SuiteSparse' libraries.
# License: GPL (>= 2) | file LICENCE
# URL: https://Matrix.R-forge.R-project.org
# BugReports: https://R-forge.R-project.org/tracker/?atid=294&group_id=61
# Contact: Matrix-authors@R-project.org
# Authors@R: c(person("Douglas", "Bates", role = "aut", comment = c(ORCID = "0000-0001-8316-9503")), person("Martin", "Maechler", role = c("aut", "cre"), email = "mmaechler+Matrix@gmail.com", comment = c(ORCID = "0000-0002-8685-9910")), person("Mikael", "Jagan", role = "aut", comment = c(ORCID = "0000-0002-3542-2938")), person("Timothy A.", "Davis", role = "ctb", comment = c(ORCID = "0000-0001-7614-6899", "SuiteSparse libraries, notably CHOLMOD and AMD", "collaborators listed in dir(pattern=\"^[A-Z]+[.]txt$\", full.names=TRUE, system.file(\"doc\", \"SuiteSparse\", package=\"Matrix\"))")), person("Jens", "Oehlschlagel", role = "ctb", comment = "initial nearPD()"), person("Jason", "Riedy", role = "ctb", comment = c(ORCID = "0000-0002-4345-4200", "GNU Octave's condest() and onenormest()", "Copyright: Regents of the University of California")), person("R Core Team", role = "ctb", comment = "base R's matrix implementation"))
# Depends: R (>= 3.5.0), methods
# Imports: grDevices, graphics, grid, lattice, stats, utils
# Suggests: MASS, datasets, sfsmisc
# Enhances: SparseM, graph
# LazyData: no
# LazyDataNote: not possible, since we use data/*.R and our S4 classes
# BuildResaveData: no
# Encoding: UTF-8
# NeedsCompilation: yes
# Packaged: 2023-09-08 10:37:27 UTC; maechler
# Author: Douglas Bates [aut] (<https://orcid.org/0000-0001-8316-9503>), Martin Maechler [aut, cre] (<https://orcid.org/0000-0002-8685-9910>), Mikael Jagan [aut] (<https://orcid.org/0000-0002-3542-2938>), Timothy A. Davis [ctb] (<https://orcid.org/0000-0001-7614-6899>, SuiteSparse libraries, notably CHOLMOD and AMD, collaborators listed in dir(pattern="^[A-Z]+[.]txt$", full.names=TRUE, system.file("doc", "SuiteSparse", package="Matrix"))), Jens Oehlschlagel [ctb] (initial nearPD()), Jason Riedy [ctb] (<https://orcid.org/0000-0002-4345-4200>, GNU Octave's condest() and onenormest(), Copyright: Regents of the University of California), R Core Team [ctb] (base R's matrix implementation)
# Maintainer: Martin Maechler <mmaechler+Matrix@gmail.com>
# Repository: CRAN
# Date/Publication: 2023-09-18 17:40:02 UTC

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