diff --git a/recipes/subread/0001-macOS-Makefile.patch b/recipes/subread/0001-macOS-Makefile.patch new file mode 100644 index 0000000000000..40b6903b595e8 --- /dev/null +++ b/recipes/subread/0001-macOS-Makefile.patch @@ -0,0 +1,13 @@ +diff --git a/src/Makefile.MacOS b/src/Makefile.MacOS +index 7620450..7b9f74d 100644 +--- a/src/Makefile.MacOS ++++ b/src/Makefile.MacOS +@@ -3,7 +3,7 @@ include makefile.version + + CCFLAGS = ${MACOS} -O9 -w -DMAKE_FOR_EXON -D MAKE_STANDALONE -D SUBREAD_VERSION=\"${SUBREAD_VERSION}\" -D_FILE_OFFSET_BITS=64 ${WARNING_LEVEL} + LDFLAGS = -pthread -lz -lm ${MACOS} -DMAKE_FOR_EXON -D MAKE_STANDALONE # -DREPORT_ALL_THE_BEST +-CC = gcc ${CCFLAGS} ${STATIC_MAKE} -ggdb -fomit-frame-pointer -O3 -ffast-math -funroll-loops -mmmx -msse -msse2 -msse3 -fmessage-length=0 ++CC = $(C) ${CCFLAGS} ${STATIC_MAKE} -ggdb -fomit-frame-pointer -O3 -ffast-math -funroll-loops -fmessage-length=0 + + + ALL_LIBS= core core-junction core-indel sambam-file sublog gene-algorithms hashtable input-files sorted-hashtable gene-value-index exon-algorithms HelperFunctions interval_merge core-bigtable seek-zlib input-blc diff --git a/recipes/subread/0002-longread-Makefile.patch b/recipes/subread/0002-longread-Makefile.patch new file mode 100644 index 0000000000000..91e35ecb9dfee --- /dev/null +++ b/recipes/subread/0002-longread-Makefile.patch @@ -0,0 +1,10 @@ +diff --git a/src/longread-one/Makefile b/src/longread-one/Makefile +index 06ee3e6..2643584 100644 +--- a/src/longread-one/Makefile ++++ b/src/longread-one/Makefile +@@ -1,4 +1,4 @@ +-CC_EXEC = gcc ++CC_EXEC = $(C) + OPT_LEVEL = 3 + + include ../makefile.version diff --git a/recipes/subread/0003-Linux-Makefile.patch b/recipes/subread/0003-Linux-Makefile.patch new file mode 100644 index 0000000000000..453ad272ee434 --- /dev/null +++ b/recipes/subread/0003-Linux-Makefile.patch @@ -0,0 +1,13 @@ +diff --git a/src/Makefile.Linux b/src/Makefile.Linux +index b76172c..f2ebd4b 100644 +--- a/src/Makefile.Linux ++++ b/src/Makefile.Linux +@@ -1,7 +1,7 @@ + #MACOS = -D MACOS + + +-CC_EXEC = gcc ++CC_EXEC = $(C) + OPT_LEVEL = 3 + + include makefile.version diff --git a/recipes/subread/0004-macOS-sse.patch b/recipes/subread/0004-macOS-sse.patch new file mode 100644 index 0000000000000..cd07504a0d15f --- /dev/null +++ b/recipes/subread/0004-macOS-sse.patch @@ -0,0 +1,13 @@ +diff --git a/src/Makefile.MacOS b/src/Makefile.MacOS +index 5c96c75..e33aa51 100644 +--- a/src/Makefile.MacOS ++++ b/src/Makefile.MacOS +@@ -3,7 +3,7 @@ include makefile.version + + CCFLAGS = ${MACOS} -O9 -w -DMAKE_FOR_EXON -D MAKE_STANDALONE -D SUBREAD_VERSION=\"${SUBREAD_VERSION}\" -D_FILE_OFFSET_BITS=64 ${WARNING_LEVEL} + LDFLAGS = -pthread -lz -lm ${MACOS} -DMAKE_FOR_EXON -D MAKE_STANDALONE # -DREPORT_ALL_THE_BEST +-CC = $(C) ${CCFLAGS} ${STATIC_MAKE} -ggdb -fomit-frame-pointer -O3 -ffast-math -funroll-loops -fmessage-length=0 ++CC = $(C) ${CCFLAGS} ${STATIC_MAKE} -ggdb -fomit-frame-pointer -O3 -mmmx -msse -msse2 -msse3 -ffast-math -funroll-loops -fmessage-length=0 + + + ALL_LIBS= core core-junction core-indel sambam-file sublog gene-algorithms hashtable input-files sorted-hashtable gene-value-index exon-algorithms HelperFunctions interval_merge core-bigtable seek-zlib input-blc diff --git a/recipes/subread/build.sh b/recipes/subread/build.sh index 4907a7094b1e1..a67ad1dabbcec 100644 --- a/recipes/subread/build.sh +++ b/recipes/subread/build.sh @@ -6,25 +6,36 @@ mkdir -p "${PREFIX}/bin" mkdir -p "${PREFIX}/annotation" cd src -MAKEFILE=Makefile.Linux -if [ `uname` = "Darwin" ]; -then - MAKEFILE=Makefile.MacOS +if [[ `uname` = "Darwin" ]]; then + MAKEFILE=Makefile.MacOS +else + MAKEFILE=Makefile.Linux fi -if [ $(uname -m) == "aarch64" ]; then - sed -i.bak 's/-mtune=core2//' ${MAKEFILE} - sed -i.bak 's/-mtune=core2//' ./longread-one/Makefile +if [[ $(uname -m) == "aarch64" ]]; then + sed -i.bak 's/-mtune=core2//' ${MAKEFILE} + sed -i.bak 's/-mtune=core2//' ./longread-one/Makefile + rm -rf ./*.bak + rm -rf ./longread-one/*.bak fi -export C_INCLUDE_PATH=${PREFIX}/include -export LIBRARY_PATH=${PREFIX}/lib -make -f $MAKEFILE CC_EXEC="$CC -L$PREFIX/lib -fcommon" -j ${CPU_COUNT} +export C_INCLUDE_PATH="${PREFIX}/include" +export LIBRARY_PATH="${PREFIX}/lib" +export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib" +export C="${CC}" + +make -f $MAKEFILE CC_EXEC="$C -L$PREFIX/lib -fcommon" -j"${CPU_COUNT}" + cd .. -cp bin/utilities/* $PREFIX/bin -rm -r bin/utilities -cp bin/* $PREFIX/bin -cp annotation/* $PREFIX/annotation +install -v -m 0755 bin/utilities/flattenGTF bin/utilities/genRandomReads \ + bin/utilities/propmapped bin/utilities/qualityScores \ + bin/utilities/removeDup bin/utilities/repair \ + bin/utilities/subread-fullscan "${PREFIX}/bin" +rm -rf bin/utilities + +install -v -m 0755 bin/exactSNP bin/featureCounts bin/subindel bin/subjunc \ + bin/sublong bin/subread-align bin/subread-buildindex "${PREFIX}/bin" +cp -rf annotation/* $PREFIX/annotation # add read permissions to LICENSE -chmod a+r LICENSE \ No newline at end of file +chmod a+r LICENSE diff --git a/recipes/subread/meta.yaml b/recipes/subread/meta.yaml index 4e50d12b6bfbe..2a673e80d76a5 100644 --- a/recipes/subread/meta.yaml +++ b/recipes/subread/meta.yaml @@ -1,6 +1,6 @@ {% set name = "subread" %} -{% set version = "2.0.6" %} -{% set sha256 = "f0fdda6b98634d2946028948c220253e10a0f27c7fa5f24913b65b3ac6cbb045" %} +{% set version = "2.0.8" %} +{% set sha256 = "cb5dadf71c850f128a8347223fe0ce19e1c17e3959e9f3eba90e8090671f8570" %} package: name: {{ name|lower }} @@ -11,10 +11,15 @@ source: sha256: {{ sha256 }} patches: - unsignedchar.patch + - 0001-macOS-Makefile.patch # [osx] + - 0002-longread-Makefile.patch + - 0003-Linux-Makefile.patch # [linux] + - 0004-macOS-sse.patch # [osx and x86_64] build: - number: 2 - run_exports: '{{ pin_subpackage(name, max_pin="x") }}' + number: 0 + run_exports: + - {{ pin_subpackage(name, max_pin="x") }} requirements: build: @@ -32,20 +37,22 @@ test: - subjunc || [[ $? == 1 ]] - subindel || [[ $? = 255 ]] - repair -h - - txUnique || [[ $? == 1 ]] - qualityScores - subread-fullscan || [[ $? == 255 ]] about: - home: http://subread.sourceforge.net/ - license: GPL-3.0-only - summary: High-performance read alignment, quantification, and mutation discovery - license_file: - - LICENSE + home: "https://subread.sourceforge.net" + license: "GPL-3.0-only" + license_family: GPL3 + summary: "High-performance read alignment, quantification, and mutation discovery." + doc_url: "https://subread.sourceforge.net/SubreadUsersGuide.pdf" + dev_url: "https://sourceforge.net/projects/subread" + license_file: LICENSE extra: additional-platforms: - linux-aarch64 + - osx-arm64 identifiers: - biotools:subread - usegalaxy-eu:featurecounts