aboutsummaryrefslogtreecommitdiff
path: root/biology/ncbi-blast+
diff options
context:
space:
mode:
authorJason W. Bacon <jwb@FreeBSD.org>2021-01-11 17:17:35 +0000
committerJason W. Bacon <jwb@FreeBSD.org>2021-01-11 17:17:35 +0000
commitef665861634bf69e5cc2f940ce83a278cefbadc1 (patch)
treecc762b2d8120c7c0eac0e36845c45dd544c38a02 /biology/ncbi-blast+
parent426575b8293c68a714fb3116b2ee4ea47557b34d (diff)
downloadports-ef665861634bf69e5cc2f940ce83a278cefbadc1.tar.gz
ports-ef665861634bf69e5cc2f940ce83a278cefbadc1.zip
biology/ncbi-blast+: Drop dependency on gcc
Replace compiler:openmp with compiler:c++14-lang Clang build also requires localbase:ldflags and a source patch to explicitly set variables to shared GCC-based platforms still require -latomic PR: port/247753, ports/252379
Notes
Notes: svn path=/head/; revision=561233
Diffstat (limited to 'biology/ncbi-blast+')
-rw-r--r--biology/ncbi-blast+/Makefile8
-rw-r--r--biology/ncbi-blast+/files/patch-src_objtools_blast_seqdb__reader_test_seqdb__perf.cpp22
2 files changed, 26 insertions, 4 deletions
diff --git a/biology/ncbi-blast+/Makefile b/biology/ncbi-blast+/Makefile
index 4da3f9e73a4b..f9dc2ba18175 100644
--- a/biology/ncbi-blast+/Makefile
+++ b/biology/ncbi-blast+/Makefile
@@ -2,6 +2,7 @@
PORTNAME= ncbi-blast+
DISTVERSION= 2.11.0
+PORTREVISION= 1
CATEGORIES= biology perl5 python
MASTER_SITES= https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/ \
https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/${PORTVERSION}/
@@ -32,7 +33,7 @@ LIB_DEPENDS= libpcre.so:devel/pcre \
RUN_DEPENDS= p5-List-MoreUtils>=0:lang/p5-List-MoreUtils \
p5-JSON>=0:converters/p5-JSON
-USES= compiler:openmp gmake shebangfix perl5 python
+USES= compiler:c++14-lang gmake localbase:ldflags shebangfix perl5 python
USE_LDCONFIG= yes
SHEBANG_FILES= src/app/blast/legacy_blast.pl \
@@ -47,15 +48,14 @@ GNU_CONFIGURE= yes
# --libdir=${PREFIX}/lib/ncbi-tools++ doesn't respect DESTDIR, so do
# a postinstall mv.
CONFIGURE_ARGS= AR="ar cr" --without-boost --libdir=${PREFIX}/lib/ncbi-tools++
-LDFLAGS+= -latomic
WRKSRC_SUBDIR= c++
.include <bsd.port.pre.mk>
-# Force newer GCC on platforms using GCC 4.2 as base
.if ${CHOSEN_COMPILER_TYPE} == gcc
-USE_GCC= yes
+# In case of problems: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=220822
+LDFLAGS+= -latomic # Only exists in gcc libs
.endif
post-install:
diff --git a/biology/ncbi-blast+/files/patch-src_objtools_blast_seqdb__reader_test_seqdb__perf.cpp b/biology/ncbi-blast+/files/patch-src_objtools_blast_seqdb__reader_test_seqdb__perf.cpp
new file mode 100644
index 000000000000..f15e73c87671
--- /dev/null
+++ b/biology/ncbi-blast+/files/patch-src_objtools_blast_seqdb__reader_test_seqdb__perf.cpp
@@ -0,0 +1,22 @@
+--- src/objtools/blast/seqdb_reader/test/seqdb_perf.cpp.orig 2021-01-10 02:28:53 UTC
++++ src/objtools/blast/seqdb_reader/test/seqdb_perf.cpp
+@@ -137,7 +137,8 @@ CSeqDBPerfApp::x_ScanDatabase()
+ }
+ LOG_POST(Info << "Will go over " << oids2iterate.size() << " sequences");
+
+-#if defined(NCBI_COMPILER_GCC) && (NCBI_COMPILER_VERSION >= 900)
++#if defined(NCBI_COMPILER_GCC) && (NCBI_COMPILER_VERSION >= 900) || \
++ defined(NCBI_COMPILER_LLVM_CLANG)
+ #pragma omp parallel default(none) num_threads(m_DbHandles.size()) \
+ shared(oids2iterate,kScanUncompressed) if(m_DbHandles.size() > 1)
+ #else
+@@ -208,7 +209,8 @@ CSeqDBPerfApp::x_InitApplicationData()
+
+
+ if (args["multi_threaded_creation"]) {
+-#if defined(NCBI_COMPILER_GCC) && (NCBI_COMPILER_VERSION >= 900)
++#if defined(NCBI_COMPILER_GCC) && (NCBI_COMPILER_VERSION >= 900) || \
++ defined(NCBI_COMPILER_LLVM_CLANG)
+ #pragma omp parallel default(none) shared(kDbName, kNumThreads, kSeqType) num_threads(kNumThreads)
+ #else
+ #pragma omp parallel default(none) shared(kDbName, kNumThreads) num_threads(kNumThreads)