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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/BlockFeST_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/BlockFeST/BlockFeST_{{ version }}.tar.gz
  sha256: c5dcc9bb3d57d5a7b9eaf7283acccd854ed1dc68071db9b0fd093816981f94b9

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

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-basix
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-basix

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

about:
  home: https://CRAN.R-project.org/package=BlockFeST
  license: GPL-2.0-only
  summary: An R implementation of an extension of the 'BayeScan' software (Foll, 2008) <DOI:10.1534/genetics.108.092221> for codominant markers, adding the option to group individual SNPs into pre-defined blocks. A typical application of this new approach is the identification of genomic regions, genes, or gene sets containing
    one or more SNPs that evolved under directional selection.
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

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

# Package: BlockFeST
# Type: Package
# Title: Bayesian Calculation of Region-Specific Fixation Index to Detect Local Adaptation
# Version: 1.6
# Date: 2018-05-6
# Author: Bastian Pfeifer
# Maintainer: Bastian Pfeifer <bastianxpfeifer@gmail.com>
# Depends: R (>= 2.14.2), BASIX
# Imports: methods
# Suggests: PopGenome
# Description: An R implementation of an extension of the 'BayeScan' software (Foll, 2008) <DOI:10.1534/genetics.108.092221> for codominant markers, adding the option to group individual SNPs into pre-defined blocks. A typical application of this new approach is the identification of genomic regions, genes, or gene sets containing one or more SNPs that evolved under directional selection.
# License: GPL-2
# LazyLoad: yes
# NeedsCompilation: yes
# Packaged: 2018-05-06 15:30:35 UTC; user
# Repository: CRAN
# Date/Publication: 2018-05-07 09:12:22
