From 559e3d805836e9bd0234971e9c2e5c98e5adb6d5 Mon Sep 17 00:00:00 2001 From: Martin Tzvetanov Grigorov Date: Mon, 21 Oct 2024 10:04:15 +0300 Subject: [PATCH 1/2] centrifuge-core: add linux-aarch64 build Signed-off-by: Martin Tzvetanov Grigorov --- recipes/centrifuge-core/build.sh | 5 ++++- recipes/centrifuge-core/meta.yaml | 12 +++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/recipes/centrifuge-core/build.sh b/recipes/centrifuge-core/build.sh index 78918ac22ed5a..0a82cdd89c045 100644 --- a/recipes/centrifuge-core/build.sh +++ b/recipes/centrifuge-core/build.sh @@ -1,4 +1,7 @@ #!/bin/bash + +set -xe + export LDFLAGS="-L$PREFIX/lib" export CPATH=${PREFIX}/include @@ -7,6 +10,6 @@ mkdir -p $PREFIX/bin sed "/^GCC/d;/^CC =/d;/^CPP =/d;/^CXX =/d" < Makefile > Makefile.new mv Makefile.new Makefile cat Makefile -make CC=$CC CXX=$CXX RELEASE_FLAGS="$CXXFLAGS" +make -j"${CPU_COUNT}" CC=$CC CXX=$CXX RELEASE_FLAGS="$CXXFLAGS" make install prefix=$PREFIX diff --git a/recipes/centrifuge-core/meta.yaml b/recipes/centrifuge-core/meta.yaml index 3b6adc563f0be..b9347c7e85535 100644 --- a/recipes/centrifuge-core/meta.yaml +++ b/recipes/centrifuge-core/meta.yaml @@ -6,7 +6,7 @@ package: version: {{ version }} build: - number: 0 + number: 1 skip: true # [osx] run_exports: - {{ pin_subpackage("centrifuge-core", max_pin="x.x") }} @@ -34,11 +34,17 @@ test: - centrifuge --help about: - home: https://github.com/DaehwanKimLab/centrifuge - license: GPL3 + home: http://www.ccb.jhu.edu/software/centrifuge + license: GPL-3.0-only + license_file: LICENSE + license_family: GPL3 summary: 'Classifier for metagenomic sequences. Does not include evaluation scripts' + dev_url: https://github.com/DaehwanKimLab/centrifuge + doc_url: https://genome.cshlp.org/content/26/12/1721 extra: + additional-platforms: + - linux-aarch64 identifiers: - biotools:Centrifuge - doi:10.1101/gr.210641.116 From de109eae272df8f0029ab63448beb9ef820fd8a0 Mon Sep 17 00:00:00 2001 From: Martin Tzvetanov Grigorov Date: Mon, 21 Oct 2024 10:45:25 +0300 Subject: [PATCH 2/2] Use specific compiler flags for ARM64 Signed-off-by: Martin Tzvetanov Grigorov --- recipes/centrifuge-core/build.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/recipes/centrifuge-core/build.sh b/recipes/centrifuge-core/build.sh index 0a82cdd89c045..e589cb971645c 100644 --- a/recipes/centrifuge-core/build.sh +++ b/recipes/centrifuge-core/build.sh @@ -7,9 +7,18 @@ export CPATH=${PREFIX}/include mkdir -p $PREFIX/bin +case $(uname -m) in + aarch64 | arm64) + ARCH_FLAGS=(POPCNT_CAPABILITY=0 "RELEASE_FLAGS=${CXXFLAGS} -fsigned-char") + ;; + *) + ARCH_FLAGS=("RELEASE_FLAGS=${CXXFLAGS}") + ;; +esac + sed "/^GCC/d;/^CC =/d;/^CPP =/d;/^CXX =/d" < Makefile > Makefile.new mv Makefile.new Makefile cat Makefile -make -j"${CPU_COUNT}" CC=$CC CXX=$CXX RELEASE_FLAGS="$CXXFLAGS" +make -j"${CPU_COUNT}" CC=$CC CXX=$CXX "${ARCH_FLAGS[@]}" make install prefix=$PREFIX