From 3a2ec6d49129f2abf1b9d9ef1341e75d0fd93ced Mon Sep 17 00:00:00 2001 From: Joseph Mingrone Date: Wed, 2 Sep 2020 17:47:10 +0000 Subject: [PATCH] biology/hyphy: Update to version 2.5.18 and add AVX option The AVX option is off by default, because hyphy will crash on systems without advanced vector extensions support. --- biology/hyphy/Makefile | 9 ++++++--- biology/hyphy/distinfo | 6 +++--- biology/hyphy/files/patch-src_core_matrix.cpp | 20 +++++++++++++++++++ 3 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 biology/hyphy/files/patch-src_core_matrix.cpp diff --git a/biology/hyphy/Makefile b/biology/hyphy/Makefile index 765db4f9d320..d3012cadf8ea 100644 --- a/biology/hyphy/Makefile +++ b/biology/hyphy/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= hyphy -DISTVERSION= 2.5.17 +DISTVERSION= 2.5.18 CATEGORIES= biology MAINTAINER= jrm@FreeBSD.org @@ -14,10 +14,13 @@ ONLY_FOR_ARCHS= amd64 i386 LIB_DEPENDS= libcurl.so:ftp/curl -USES= compiler:openmp cmake localbase:ldflags ssl +USES= cmake compiler:openmp localbase:ldflags ssl USE_GITHUB= yes GH_ACCOUNT= veg -CMAKE_ON= NOAVX +OPTIONS_DEFINE= AVX +AVX_DESC= Advanced vector extensions support + +AVX_CMAKE_OFF= -DNOAVX:BOOL=ON .include diff --git a/biology/hyphy/distinfo b/biology/hyphy/distinfo index 5fc8613b7ad6..265b1a64a3f8 100644 --- a/biology/hyphy/distinfo +++ b/biology/hyphy/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1597935241 -SHA256 (veg-hyphy-2.5.17_GH0.tar.gz) = 8511a7beff1dfb5d274d1335c3fa20071f2f8262ada88ad30fae562d8b0f3e12 -SIZE (veg-hyphy-2.5.17_GH0.tar.gz) = 5244231 +TIMESTAMP = 1599060037 +SHA256 (veg-hyphy-2.5.18_GH0.tar.gz) = 8eb978eb55d659fccb7e6a29b5ff8a87425f3317d5237c3b706ea918d4d5cf82 +SIZE (veg-hyphy-2.5.18_GH0.tar.gz) = 5250528 diff --git a/biology/hyphy/files/patch-src_core_matrix.cpp b/biology/hyphy/files/patch-src_core_matrix.cpp new file mode 100644 index 000000000000..830b162b458b --- /dev/null +++ b/biology/hyphy/files/patch-src_core_matrix.cpp @@ -0,0 +1,20 @@ +--- src/core/matrix.cpp.orig 2020-09-02 16:12:43 UTC ++++ src/core/matrix.cpp +@@ -3128,8 +3128,6 @@ void _Matrix::AddMatrix (_Matrix& storage, _Matrix + CELL_OP (idx+8); + CELL_OP (idx+12); + } +- } +- + #else + for (long idx = 0; idx < upto; idx+=4) { + stData[idx]+=argData[idx]; +@@ -3138,7 +3136,7 @@ void _Matrix::AddMatrix (_Matrix& storage, _Matrix + stData[idx+3]+=argData[idx+3]; + } + #endif +- ++ } + if (subtract) + for (long idx = upto; idx < secondArg.lDim; idx++) { + stData[idx]-=argData[idx];