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

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

source:
  fn: deSolve_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/deSolve_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/deSolve/deSolve_{{ version }}.tar.gz
  sha256: 45c372d458fe4c7c11943d4c409517849b1be6782dc05bd9a74b066e67250c63

build:
  merge_build_host: True  # [win]
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('fortran') }}  # [not win]
    - {{native}}toolchain        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
  run:
    - r-base
    - {{native}}gcc-libs         # [win]

test:
  commands:
    - $R -e "library('deSolve')"           # [not win]
    - "\"%R%\" -e \"library('deSolve')\""  # [win]

about:
  home: http://desolve.r-forge.r-project.org/
  license: GPL (>= 2)
  summary: Functions that solve initial value problems of a system of first-order ordinary differential
    equations ('ODE'), of partial differential equations ('PDE'), of differential algebraic
    equations ('DAE'), and of delay differential equations.  The functions provide an
    interface to the FORTRAN functions 'lsoda', 'lsodar', 'lsode', 'lsodes' of the 'ODEPACK'
    collection, to the FORTRAN functions 'dvode', 'zvode' and 'daspk' and a C-implementation
    of solvers of the 'Runge-Kutta' family with fixed or variable time steps.  The package
    contains routines designed for solving 'ODEs' resulting from 1-D, 2-D and 3-D partial
    differential equations ('PDE') that have been converted to 'ODEs' by numerical differencing.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

extra:
  recipe-maintainers:
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
