Skip to content

Commit

Permalink
Update sra-tools recipe (bioconda#50594)
Browse files Browse the repository at this point in the history
* Update sra-tools recipe

* Update sra-tools recipe
  • Loading branch information
mencian committed Sep 10, 2024
1 parent 3064eb8 commit 21244fe
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 21 deletions.
38 changes: 21 additions & 17 deletions recipes/sra-tools/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib"
export CFLAGS="${CFLAGS} -O3 -DH5_USE_110_API -D_FILE_OFFSET_BITS=64 ${LDFLAGS}"
export CXXFLAGS="${CXXFLAGS} -O3 -I${PREFIX}/include"

echo "compiling sra-tools"
if [[ ${OSTYPE} == "darwin"* ]]; then
export CFLAGS="${CFLAGS} -DTARGET_OS_OSX"
export CXXFLAGS="${CXXFLAGS} -DTARGET_OS_OSX"
fi

mkdir -p obj/ngs/ngs-java/javadoc/ngs-doc # prevent error on OSX


Expand All @@ -18,22 +12,32 @@ mkdir -p obj/ngs/ngs-java/javadoc/ngs-doc # prevent error on OSX
export SRA_BUILD_DIR=${SRC_DIR}/build_sratools
mkdir -p ${SRA_BUILD_DIR}

echo "Compiling sra-tools"
if [[ "$(uname)" == "Darwin" ]]; then
export VDB_INC="${SRC_DIR}/ncbi-vdb/interfaces"
export VDB_INC="${SRC_DIR}/ncbi-vdb/interfaces"
export CONFIG_ARGS="-DCMAKE_FIND_FRAMEWORK=NEVER -DCMAKE_FIND_APPBUNDLE=NEVER"
export CFLAGS="${CFLAGS} -DTARGET_OS_OSX"
export CXXFLAGS="${CXXFLAGS} -DTARGET_OS_OSX"
else
export VDB_INC="${PREFIX}/include"
export VDB_INC="${PREFIX}/include"
export CONFIG_ARGS=""
fi

cmake -S sra-tools/ -B build_sratools/ \
-DVDB_BINDIR="${PREFIX}" \
-DVDB_LIBDIR="${PREFIX}/lib64" \
-DVDB_INCDIR="${VDB_INC}" \
-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER="${CXX}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}"

cmake --build build_sratools/ --target install -j ${CPU_COUNT} -v
-DVDB_BINDIR="${PREFIX}" \
-DVDB_LIBDIR="${PREFIX}/lib" \
-DVDB_INCDIR="${VDB_INC}" \
-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_INSTALL_LIBDIR="${PREFIX}/lib" \
-DCMAKE_C_COMPILER="${CC}" \
-DCMAKE_C_FLAGS="${CFLAGS}" \
-DCMAKE_CXX_COMPILER="${CXX}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
"${CONFIG_ARGS}"

cmake --build build_sratools/ --target install -j "${CPU_COUNT}" -v


# Strip package version from binary names
Expand Down
10 changes: 6 additions & 4 deletions recipes/sra-tools/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ source:
folder: ncbi-vdb # [osx]

build:
number: 0
number: 2
run_exports:
- {{ pin_subpackage(name, max_pin='x') }}

Expand Down Expand Up @@ -55,14 +55,16 @@ test:

about:
home: "https://github.com/ncbi/sra-tools"
license: Public Domain
license: "Public Domain"
summary: "The SRA Toolkit and SDK from NCBI."
description: |
The SRA Toolkit and SDK from NCBI is a collection of tools and libraries
for using data in the INSDC Sequence Read Archives.
"The SRA Toolkit and SDK from NCBI is a collection of tools and libraries
for using data in the INSDC Sequence Read Archives."
dev_url: "https://github.com/ncbi/sra-tools"
doc_url: "https://github.com/ncbi/sra-tools/wiki"

extra:
notes: 'After installation, you should run the configuration tool: ./vdb-config
-i. This tool will setup your download/cache area for downloaded files and references.'
identifiers:
- biotools:sra-tools

0 comments on commit 21244fe

Please sign in to comment.