{% set version = "2.12.0" %}
{% set sha256 = "fda3c9c9d488cad6c1880a98a236d842bcf3610e3e702af61f7a48cf0a714b88" %}

package:
  name: blast
  version: {{ version }}

source:
  - url: https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/{{ version }}/ncbi-blast-{{ version }}+-src.tar.gz
    sha256: {{ sha256 }}
    folder: blast
    patches:
      - configurellvm.patch
      - get_species_taxids.patch
  # Get optional RpsbProc
  # The rpsbproc command line utility is an addition to the standalone version of
  # Reverse Position-Specific BLAST (RPS-BLAST), also known as CD-Search (Conserved
  # Domain Search).
  - url: https://ftp.ncbi.nih.gov/pub/mmdb/cdd/rpsbproc/RpsbProc-src.tar.gz
    sha256: 8b29f7e7d0a0654d10943e362557ed2d8df9a16218a4c8441c4dea4e7dc9154f
    folder: RpsbProc
    patches:
      - normbase.patch

build:
  number: 0

requirements:
  build:
    - make
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
  host:
    - zlib
    - bzip2
    - pcre
    - entrez-direct
    - curl
    - llvm-openmp  # [osx]
  run:
    - zlib
    - bzip2
    - pcre
    - perl
    - perl-list-moreutils
    - perl-archive-tar
    - perl-json
    - entrez-direct
    - curl
    - llvm-openmp  # [osx]

test:
  files:
    - test.fa
    - testdatabase.fa
  commands:
    # (see run_test.sh for remainder of tests)
    - blastn -help
    - blastp -help
    - makeblastdb -help
    - blastdb_aliastool -version > /dev/null
    - blastdbcheck -version > /dev/null
    - blastdbcmd -version > /dev/null
    - blastn -version > /dev/null
    - blastp -version > /dev/null
    - blastx -version > /dev/null
    - convert2blastmask -version > /dev/null
    - dustmasker -version > /dev/null
    - makeblastdb -version > /dev/null
    - makembindex -version > /dev/null
    - psiblast -version > /dev/null
    - rpsblast -version > /dev/null
    - rpstblastn -version > /dev/null
    - rpsbproc -version > /dev/null
    - segmasker -version > /dev/null
    - tblastn -version > /dev/null
    - tblastx -version > /dev/null
    - windowmasker -version > /dev/null
    - update_blastdb.pl --version > /dev/null
    - get_species_taxids.sh -h > /dev/null

about:
  home: http://blast.ncbi.nlm.nih.gov/Blast.cgi?PAGE_TYPE=BlastDocs
  license: Public Domain
  summary: BLAST+ is a new suite of BLAST tools that utilizes the NCBI C++ Toolkit.

extra:
  identifiers:
    - biotools:blast
    - doi:10.1016/S0022-2836(05)80360-2
    - usegalaxy-eu:ncbi_blastx_wrapper
  recipe-maintainers:
    - christiam
    - epruesse
