diff --git a/recipes/ntsm/LICENSE b/recipes/ntsm/LICENSE new file mode 100644 index 0000000000000..9cdf82590afd0 --- /dev/null +++ b/recipes/ntsm/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Justin Chu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/recipes/ntsm/build.sh b/recipes/ntsm/build.sh new file mode 100644 index 0000000000000..3904525a2c3bb --- /dev/null +++ b/recipes/ntsm/build.sh @@ -0,0 +1,33 @@ +#!/bin/bash -euo + +set -xe + +OS=$(uname) +ARCH=$(uname -m) + +export M4="${BUILD_PREFIX}/bin/m4" +export CFLAGS="${CFLAGS} -I$PREFIX/include -O3" +export LDFLAGS="${LDFLAGS} -L$PREFIX/lib" +export CPATH="${PREFIX}/include" +export CXXFLAGS="${CXXFLAGS} -I${PREFIX}/include -O3 -std=c++17 -Wno-braced-scalar-init" +export CPPFLAGS="${CPPFLAGS} -I${PREFIX}/include" + +if [[ "${OS}" == "Darwin" && "${ARCH}" == "arm64" ]]; then + export EXTRA_ARGS="--host=arm64" +elif [[ "${OS}" == "Linux" && "${ARCH}" == "aarch64" ]]; then + export EXTRA_ARGS="--host=aarch64" +else + export EXTRA_ARGS="--host=x86_64" +fi + +autoreconf -if +./configure --prefix="${PREFIX}" CC="${CC}" CXX="${CXX}" \ + CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \ + CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" \ + --disable-dependency-tracking --disable-silent-rules "${EXTRA_ARGS}" + +make -j ${CPU_COUNT} +make install + +mkdir -p ${PREFIX}/bin +cp -rf ntsm-scripts ntsmSiteGen ${PREFIX}/bin diff --git a/recipes/ntsm/meta.yaml b/recipes/ntsm/meta.yaml new file mode 100644 index 0000000000000..1058cec6e8994 --- /dev/null +++ b/recipes/ntsm/meta.yaml @@ -0,0 +1,61 @@ +{% set name = "ntsm" %} +{% set version = "1.2.0" %} + +package: + name: {{ name }} + version: {{ version }} + +source: + url: https://github.com/JustinChu/ntsm/releases/download/{{ version }}/{{ name }}-{{ version }}.tar.gz + sha256: 5f22a42b71f7a446c45a98518bb6c18613e4fb320d21264903c661a949a7da23 + +build: + skip: True # [win] + number: 0 + run_exports: + - {{ pin_subpackage('ntsm', max_pin="x") }} + +requirements: + build: + - {{ compiler('cxx') }} + - make + - autoconf + - automake + - libtool + host: + - zlib + - libgomp # [linux] + - llvm-openmp # [osx] + run: + - libgomp # [linux] + - llvm-openmp # [osx] + - python + - pyfaidx + - numpy + - scikit-learn + - pandas + - samtools + - bwa + - perl + - make + +test: + commands: + - ntsmCount --help + - ntsmVCF --help + - ntsmEval --help + - ntsmSiteGen test + +about: + home: "https://github.com/JustinChu/ntsm" + summary: "ntsm - Nucleotide Sequence/Sample Matcher" + license: MIT + license_family: MIT + license_file: LICENSE + dev_url: "https://github.com/JustinChu/ntsm" + doc_url: "https://github.com/JustinChu/ntsm/blob/{{ version }}/README.md" + +extra: + additional-platforms: + - linux-aarch64 + - osx-arm64