Skip to content

Commit

Permalink
rmblast: add arm64/aarch64 builds (#52589)
Browse files Browse the repository at this point in the history
* rmblast: add arm64/aarch64 builds

* clean up recipe

* Update meta.yaml

* Update build.sh

* Update build.sh

* Update build.sh

* Update build.sh

* Try with double quotes for CONFIG_ARGS

* Remove double quotes around   ${CONFIG_ARGS}

* s/ReleaseMT/Release/

---------

Co-authored-by: Martin Grigorov <[email protected]>
  • Loading branch information
mencian and martin-g authored Dec 5, 2024
1 parent 1d88d54 commit c7cd165
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 24 deletions.
48 changes: 28 additions & 20 deletions recipes/rmblast/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ if [ `uname` == Darwin ]; then
# See https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk for -D_LIBCPP_DISABLE_AVAILABILITY
export CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY"
else
export CPP_FOR_BUILD=${CPP}
export CPP_FOR_BUILD="${CPP}"
fi

export LIB_INSTALL_DIR="${PREFIX}/lib/ncbi-blast+"
export LIB_INSTALL_DIR="${PREFIX}/lib64/ncbi-blast+"

# with/without options:
#
Expand Down Expand Up @@ -53,55 +53,63 @@ export LIB_INSTALL_DIR="${PREFIX}/lib/ncbi-blast+"
# Fixes building on Linux
export AR="${AR} rcs"

if [ `uname` == Linux ]; then
export CONFIG_ARGS="--with-openmp --with-hard-runpath --with-runpath=${LIB_INSTALL_DIR}"
# Source path
BLAST_SRC_DIR="$SRC_DIR/c++"
# Work directory
RESULT_PATH="$BLAST_SRC_DIR/Release"

if [[ `uname` == "Linux" ]]; then
export CONFIG_ARGS="--with-runpath=\"${LIB_INSTALL_DIR}\" --with-openmp --with-hard-runpath --with-dll --without-zstd"
if [[ "$(uname -m)" == "x86_64" ]]; then
export CONFIG_ARGS="${CONFIG_ARGS} --with-64"
fi
else
export CONFIG_ARGS="--without-openmp"
export CONFIG_ARGS='--without-openmp --without-dll --without-gcrypt'
fi

# not building with boost as it's only used for unit tests
./configure \
CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \
--prefix=${PREFIX} \
--with-64 \
--prefix="${PREFIX}" \
--with-mt \
--without-dll \
--with-build-root="${RESULT_PATH}" \
--with-bin-release \
--with-flat-makefile \
--without-autodep \
--without-makefile-auto-update \
--without-caution \
--without-boost \
--without-lzo \
--without-zstd \
--without-debug \
--with-experimental=Int8GI \
--without-openssl \
--with-strip \
--without-vdb \
--with-z=${PREFIX} \
--with-bz2=${PREFIX} \
--with-vdb="${PREFIX}" \
--with-z="${PREFIX}" \
--with-bz2="${PREFIX}" \
--with-sqlite3="${PREFIX}" \
--without-krb5 \
--without-gnutls \
--without-sse42 \
--without-gcrypt \
--without-pcre \
${CONFIG_ARGS}

projects="algo/blast/ app/ objmgr/ objtools/align_format/ objtools/blast/"
cd ReleaseMT
cd Release

# The "datatool" binary needs the libs at build time, create
# link from final install path to lib build dir:
ln -s ${SRC_DIR}/c++/ReleaseMT/lib ${LIB_INSTALL_DIR}
ln -s ${SRC_DIR}/c++/Release/lib ${LIB_INSTALL_DIR}

cd build
make -j1 -f Makefile.flat all_projects="${projects}"
make -j"${CPU_COUNT}" -f Makefile.flat all_projects="${projects}"

# remove temporary link
rm ${LIB_INSTALL_DIR}

mkdir -p ${PREFIX}/bin ${LIB_INSTALL_DIR}
chmod +x ${SRC_DIR}/c++/ReleaseMT/bin/*
cp ${SRC_DIR}/c++/ReleaseMT/bin/* ${PREFIX}/bin/
cp ${SRC_DIR}/c++/ReleaseMT/lib/* ${LIB_INSTALL_DIR}
chmod +x ${SRC_DIR}/c++/Release/bin/*
cp ${SRC_DIR}/c++/Release/bin/* ${PREFIX}/bin/
cp ${SRC_DIR}/c++/Release/lib/* ${LIB_INSTALL_DIR}

sed -i.bak '1 s|^.*$|#!/usr/bin/env perl|g' ${PREFIX}/bin/update_blastdb.pl
# Patches to enable this script to work better in bioconda
Expand Down
12 changes: 8 additions & 4 deletions recipes/rmblast/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ source:
- phonehome.patch

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

Expand All @@ -33,10 +33,11 @@ requirements:
- pcre
- curl
- time
- ncbi-vdb
- sqlite =3
run:
- zlib
- bzip2
- entrez-direct
- ncbi-vdb
- perl
- perl-list-moreutils
- perl-archive-tar
Expand Down Expand Up @@ -73,12 +74,15 @@ test:
- update_blastdb.pl --help

about:
home: https://www.repeatmasker.org/rmblast/
home: https://www.repeatmasker.org/rmblast
license: OSL-2.1
summary: RMBlast is a RepeatMasker compatible version of the standard NCBI BLAST+ suite.
doc_url: https://www.repeatmasker.org/rmblast

extra:
identifiers:
- biotools:rmblast
recipe-maintainers:
- mencian
additional-platforms:
- linux-aarch64

0 comments on commit c7cd165

Please sign in to comment.