Skip to content

Commit

Permalink
clean up recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
mencian committed Oct 21, 2024
1 parent c248b98 commit a0ae0cf
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 24 deletions.
33 changes: 17 additions & 16 deletions recipes/diamond/build.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
#!/bin/bash

sed -i.bak 's/-march=native/-march=x86-64/' CMakeLists.txt
rm -rf *.bak

mkdir build
cd build
if [[ `uname` == "Darwin" ]]; then
export CONFIG_ARGS="-DCMAKE_FIND_FRAMEWORK=NEVER -DCMAKE_FIND_APPBUNDLE=NEVER"
else
export CONFIG_ARGS=""
fi

cmake -S. -B build -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
-DCMAKE_CXX_COMPILER="${CXX}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS} -O3 -I${PREFIX}/include" \
-DWITH_ZSTD=ON \
-DZSTD_LIBRARY="${PREFIX}/lib/libzstd.a" \
-DZSTD_INCLUDE_DIR="${PREFIX}/include" \
-DBLAST_LIBRARY_DIR="${PREFIX}/lib/ncbi-blast+" \
-DCMAKE_OSX_DEPLOYMENT_TARGET="" \
"${CONFIG_ARGS}"

cmake .. \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DCMAKE_LIBRARY_PATH="$PREFIX" \
-DWITH_ZSTD=on \
-DZSTD_LIBRARY=$PREFIX/lib/libzstd.a \
-DZSTD_INCLUDE_DIR=$PREFIX/include/ \
-DBLAST_LIBRARY_DIR=$PREFIX/lib/ncbi-blast+ \
-DCMAKE_OSX_DEPLOYMENT_TARGET=""

cmake --build . --config Release --target install

# Reference link:
# https://github.com/conda/conda-recipes/blob/master/boost/build.sh
cmake --build build --target install -v
18 changes: 10 additions & 8 deletions recipes/diamond/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ source:
sha256: {{ sha256 }}

build:
number: 1
number: 2
run_exports:
- {{ pin_subpackage('diamond', max_pin="x") }}

Expand All @@ -23,24 +23,26 @@ requirements:
host:
- zlib
- zstd-static
run:
- zlib

test:
commands:
- diamond --help 2>&1 > /dev/null

about:
home: https://github.com/bbuchfink/diamond
license: GPL-3.0-or-later
home: "https://github.com/bbuchfink/diamond"
license: "GPL-3.0-or-later"
license_family: GPL3
license_file: LICENSE
summary: Accelerated BLAST compatible local sequence aligner
doc_url: https://github.com/bbuchfink/diamond/wiki
summary: "Accelerated BLAST compatible local sequence aligner."
doc_url: "https://github.com/bbuchfink/diamond/wiki"
dev_url: "https://github.com/bbuchfink/diamond"

extra:
identifiers:
- biotools:Diamond
- biotools:diamond
- usegalaxy-eu:bg_diamond
- usegalaxy-eu:bg_diamond_makedb
- usegalaxy-eu:bg_diamond_view
- doi:10.1038/s41592-021-01101-x
additional-platforms:
- osx-arm64
Expand Down

0 comments on commit a0ae0cf

Please sign in to comment.