summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-03-07 17:22:22 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2021-03-07 19:53:19 +0100
commit78fa7b612b071489cb9c259d639f61ab654b9c78 (patch)
tree7c1deeac88033f1880a736e85ec75747170e0db3 /sci-biology
parentdev-lang/luajit: mark current versions -hppa/-sparc (diff)
downloadgentoo-78fa7b612b071489cb9c259d639f61ab654b9c78.tar.gz
gentoo-78fa7b612b071489cb9c259d639f61ab654b9c78.tar.bz2
gentoo-78fa7b612b071489cb9c259d639f61ab654b9c78.zip
sci-biology/fasttree: 2.1.11 version bump, EAPI-7, cmake.eclass
Closes: https://bugs.gentoo.org/594364 Package-Manager: Portage-3.0.16, Repoman-3.0.2 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'sci-biology')
-rw-r--r--sci-biology/fasttree/Manifest3
-rw-r--r--sci-biology/fasttree/fasttree-2.1.11.ebuild43
-rw-r--r--sci-biology/fasttree/files/CMakeLists.txt25
-rw-r--r--sci-biology/fasttree/files/fasttree-2.1.11-format-security.patch25
4 files changed, 84 insertions, 12 deletions
diff --git a/sci-biology/fasttree/Manifest b/sci-biology/fasttree/Manifest
index 1aedce930c6c..5874bb6347a0 100644
--- a/sci-biology/fasttree/Manifest
+++ b/sci-biology/fasttree/Manifest
@@ -1,3 +1,6 @@
+DIST FastTree-2.1.11.c 395543 BLAKE2B 5bea3fba66ddf077ce42c3e1791505a9fa909bb619e30e0c0370631996d932c63ca172fffc1721ac9f081a16bed3b1c99a9c7f6e4a3bb269b82545e2978904d3 SHA512 2bbb1cc078b04125a55b8c02f65c9fbfb6db894c2fbfdaac8f86cc0084f2579723cdc4f6aa63bf4338b767d0fdaffa8dd503e4126c3f5f700d4f3da9fc085ee5
DIST FastTree-2.1.8.c 385231 BLAKE2B 6f42025ef69b990e051263ccfa23f95d0cde326798c54d8f702c50127338711898c380d1dbd82ab775667eada047048ba8d68288b030af4984019a5f2c23729f SHA512 39a7d284412a602208c2a5df3d0a9a30fe3a584f7f7788d741fb1463b698692017f47bb23f70046d0873e9c8fd27c84ec23f6ca48adb0594193765ac732e6559
+DIST FastTreeUPGMA-2.1.11.c 95271 BLAKE2B 1de328881f6452b9c7423c9ed381ab2eb31c4f3ee6426481a6b1089c1359627d4cbbfbea868ebeab9538f82e17f45f1bff8ec07c7370e6432bef6bae449798a8 SHA512 4d6a8e2cb28b8ee201091172a3baa59d432420839c6d2244b5fb8230ed9daa626b6bed22cb692393ca3d78b8f2d071fe18fbb4f9bdcdc47ef149c31e3f45546c
DIST FastTreeUPGMA-2.1.8.c 95271 BLAKE2B 1de328881f6452b9c7423c9ed381ab2eb31c4f3ee6426481a6b1089c1359627d4cbbfbea868ebeab9538f82e17f45f1bff8ec07c7370e6432bef6bae449798a8 SHA512 4d6a8e2cb28b8ee201091172a3baa59d432420839c6d2244b5fb8230ed9daa626b6bed22cb692393ca3d78b8f2d071fe18fbb4f9bdcdc47ef149c31e3f45546c
+DIST MOTreeComparison-2.1.11.tar.gz 13523 BLAKE2B 97638edd945412ff00e3dfcfc89ec6ea52ae8c43531d5cb680d97e9c62fcad80e861f58ec987abcd2282166dd7886101edba4875531bd9d6ac23df242e0dbd5b SHA512 24d2247650d7728942bd1d987b548cefd65a16b433a3810876613e9fd1cff223d4349ee720b3d8d10a73af220c2c9f59a24d77ad34ff009325fe9f22aa35c72b
DIST MOTreeComparison-2.1.8.tar.gz 13523 BLAKE2B 97638edd945412ff00e3dfcfc89ec6ea52ae8c43531d5cb680d97e9c62fcad80e861f58ec987abcd2282166dd7886101edba4875531bd9d6ac23df242e0dbd5b SHA512 24d2247650d7728942bd1d987b548cefd65a16b433a3810876613e9fd1cff223d4349ee720b3d8d10a73af220c2c9f59a24d77ad34ff009325fe9f22aa35c72b
diff --git a/sci-biology/fasttree/fasttree-2.1.11.ebuild b/sci-biology/fasttree/fasttree-2.1.11.ebuild
new file mode 100644
index 000000000000..cb2d16791ee3
--- /dev/null
+++ b/sci-biology/fasttree/fasttree-2.1.11.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="Fast inference of approximately-maximum-likelihood phylogenetic trees"
+HOMEPAGE="http://www.microbesonline.org/fasttree/"
+SRC_URI="
+ http://www.microbesonline.org/fasttree/FastTree-${PV}.c
+ http://www.microbesonline.org/fasttree/FastTreeUPGMA.c -> FastTreeUPGMA-${PV}.c
+ http://www.microbesonline.org/fasttree/MOTreeComparison.tar.gz -> MOTreeComparison-${PV}.tar.gz
+"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="double-precision openmp cpu_flags_x86_sse3"
+
+REQUIRED_USE="?? ( double-precision cpu_flags_x86_sse3 )"
+
+DOCS=( README )
+
+PATCHES=( "${FILESDIR}"/${P}-format-security.patch )
+
+src_unpack() {
+ mkdir "${S}" || die
+ cd "${S}" || die
+ unpack ${A}
+ cp "${DISTDIR}"/{FastTreeUPGMA-${PV}.c,FastTree-${PV}.c} . || die
+ cp "${FILESDIR}"/CMakeLists.txt . || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DVERSION="${PV}"
+ -DHAS_SSE3=$(usex cpu_flags_x86_sse3)
+ -DUSE_OPENMP=$(usex openmp)
+ -DUSE_DOUBLE=$(usex double-precision)
+ )
+ cmake_src_configure
+}
diff --git a/sci-biology/fasttree/files/CMakeLists.txt b/sci-biology/fasttree/files/CMakeLists.txt
index e7c53afdaf36..c52b90cc7be2 100644
--- a/sci-biology/fasttree/files/CMakeLists.txt
+++ b/sci-biology/fasttree/files/CMakeLists.txt
@@ -1,23 +1,24 @@
-cmake_minimum_required (VERSION 2.6)
+cmake_minimum_required (VERSION 2.8.12)
project(fasttree C)
+include(GNUInstallDirs)
+
option(USE_OPENMP "Use OpenMP to parallelize many of the steps in computing a tree" ON)
-option(USE_DOUBLE "Use double precission" OFF)
+option(USE_DOUBLE "Use double precision" OFF)
option(HAS_SSE3 "Use SSE2/SSE3 instructions to speed up some inner loops" ON)
if(USE_OPENMP)
- SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOPENMP -fopenmp" )
- SET( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -DOPENMP -fopenmp" )
-endif(USE_OPENMP)
+ set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOPENMP -fopenmp" )
+ set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -DOPENMP -fopenmp" )
+endif()
if(USE_DOUBLE)
- SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_DOUBLE" )
-endif(USE_DOUBLE)
+ set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_DOUBLE" )
+endif()
if(NOT HAS_SSE3)
- SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNO_SSE" )
-endif(NOT HAS_SSE3)
-
+ set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNO_SSE" )
+endif()
add_executable(FastTree FastTree-${VERSION}.c)
add_executable(FastTreeUPGMA FastTreeUPGMA-${VERSION}.c)
@@ -25,6 +26,6 @@ add_executable(FastTreeUPGMA FastTreeUPGMA-${VERSION}.c)
target_link_libraries(FastTree m)
target_link_libraries(FastTreeUPGMA m)
-install (TARGETS FastTree FastTreeUPGMA DESTINATION bin)
+install (TARGETS FastTree FastTreeUPGMA DESTINATION ${CMAKE_INSTALL_BINDIR})
-install(FILES MOTree.pm CompareTree.pl CompareToBootstrap.pl DESTINATION share/fasttree)
+install(FILES MOTree.pm CompareTree.pl CompareToBootstrap.pl DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/fasttree)
diff --git a/sci-biology/fasttree/files/fasttree-2.1.11-format-security.patch b/sci-biology/fasttree/files/fasttree-2.1.11-format-security.patch
new file mode 100644
index 000000000000..45023e4215f6
--- /dev/null
+++ b/sci-biology/fasttree/files/fasttree-2.1.11-format-security.patch
@@ -0,0 +1,25 @@
+ FastTreeUPGMA-2.1.11.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/FastTreeUPGMA-2.1.11.c b/FastTreeUPGMA-2.1.11.c
+index af76cb1..4065f42 100644
+--- a/FastTreeUPGMA-2.1.11.c
++++ b/FastTreeUPGMA-2.1.11.c
+@@ -535,7 +535,7 @@ int main(int argc, char **argv) {
+ break;
+ }
+ if(iArg < argc-1) {
+- fprintf(stderr, usage);
++ fprintf(stderr, "%s", usage);
+ exit(1);
+ }
+
+@@ -953,7 +953,7 @@ void PrintUPGMA(FILE *fp, UPGMA_t *UPGMA, char **names,
+ assert(first >= 0);
+ /* Print the name, or the subtree of duplicate names */
+ if (nameNext[first] == -1) {
+- fprintf(fp, names[uniqueFirst[node]]);
++ fprintf(fp, "%s", names[uniqueFirst[node]]);
+ } else {
+ fprintf(fp,"(%s:0.0",names[first]);
+ int iName = nameNext[first];