{% set version = '0.3.13' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/RcppGSL_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/RcppGSL/RcppGSL_{{ version }}.tar.gz
  sha256: fe5e73bc119c6424e1a40b6fea17417a7bba93e81dbe9b7cf86dde9b8e8d93e7

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: tinytest
requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [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
    - r-rcpp >=0.11.0
    - gsl

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

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('RcppGSL')"           # [not win]
    - "\"%R%\" -e \"library('RcppGSL')\""  # [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/eddelbuettel/rcppgsl, https://dirk.eddelbuettel.com/code/rcpp.gsl.html
  license: GPL-2
  summary: '''Rcpp'' integration for ''GNU GSL'' vectors and matrices The ''GNU Scientific Library''
    (or ''GSL'') is a collection of numerical routines for scientific computing. It
    is particularly useful for C and C++ programs as it provides a standard C interface
    to a wide range of mathematical routines. There are over 1000 functions in total
    with an extensive test suite. The ''RcppGSL'' package provides an easy-to-use interface
    between ''GSL'' data structures and R using concepts from ''Rcpp'' which is itself
    a package that eases the interfaces between R and C++. This package also serves
    as a prime example of how to build a package that uses ''Rcpp'' to connect to another
    third-party library. The ''autoconf'' script, ''inline'' plugin and example package
    can all be used as a stanza to  write a similar package against another library.'
  license_family: GPL2
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

extra:
  recipe-maintainers:
    - katietz

# The original CRAN metadata for this package was:

# Package: RcppGSL
# Type: Package
# Title: 'Rcpp' Integration for 'GNU GSL' Vectors and Matrices
# Version: 0.3.13
# Date: 2023-01-12
# Author: Dirk Eddelbuettel and Romain Francois
# Maintainer: Dirk Eddelbuettel <edd@debian.org>
# Description: 'Rcpp' integration for 'GNU GSL' vectors and matrices The 'GNU Scientific Library' (or 'GSL') is a collection of numerical routines for scientific computing. It is particularly useful for C and C++ programs as it provides a standard C interface to a wide range of mathematical routines. There are over 1000 functions in total with an extensive test suite. The 'RcppGSL' package provides an easy-to-use interface between 'GSL' data structures and R using concepts from 'Rcpp' which is itself a package that eases the interfaces between R and C++. This package also serves as a prime example of how to build a package that uses 'Rcpp' to connect to another third-party library. The 'autoconf' script, 'inline' plugin and example package can all be used as a stanza to  write a similar package against another library.
# License: GPL (>= 2)
# LazyLoad: yes
# LinkingTo: Rcpp
# Imports: Rcpp (>= 0.11.0), stats
# Suggests: tinytest
# SystemRequirements: GNU GSL
# URL: https://github.com/eddelbuettel/rcppgsl, https://dirk.eddelbuettel.com/code/rcpp.gsl.html
# BugReports: https://github.com/eddelbuettel/rcppgsl/issues
# NeedsCompilation: yes
# Packaged: 2023-01-12 23:38:26 UTC; edd
# Repository: CRAN
# Date/Publication: 2023-01-13 00:10:02 UTC

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