diff --git a/biology/star/Makefile b/biology/star/Makefile index 6172318b1e7d..968caa762551 100644 --- a/biology/star/Makefile +++ b/biology/star/Makefile @@ -1,56 +1,51 @@ PORTNAME= STAR DISTVERSION= 2.7.11a +PORTREVISION= 1 CATEGORIES= biology PKGNAMEPREFIX= rna- MAINTAINER= jwb@FreeBSD.org COMMENT= Spliced Transcripts Alignment to a Reference WWW= https://github.com/alexdobin/STAR LICENSE= GPLv3 LICENSE_FILE= ${WRKDIR}/STAR-${DISTVERSION}/LICENSE NOT_FOR_ARCHS= armv6 armv7 i386 mips powerpc powerpcspe NOT_FOR_ARCHS_REASON= Requires 64-bit processor .if !exists(/usr/include/omp.h) BROKEN= requires OpenMP support that is missing on this architecture .endif BUILD_DEPENDS= xxd:sysutils/xxd LIB_DEPENDS= libhts.so:biology/htslib USES= compiler:c++11-lang gmake localbase:ldflags # FIXME: When built with clang, number of input reads = 0 USE_GCC= yes USE_GITHUB= yes GH_ACCOUNT= alexdobin WRKSRC_SUBDIR= source -MAKE_FLAGS= HTSLIB='' +MAKE_FLAGS= HTSLIB='' CXXFLAGS_SIMD="" PLIST_FILES= bin/STAR post-patch: ${RM} -rf ${WRKSRC}/htslib ${REINPLACE_CMD} \ -e 's|"htslib/htslib/sam.h"||g' \ -e 's|"htslib/htslib/kstring.h"||g' \ -e 's|"htslib/htslib/bgzf.h"||g' \ ${WRKSRC}/BAMfunctions.cpp \ ${WRKSRC}/IncludeDefine.h \ ${WRKSRC}/STAR.cpp \ ${WRKSRC}/bamRemoveDuplicates.cpp \ ${WRKSRC}/bam_cat.c \ ${WRKSRC}/bam_cat.h \ ${WRKSRC}/signalFromBAM.h -.include - -.if ${ARCH} != amd64 -MAKE_FLAGS+= CXXFLAGS_SIMD="" -.endif - do-install: ${INSTALL_PROGRAM} ${WRKSRC}/STAR ${STAGEDIR}${PREFIX}/bin .include diff --git a/biology/star/files/patch-Makefile b/biology/star/files/patch-Makefile index c9943e2e73bc..55d592e70c2f 100644 --- a/biology/star/files/patch-Makefile +++ b/biology/star/files/patch-Makefile @@ -1,60 +1,62 @@ ---- Makefile.orig 2022-11-01 14:50:35 UTC +--- Makefile.orig 2023-08-15 19:21:58 UTC +++ Makefile -@@ -11,6 +11,10 @@ CXXFLAGSextra ?= +@@ -11,14 +11,19 @@ CXXFLAGSextra ?= # user may define the compiler CXX ?= g++ +# user may set to '' and sed "htslib/htslib/*.h" to +# if they don't want the bundled htslib +HTSLIB ?= htslib + # pre-defined flags - LDFLAGS_shared := -pthread -Lhtslib -Bstatic -lhts -Bdynamic -lz - LDFLAGS_static := -static -static-libgcc -pthread -Lhtslib -lhts -lz -@@ -18,7 +22,8 @@ LDFLAGS_Mac :=-pthread -lz htslib/libhts.a +-LDFLAGS_shared := -pthread -Lhtslib -Bstatic -lhts -Bdynamic -lz +-LDFLAGS_static := -static -static-libgcc -pthread -Lhtslib -lhts -lz ++LDFLAGS_shared := -pthread -lhts -lz ++LDFLAGS_static := -static -pthread -lhts -lz + LDFLAGS_Mac :=-pthread -lz htslib/libhts.a LDFLAGS_Mac_static :=-pthread -lz -static-libgcc htslib/libhts.a LDFLAGS_gdb := $(LDFLAGS_shared) -DATE_FMT = --iso-8601=seconds +# --iso-8601 is not portable +DATE_FMT = -Iseconds ifdef SOURCE_DATE_EPOCH BUILD_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u "$(DATE_FMT)") else @@ -41,12 +46,12 @@ GIT_BRANCH_COMMIT_DIFF := -D'GIT_BRANCH_COMMIT_DIFF="$ # Defaults, can be overridden by make arguments or environment CXXFLAGS ?= -pipe -Wall -Wextra -CFLAGS ?= -pipe -Wall -Wextra -O3 +CFLAGS ?= -pipe -Wall -Wextra CXXFLAGS_SIMD ?= -mavx2 # Unconditionally set essential flags and optimization options CXXFLAGS_common := -std=c++11 -fopenmp $(COMPTIMEPLACE) $(GIT_BRANCH_COMMIT_DIFF) -CXXFLAGS_main := -O3 $(CXXFLAGS_common) +CXXFLAGS_main := $(CXXFLAGS_common) CXXFLAGS_gdb := -O0 -g3 $(CXXFLAGS_common) ########################################################################################################## @@ -114,7 +119,7 @@ clean: .PHONY: CLEAN CLEAN: clean - $(MAKE) -C htslib clean + $(MAKE) -C $(HTSLIB) clean .PHONY: clean_solo @@ -131,10 +136,10 @@ ifneq ($(MAKECMDGOALS),CLEAN) ifneq ($(MAKECMDGOALS),clean_solo) ifneq ($(MAKECMDGOALS),STARforMac) ifneq ($(MAKECMDGOALS),STARforMacGDB) -Depend.list: $(SOURCES) parametersDefault.xxd htslib +Depend.list: $(SOURCES) parametersDefault.xxd $(HTSLIB) echo $(SOURCES) 'rm' -f ./Depend.list - $(CXX) $(CXXFLAGS_common) -MM $^ >> Depend.list + $(CXX) $(CXXFLAGS) $(CXXFLAGS_common) -MM $^ >> Depend.list include Depend.list endif endif