diff --git a/biology/hisat2/Makefile b/biology/hisat2/Makefile index 33d56578fcf8..f30120ce4824 100644 --- a/biology/hisat2/Makefile +++ b/biology/hisat2/Makefile @@ -1,27 +1,29 @@ PORTNAME= hisat2 DISTVERSIONPREFIX= v DISTVERSION= 2.2.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= biology perl5 python MAINTAINER= jwb@FreeBSD.org COMMENT= Alignment program for mapping next-generation sequencing reads LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE -ONLY_FOR_ARCHS= amd64 +ONLY_FOR_ARCHS= aarch64 amd64 powerpc64 powerpc64le ONLY_FOR_ARCHS_REASON= 64-bit code, some assembly language -USES= gmake perl5 python shebangfix +BUILD_DEPENDS= simde>0:devel/simde + +USES= gmake localbase perl5 python shebangfix USE_GITHUB= yes SHEBANG_FILES= hisat2 hisat2-build hisat2-inspect \ *.py */*.py */*/*.py */*/*/*.py \ scripts/*.sh evaluation/tests/HLA_novel/scripts/*.sh \ scripts/*.pl docs_jhu/*.pl GH_ACCOUNT= DaehwanKimLab -CFLAGS+= -Wno-deprecated-declarations -Wno-char-subscripts +CFLAGS+= -Wno-deprecated-declarations -Wno-char-subscripts -fsigned-char .include diff --git a/biology/hisat2/files/patch-Makefile b/biology/hisat2/files/patch-Makefile index 856bf8d629b6..b3027907ae07 100644 --- a/biology/hisat2/files/patch-Makefile +++ b/biology/hisat2/files/patch-Makefile @@ -1,71 +1,80 @@ --- Makefile.orig 2020-07-24 20:07:54 UTC +++ Makefile @@ -23,9 +23,11 @@ INC = GCC_PREFIX = $(shell dirname `which gcc`) GCC_SUFFIX = -CC = $(GCC_PREFIX)/gcc$(GCC_SUFFIX) -CPP = $(GCC_PREFIX)/g++$(GCC_SUFFIX) -CXX = $(CPP) +CC ?= $(GCC_PREFIX)/gcc$(GCC_SUFFIX) +CPP ?= $(GCC_PREFIX)/g++$(GCC_SUFFIX) +CXX ?= $(CPP) +INSTALL ?= install + HEADERS = $(wildcard *.h) BOWTIE_MM = 1 BOWTIE_SHARED_MEM = 0 +@@ -55,7 +57,7 @@ ifneq (,$(findstring Darwin,$(shell uname))) + MACOS = 1 + endif + +-EXTRA_FLAGS += -DPOPCNT_CAPABILITY -std=c++11 ++EXTRA_FLAGS += -std=c++11 + INC += -I. -I third_party + + MM_DEF = @@ -152,31 +154,9 @@ HISAT2_REPEAT_CPPS_MAIN = $(REPEAT_CPPS) $(BUILD_CPPS) SEARCH_FRAGMENTS = $(wildcard search_*_phase*.c) VERSION = $(shell cat VERSION) -# Convert BITS=?? to a -m flag -BITS=32 -ifeq (x86_64,$(shell uname -m)) -BITS=64 -endif -# msys will always be 32 bit so look at the cpu arch instead. -ifneq (,$(findstring AMD64,$(PROCESSOR_ARCHITEW6432))) - ifeq (1,$(MINGW)) - BITS=64 - endif -endif -BITS_FLAG = - -ifeq (32,$(BITS)) - BITS_FLAG = -m32 -endif - -ifeq (64,$(BITS)) - BITS_FLAG = -m64 -endif -SSE_FLAG=-msse2 - DEBUG_FLAGS = -O0 -g3 $(BITS_FLAG) $(SSE_FLAG) DEBUG_DEFS = -DCOMPILER_OPTIONS="\"$(DEBUG_FLAGS) $(EXTRA_FLAGS)\"" -RELEASE_FLAGS = -O3 $(BITS_FLAG) $(SSE_FLAG) -funroll-loops -g3 +RELEASE_FLAGS = $(CXXFLAGS) RELEASE_DEFS = -DCOMPILER_OPTIONS="\"$(RELEASE_FLAGS) $(EXTRA_FLAGS)\"" NOASSERT_FLAGS = -DNDEBUG FILE_FLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE @@ -553,6 +533,20 @@ doc/manual.inc.html: MANUAL.markdown MANUAL: MANUAL.markdown perl doc/strip_markdown.pl < $^ > $@ + +# Install per filesystem hierarchy standard: +# https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard + +.PHONY: install +install: + mkdir -p ${DESTDIR}${PREFIX}/bin + ${INSTALL} -c -s ${HISAT2_BIN_LIST} ${DESTDIR}${PREFIX}/bin + ${INSTALL} -c hisat2 hisat2-build hisat2-inspect \ + ${DESTDIR}${PREFIX}/bin + + mkdir -p ${DESTDIR}${PREFIX}/libexec/hisat2 + ${INSTALL} -c scripts/*.sh scripts/*.pl scripts/*.py *.py \ + ${DESTDIR}${PREFIX}/libexec/hisat2 .PHONY: clean clean: diff --git a/biology/hisat2/files/patch-aligner__sw.h b/biology/hisat2/files/patch-aligner__sw.h new file mode 100644 index 000000000000..24a24028ee6c --- /dev/null +++ b/biology/hisat2/files/patch-aligner__sw.h @@ -0,0 +1,17 @@ +--- aligner_sw.h.orig 2020-07-24 20:07:54 UTC ++++ aligner_sw.h +@@ -66,11 +66,13 @@ + + #define INLINE_CUPS + ++#define SIMDE_ENABLE_NATIVE_ALIASES ++ ++#include + #include + #include + #include + #include "threading.h" +-#include + #include "aligner_sw_common.h" + #include "aligner_sw_nuc.h" + #include "ds.h" diff --git a/biology/hisat2/files/patch-processor__support.h b/biology/hisat2/files/patch-processor__support.h new file mode 100644 index 000000000000..e85c19b63f84 --- /dev/null +++ b/biology/hisat2/files/patch-processor__support.h @@ -0,0 +1,21 @@ +--- processor_support.h.orig 2020-07-24 20:07:54 UTC ++++ processor_support.h +@@ -12,7 +12,7 @@ + + #if defined(__INTEL_COMPILER) + # define USING_INTEL_COMPILER +-#elif defined(__GNUC__) ++#elif defined(__GNUC__) && (defined(__amd64__) || defined(__i386__)) + # define USING_GCC_COMPILER + # include + #elif defined(_MSC_VER) +@@ -52,8 +52,7 @@ class ProcessorSupport { (public) + #elif defined(USING_GCC_COMPILER) + __get_cpuid(0x1, ®s.EAX, ®s.EBX, ®s.ECX, ®s.EDX); + #else +- std::cerr << "ERROR: please define __cpuid() for this build.\n"; +- assert(0); ++ return false; + #endif + if( !( (regs.ECX & BIT(20)) && (regs.ECX & BIT(23)) ) ) return false; + } diff --git a/biology/hisat2/files/patch-sse__util.h b/biology/hisat2/files/patch-sse__util.h new file mode 100644 index 000000000000..0241493cad77 --- /dev/null +++ b/biology/hisat2/files/patch-sse__util.h @@ -0,0 +1,17 @@ +--- sse_util.h.orig 2021-11-27 23:25:39 UTC ++++ sse_util.h +@@ -20,11 +20,13 @@ + #ifndef SSE_UTIL_H_ + #define SSE_UTIL_H_ + ++#define SIMDE_ENABLE_NATIVE_ALIASES ++#include ++ + #include "assert_helpers.h" + #include "ds.h" + #include "limit.h" + #include +-#include + + class EList_m128i { + public: