{% 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]
  # 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: MASS, Bessel, polynom, sfsmisc (>= 1.1-14)
requirements:
  build:
    - {{ 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.6_1
    - mpfr

  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-gmp >=0.6_1
    - mpfr

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('Rmpfr')"           # [not win]
    - "\"%R%\" -e \"library('Rmpfr')\""  # [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://rmpfr.r-forge.r-project.org/
  license: GPL-2
  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: GPL2
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

extra:
  recipe-maintainers:
    - katietz

# The original CRAN metadata for this package was:

# Package: Rmpfr
# Title: R MPFR - Multiple Precision Floating-Point Reliable
# Version: 0.9-3
# Date: 2023-07-24
# DateNote: Previous CRAN version 0.9-2 on 2023-04-21
# 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")) , person(c("Richard", "M."), "Heiberger", role = "ctb", email="rmh@temple.edu", comment = "formatHex(), *Bin, *Dec") , person(c("John", "C."), "Nash", role = "ctb", email="nashjc@uottawa.ca", comment = "hjkMpfr(), origin of unirootR()") , person(c("Hans", "W."), "Borchers", role = "ctb", email="hwborchers@googlemail.com", comment = "optimizeR(*, \"GoldenRatio\"); origin of hjkMpfr()") )
# 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.
# SystemRequirements: gmp (>= 4.2.3), mpfr (>= 3.0.0), pdfcrop (part of TexLive) is required to rebuild the vignettes.
# SystemRequirementsNote: 'MPFR' (MP Floating-Point Reliable Library, https://www.mpfr.org/) and 'GMP' (GNU Multiple Precision library, https://gmplib.org/), see >> README.md
# Depends: gmp (>= 0.6-1), R (>= 3.6.0)
# Imports: stats, utils, methods
# Suggests: MASS, Bessel, polynom, sfsmisc (>= 1.1-14)
# SuggestsNote: MASS, polynom, sfsmisc: only for vignette;
# Enhances: dfoptim, pracma, DPQ
# EnhancesNote: mentioned in Rd xrefs | used in example
# URL: https://rmpfr.r-forge.r-project.org/
# BugReports: https://r-forge.r-project.org/tracker/?group_id=386
# License: GPL (>= 2)
# Encoding: UTF-8
# NeedsCompilation: yes
# Packaged: 2023-08-07 14:30:45 UTC; maechler
# Author: Martin Maechler [aut, cre] (<https://orcid.org/0000-0002-8685-9910>), Richard M. Heiberger [ctb] (formatHex(), *Bin, *Dec), John C. Nash [ctb] (hjkMpfr(), origin of unirootR()), Hans W. Borchers [ctb] (optimizeR(*, "GoldenRatio"); origin of hjkMpfr())
# Maintainer: Martin Maechler <maechler@stat.math.ethz.ch>
# Repository: CRAN
# Date/Publication: 2023-08-08 14:20:05 UTC

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