Skip to content

Commit

Permalink
cd-hit: add osx-arm64 build (bioconda#52061)
Browse files Browse the repository at this point in the history
  • Loading branch information
mencian authored Nov 12, 2024
1 parent 6d9b57e commit dd0d3fa
Show file tree
Hide file tree
Showing 3 changed files with 1,123 additions and 18 deletions.
20 changes: 11 additions & 9 deletions recipes/cd-hit/build.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
#!/bin/sh
#!/bin/bash

export CFLAGS="-I$PREFIX/include"
export CPPFLAGS="-I$PREFIX/include"
export CXXFLAGS="-I$PREFIX/include"
export LDFLAGS="-L$PREFIX/lib"
mkdir -p $PREFIX/bin

export CFLAGS="${CFLAGS} -O3"
export CPPFLAGS="${CPPFLAGS} -I$PREFIX/include"
export CXXFLAGS="${CXXFLAGS} -O3 -I$PREFIX/include"
export LDFLAGS="${LDFLAGS} -L$PREFIX/lib"
export CPATH=${PREFIX}/include

sed -i.bak 's/^CC =$//g' Makefile
sed -i.bak 's/^#LDFLAGS.*//g' Makefile

rm -rf *.bak

if [[ "$OSTYPE" == "darwin"* ]]; then
#Lines below is commented out until fix provided for OPENMP support on OS X for this program

CCFLAGS="$CCFLAGS -Wl,-rpath ${PREFIX}/lib -L${PREFIX}/lib -I${PREFIX}/include -fopenmp"
sed -i.bak 's/CCFLAGS = -fopenmp/CCFLAGS += -fopenmp/g' Makefile
rm -rf *.bak
LDFLAGS="$LDFLAGS -stdlib=libc++"

make CC=$CXX openmp=no MAX_SEQ=1000000
else
make CC=$GXX MAX_SEQ=1000000
fi

mkdir -p $PREFIX/bin
make install PREFIX=$PREFIX/bin

make install PREFIX="$PREFIX/bin"
Loading

0 comments on commit dd0d3fa

Please sign in to comment.