{% set version = '3.2' %}
{% 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: c7a001b9354a3ea6280362ddb2d1e5dc7ede2bc324fd9564a58c42ccfe6a75ec

build:
  merge_build_host: True  # [win]
  number: 1
  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)
  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
