{% set version = "1.6.11" %}
{% set sha256_package = "eb6a8e121eb9689597da9ec5a105ba5392e458ab30510fe26b260b81a6d9fdb0" %}
{% set sha256_script = "0c61d79cf519e5c5ae33807725577da3d1599bcc89413c3a6bce3fb7c99090c7" %}

package:
  name: r-stitch
  version: '{{ version }}'

source:
  - url: https://github.com/rwdavies/stitch/releases/download/{{ version }}/STITCH_{{ version }}.tar.gz
    sha256: '{{ sha256_package }}'
  - url: https://raw.githubusercontent.com/rwdavies/STITCH/{{ version }}/STITCH.R
    sha256: '{{ sha256_script }}'

build:
  number: 0
  run_exports:
    - {{ pin_subpackage('r-stitch', max_pin="x") }}
  
requirements:
  build:
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
    - autoconf
    - automake
    - pkg-config
    - make
    - libcxx <17 # [osx]
  host:
    - r-base
    - r-rcpp >=0.12.18
    - r-rcpparmadillo >=0.8.600.0.0
    - r-data.table >=1.11.8
    - r-rrbgen >=0.0.6
    - xz
    - gmp
    - mpfr
    - mpc >=1.1.0
    - libblas
    - zlib
    - libcxx <17 # [osx]
  run:
    - r-base
    - r-rcpp >=0.12.18
    - r-rcpparmadillo >=0.8.600.0.0
    - r-data.table >=1.11.8
    - r-rrbgen >=0.0.6
    - r-optparse
    - xz
    - gmp
    - mpfr
    - mpc >=1.1.0
    - r-testthat >=2.0.0
    - htslib >=1.4
    - samtools >=1.4
    - rsync
    - zlib

test:
  commands:
    - $R -e "library('STITCH');  testthat::test_package('STITCH', stop_on_failure = TRUE, stop_on_warning = TRUE, filter = 'acceptance-one', reporter = 'summary')"
    - 'STITCH.R --help'

about:
  home: https://github.com/rwdavies/stitch
  license: GPL-3.0-only
  license_family: GPL3
  license_file: LICENSE
  summary: STITCH - Sequencing To Imputation Through Constructing Haplotypes
  doc_url: https://github.com/rwdavies/stitch
  dev_url: https://github.com/rwdavies/stitch

extra:
  additional-platforms:
    - linux-aarch64
  recipe-maintainers:
    - rwdavies
