{% set version = "0.6-2" %}
{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/gmp_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/gmp/gmp_{{ version }}.tar.gz
  sha256: 6bfcb45b3f1e7da27d8773f911027355cab371d150c3dabf7dbaf8fba85b7f0e

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

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
    - {{ native }}gmp >=5.0.1,<7
  run:
    - r-base
    - {{ native }}gmp >=5.0.1,<7
    - {{ native }}gcc-libs         # [win]

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

about:
  home: https://CRAN.R-project.org/package=gmp
  license: GPL-2.0-or-later
  summary: Multiple Precision Arithmetic (big integers and rationals, prime number tests, matrix computation), "arithmetic without limitations" using the C library GMP (GNU Multiple Precision Arithmetic).
  license_family: GPL
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3

extra:
  recipe-maintainers:
    - conda-forge/r

# Package: gmp
# Version: 0.5-13.5
# Date: 2019-02-21
# Title: Multiple Precision Arithmetic
# Author: Antoine Lucas, Immanuel Scholz, Rainer Boehme <rb-gmp@reflex-studio.de>, Sylvain Jasson <jasson@toulouse.inra.fr>, Martin Maechler <maechler@stat.math.ethz.ch>
# Maintainer: Antoine Lucas <antoinelucas@gmail.com>
# Description: Multiple Precision Arithmetic (big integers and rationals, prime number tests, matrix computation), "arithmetic without limitations" using the C library GMP (GNU Multiple Precision Arithmetic).
# Depends: R (>= 3.0.0)
# Imports: methods
# Suggests: Rmpfr
# SystemRequirements: gmp (>= 4.2.3)
# License: GPL
# BuildResaveData: no
# LazyDataNote: not available, as we use data/*.R *and* our classes
# NeedsCompilation: yes
# Packaged: 2019-03-11 13:49:47 UTC; l0413674
# Repository: CRAN
# Date/Publication: 2019-03-11 16:00:02 UTC
