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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/Rmpfr_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/Rmpfr/Rmpfr_{{ version }}.tar.gz
  sha256: 828dbdc98e28a9f7beb0d9bec251a7387b54908753314d75c1400754560cf641

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

requirements:
  build:
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - r-gmp                      # [build_platform != target_platform]
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [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-gmp >=0.5_8
    - mpfr        # [not win]
    - m2w64-mpfr  # [win]
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-gmp >=0.5_8
    - mpfr        # [not win]
    - m2w64-mpfr  # [win]

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

about:
  home: http://rmpfr.r-forge.r-project.org/
  license: GPL-2.0-or-later
  summary: Arithmetic (via S4 classes and methods) for arbitrary precision floating point numbers, including transcendental ("special") functions.  To this end, the package interfaces to the 'LGPL' licensed 'MPFR' (Multiple Precision Floating-Point Reliable) Library which itself is based on the 'GMP' (GNU Multiple Precision)
    Library.
  license_family: GPL3
  license_file: {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

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

# Package: Rmpfr
# Title: R MPFR - Multiple Precision Floating-Point Reliable
# Version: 0.7-2
# Date: 2019-01-18
# DateNote: Previous CRAN version 0.7-1 on 2018-07-24
# Type: Package
# Authors@R: c( person("Martin","Maechler", role=c("aut","cre"), email="maechler@stat.math.ethz.ch", comment = c(ORCID="0000-0002-8685-9910")) )
# SystemRequirements: gmp (>= 4.2.3), mpfr (>= 3.0.0)
# SystemRequirementsNote: 'MPFR' (MP Floating-Point Reliable Library, http://mpfr.org/) and 'GMP' (GNU Multiple Precision library, http://gmplib.org/), see >> README.md
# Depends: gmp (>= 0.5-8), R (>= 3.3.0)
# Imports: stats, utils, methods
# Suggests: MASS, Bessel, polynom, sfsmisc (>= 1.0-20), Matrix
# SuggestsNote: MASS, polynom, sfsmisc: only for vignette; Matrix: test-tools
# URL: http://rmpfr.r-forge.r-project.org/
# Description: Arithmetic (via S4 classes and methods) for arbitrary precision floating point numbers, including transcendental ("special") functions.  To this end, the package interfaces to the 'LGPL' licensed 'MPFR' (Multiple Precision Floating-Point Reliable) Library which itself is based on the 'GMP' (GNU Multiple Precision) Library.
# License: GPL (>= 2)
# NeedsCompilation: yes
# Packaged: 2019-01-18 16:24:15 UTC; maechler
# Author: Martin Maechler [aut, cre] (<https://orcid.org/0000-0002-8685-9910>)
# Maintainer: Martin Maechler <maechler@stat.math.ethz.ch>
# Repository: CRAN
# Date/Publication: 2019-01-22 22:00:02 UTC
