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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/matchingR_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/matchingR/matchingR_{{ version }}.tar.gz
  sha256: 3923d8474b0ffce8a2a9bbe28c4179d08db439f7224fc4eab70caaa8d5db350e

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 }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-rcpp
    - r-rcpparmadillo
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp
    - r-rcpparmadillo

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

about:
  home: https://github.com/jtilly/matchingR/
  license: GPL-2.0-or-later
  summary: Computes matching algorithms quickly using Rcpp. Implements the Gale-Shapley Algorithm to compute the stable matching for two-sided markets, such as the stable marriage problem and the college-admissions problem. Implements Irving's Algorithm for the stable roommate problem. Implements the top trading cycle algorithm
    for the indivisible goods trading problem.
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

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

# Package: matchingR
# Type: Package
# Title: Matching Algorithms in R and C++
# Version: 1.3.0
# Date: 2018-01-26
# Author: Jan Tilly, Nick Janetos
# Maintainer: Jan Tilly <jantilly@gmail.com>
# Description: Computes matching algorithms quickly using Rcpp. Implements the Gale-Shapley Algorithm to compute the stable matching for two-sided markets, such as the stable marriage problem and the college-admissions problem. Implements Irving's Algorithm for the stable roommate problem. Implements the top trading cycle algorithm for the indivisible goods trading problem.
# License: GPL (>= 2)
# URL: https://github.com/jtilly/matchingR/
# BugReports: https://github.com/jtilly/matchingR/issues/
# Depends: Rcpp
# LinkingTo: Rcpp, RcppArmadillo
# Suggests: testthat, knitr
# VignetteBuilder: knitr
# RoxygenNote: 6.0.1
# NeedsCompilation: yes
# Packaged: 2018-01-26 15:21:00 UTC; jtilly
# Repository: CRAN
# Date/Publication: 2018-01-26 22:04:41 UTC
