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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/GA_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/GA/GA_{{ version }}.tar.gz
  sha256: b494d970b9a2876fdb805d2ba0ac7d8a2cfd875b4e432d1c532cdb1b50eb562d

build:
  merge_build_host: true  # [win]
  number: 0
  skip: true  # [win and r_base == "3.6"]
  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
    - r-cli
    - r-crayon
    - r-foreach
    - r-iterators
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp
    - r-rcpparmadillo
    - r-cli
    - r-crayon
    - r-foreach
    - r-iterators

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

about:
  home: https://luca-scr.github.io/GA/
  license: GPL-2.0-or-later
  summary: Flexible general-purpose toolbox implementing genetic algorithms (GAs) for stochastic optimisation. Binary, real-valued, and permutation representations are available to optimize a fitness function, i.e. a function provided by users depending on their objective function. Several genetic operators are available
    and can be combined to explore the best settings for the current task. Furthermore, users can define new genetic operators and easily evaluate their performances. Local search using general-purpose optimisation algorithms can be applied stochastically to exploit interesting regions. GAs can be run sequentially or in
    parallel, using an explicit master-slave parallelisation or a coarse-grain islands approach.
  license_family: GPL3
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

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

# Package: GA
# Version: 3.2
# Date: 2019-01-10
# Title: Genetic Algorithms
# Description: Flexible general-purpose toolbox implementing genetic algorithms (GAs) for stochastic optimisation. Binary, real-valued, and permutation representations are available to optimize a fitness function, i.e. a function provided by users depending on their objective function. Several genetic operators are available and can be combined to explore the best settings for the current task. Furthermore, users can define new genetic operators and easily evaluate their performances. Local search using general-purpose optimisation algorithms can be applied stochastically to exploit interesting regions. GAs can be run sequentially or in parallel, using an explicit master-slave parallelisation or a coarse-grain islands approach.
# Authors@R: c( person("Luca", "Scrucca", role = c("aut", "cre"), email = "luca.scrucca@unipg.it", comment = c(ORCID = "0000-0003-3826-0484")))
# Depends: R (>= 3.4), methods, foreach, iterators
# Imports: stats, graphics, grDevices, utils, cli, crayon, Rcpp
# LinkingTo: Rcpp, RcppArmadillo
# Suggests: parallel, doParallel, doRNG (>= 1.6), knitr (>= 1.8)
# License: GPL (>= 2)
# VignetteBuilder: knitr
# URL: https://luca-scr.github.io/GA/
# BugReports: https://github.com/luca-scr/GA/issues
# Repository: CRAN
# ByteCompile: true
# LazyData: yes
# RoxygenNote: 6.1.1
# NeedsCompilation: yes
# Packaged: 2019-01-10 10:53:43 UTC; luca
# Author: Luca Scrucca [aut, cre] (<https://orcid.org/0000-0003-3826-0484>)
# Maintainer: Luca Scrucca <luca.scrucca@unipg.it>
# Date/Publication: 2019-01-10 12:00:03 UTC
