diff --git a/recipes/sra-tools/build.sh b/recipes/sra-tools/build.sh index 5b55bd0ccec80..272542a5bdabe 100755 --- a/recipes/sra-tools/build.sh +++ b/recipes/sra-tools/build.sh @@ -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 @@ -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 diff --git a/recipes/sra-tools/meta.yaml b/recipes/sra-tools/meta.yaml index b05af8f4b98c5..00633aae7b54e 100644 --- a/recipes/sra-tools/meta.yaml +++ b/recipes/sra-tools/meta.yaml @@ -15,7 +15,7 @@ source: folder: ncbi-vdb # [osx] build: - number: 0 + number: 2 run_exports: - {{ pin_subpackage(name, max_pin='x') }} @@ -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