git: 89f62deb8a91 - main - biology/fastani: New port: Fast Whole-Genome Similarity (ANI) Estimation

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sat, 21 Sep 2024 03:03:36 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=89f62deb8a91f3b5b4aebf2d655e70e4ae130680

commit 89f62deb8a91f3b5b4aebf2d655e70e4ae130680
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-09-21 00:09:52 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-09-21 03:03:29 +0000

    biology/fastani: New port: Fast Whole-Genome Similarity (ANI) Estimation
---
 biology/Makefile                                   |  1 +
 biology/fastani/Makefile                           | 27 ++++++++++++++++++++++
 biology/fastani/distinfo                           |  5 ++++
 biology/fastani/files/patch-CMakeLists.txt         | 12 ++++++++++
 .../files/patch-src_cgi_core__genome__identity.cpp | 11 +++++++++
 biology/fastani/pkg-descr                          |  4 ++++
 6 files changed, 60 insertions(+)

diff --git a/biology/Makefile b/biology/Makefile
index 0c097ae77b3b..a99bb2d85c12 100644
--- a/biology/Makefile
+++ b/biology/Makefile
@@ -54,6 +54,7 @@
     SUBDIR += fasta
     SUBDIR += fasta3
     SUBDIR += fastahack
+    SUBDIR += fastani
     SUBDIR += fastdnaml
     SUBDIR += fastool
     SUBDIR += fastp
diff --git a/biology/fastani/Makefile b/biology/fastani/Makefile
new file mode 100644
index 000000000000..5608f01a847f
--- /dev/null
+++ b/biology/fastani/Makefile
@@ -0,0 +1,27 @@
+PORTNAME=	fastani
+DISTVERSIONPREFIX=	v
+DISTVERSION=	1.34
+CATEGORIES=	biology
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Fast Whole-Genome Similarity (ANI) Estimation
+WWW=		https://github.com/shenwei356/unikmer/
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+LIB_DEPENDS=	libgsl.so:math/gsl
+
+USES=		cmake:testing
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	ParBLiSS
+GH_PROJECT=	FastANI
+GH_TUPLE=	catchorg:Catch2:359542d:catch/ext/Catch2
+
+CMAKE_OFF=	BUILD_TESTING
+CMAKE_TESTING_ON=	BUILD_TESTING # 6 tests fail, see https://github.com/ParBLiSS/FastANI/issues/138
+
+PLIST_FILES=	bin/fastANI
+
+.include <bsd.port.mk>
diff --git a/biology/fastani/distinfo b/biology/fastani/distinfo
new file mode 100644
index 000000000000..d53b31741aa9
--- /dev/null
+++ b/biology/fastani/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1726871246
+SHA256 (ParBLiSS-FastANI-v1.34_GH0.tar.gz) = dc185cf29b9fa40cdcc2c83bb48150db46835e49b9b64a3dbff8bc4d0f631cb1
+SIZE (ParBLiSS-FastANI-v1.34_GH0.tar.gz) = 3899028
+SHA256 (catchorg-Catch2-359542d_GH0.tar.gz) = 607bf5322291859a136b2580151f41897335e91c51fe0c4dd3950093ff96244b
+SIZE (catchorg-Catch2-359542d_GH0.tar.gz) = 1031988
diff --git a/biology/fastani/files/patch-CMakeLists.txt b/biology/fastani/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..037ee9938029
--- /dev/null
+++ b/biology/fastani/files/patch-CMakeLists.txt
@@ -0,0 +1,12 @@
+--- CMakeLists.txt.orig	2023-07-28 20:41:45 UTC
++++ CMakeLists.txt
+@@ -68,7 +68,8 @@ if(${BUILD_TESTING})
+                           Catch2::Catch2 Catch2::Catch2WithMain
+                           ZLIB::ZLIB GSL::gsl GSL::gslcblas
+                           ${OpenMP_CXX_LIBRARIES}
+-                          gcov)
++			  --coverage -g -O0 -fprofile-arcs -ftest-coverage
++                          )
+     catch_discover_tests(fastANITest)
+     file(COPY tests/data DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+     add_custom_target(lcov lcov -c -d .. -o fastANITest.out
diff --git a/biology/fastani/files/patch-src_cgi_core__genome__identity.cpp b/biology/fastani/files/patch-src_cgi_core__genome__identity.cpp
new file mode 100644
index 000000000000..050a0942eb2d
--- /dev/null
+++ b/biology/fastani/files/patch-src_cgi_core__genome__identity.cpp
@@ -0,0 +1,11 @@
+--- src/cgi/core_genome_identity.cpp.orig	2024-09-20 22:30:43 UTC
++++ src/cgi/core_genome_identity.cpp
+@@ -10,6 +10,8 @@
+ #include <functional>
+ #include <omp.h>
+ 
++#include <unistd.h>
++
+ //Own includes
+ #include "map/include/map_parameters.hpp"
+ #include "map/include/base_types.hpp"
diff --git a/biology/fastani/pkg-descr b/biology/fastani/pkg-descr
new file mode 100644
index 000000000000..78c6e5dbbf54
--- /dev/null
+++ b/biology/fastani/pkg-descr
@@ -0,0 +1,4 @@
+FastANI is developed for fast alignment-free computation of whole-genome Average
+Nucleotide Identity (ANI). ANI is defined as mean nucleotide identity of
+orthologous gene pairs shared between two microbial genomes. FastANI supports
+pairwise comparison of both complete and draft genome assemblies.