{% set version = '0.3.3.9.3' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/RcppEigen_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/RcppEigen/RcppEigen_{{ version }}.tar.gz
  sha256: 5873a47fd6587d916f86119ab140c6736abf80ac45d06ff1c9d198708e7d1c76

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: inline, tinytest, pkgKitten, microbenchmark
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
    - r-matrix >=1.1_0
    - r-rcpp >=0.11.0

  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-matrix >=1.1_0
    - r-rcpp >=0.11.0

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('RcppEigen')"           # [not win]
    - "\"%R%\" -e \"library('RcppEigen')\""  # [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://github.com/RcppCore/RcppEigen, https://dirk.eddelbuettel.com/code/rcpp.eigen.html
  license: GPL-2
  summary: 'R and ''Eigen'' integration using ''Rcpp''. ''Eigen'' is a C++ template library for
    linear algebra: matrices, vectors, numerical solvers and related algorithms.  It
    supports dense and sparse matrices on integer, floating point and complex numbers,
    decompositions of such matrices, and solutions of linear systems. Its performance
    on many algorithms is comparable with some of the best implementations based on
    ''Lapack'' and level-3 ''BLAS''. The ''RcppEigen'' package includes the header files
    from the ''Eigen'' C++ template library (currently version 3.3.4). Thus users do
    not need to install ''Eigen'' itself in order to use ''RcppEigen''. Since version
    3.1.1, ''Eigen'' is licensed under the Mozilla Public License (version 2); earlier
    version were licensed under the GNU LGPL version 3 or later. ''RcppEigen'' (the
    ''Rcpp'' bindings/bridge to ''Eigen'') is licensed under the GNU GPL version 2 or
    later, as is the rest of ''Rcpp''.'
  license_family: GPL2
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'
    - LICENSE

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

# The original CRAN metadata for this package was:

# Package: RcppEigen
# Type: Package
# Title: 'Rcpp' Integration for the 'Eigen' Templated Linear Algebra Library
# Version: 0.3.3.9.3
# Date: 2022-11-04
# Author: Douglas Bates, Dirk Eddelbuettel, Romain Francois, and Yixuan Qiu; the authors of Eigen for the included version of Eigen
# Maintainer: Dirk Eddelbuettel <edd@debian.org>
# Copyright: See the file COPYRIGHTS for various Eigen copyright details
# Description: R and 'Eigen' integration using 'Rcpp'. 'Eigen' is a C++ template library for linear algebra: matrices, vectors, numerical solvers and related algorithms.  It supports dense and sparse matrices on integer, floating point and complex numbers, decompositions of such matrices, and solutions of linear systems. Its performance on many algorithms is comparable with some of the best implementations based on 'Lapack' and level-3 'BLAS'. The 'RcppEigen' package includes the header files from the 'Eigen' C++ template library (currently version 3.3.4). Thus users do not need to install 'Eigen' itself in order to use 'RcppEigen'. Since version 3.1.1, 'Eigen' is licensed under the Mozilla Public License (version 2); earlier version were licensed under the GNU LGPL version 3 or later. 'RcppEigen' (the 'Rcpp' bindings/bridge to 'Eigen') is licensed under the GNU GPL version 2 or later, as is the rest of 'Rcpp'.
# License: GPL (>= 2) | file LICENSE
# LazyLoad: yes
# Depends: R (>= 3.6.0)
# LinkingTo: Rcpp
# Imports: Matrix (>= 1.1-0), Rcpp (>= 0.11.0), stats, utils
# Suggests: inline, tinytest, pkgKitten, microbenchmark
# URL: https://github.com/RcppCore/RcppEigen, https://dirk.eddelbuettel.com/code/rcpp.eigen.html
# BugReports: https://github.com/RcppCore/RcppEigen/issues
# NeedsCompilation: yes
# Packaged: 2022-11-04 17:14:31 UTC; edd
# Repository: CRAN
# Date/Publication: 2022-11-05 21:50:02 UTC

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