public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-biology/mothur/, sci-biology/mothur/files/
@ 2024-03-22  8:43 Sam James
  0 siblings, 0 replies; only message in thread
From: Sam James @ 2024-03-22  8:43 UTC (permalink / raw
  To: gentoo-commits

commit:     4aa71fb389486acee786f07025f7e24cfa07360a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 22 08:11:38 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar 22 08:43:28 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4aa71fb3

sci-biology/mothur: add 1.48.0

Filter LTO too, and no-SA. Not reported upstream as it has a lot of open
bugs already and seems low activity.

Closes: https://bugs.gentoo.org/862273
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-biology/mothur/Manifest                        |  1 +
 sci-biology/mothur/files/mothur-1.48.0-build.patch | 79 ++++++++++++++++++++++
 sci-biology/mothur/metadata.xml                    |  5 ++
 sci-biology/mothur/mothur-1.48.0.ebuild            | 54 +++++++++++++++
 4 files changed, 139 insertions(+)

diff --git a/sci-biology/mothur/Manifest b/sci-biology/mothur/Manifest
index 9d78212016cd..ada6350ceeef 100644
--- a/sci-biology/mothur/Manifest
+++ b/sci-biology/mothur/Manifest
@@ -1 +1,2 @@
 DIST mothur-1.27.0.zip 7095054 BLAKE2B 96a6410d36f64ff50591955aa22bfddf6217c7568022c8c7f70ab70c65d57af2217477de56b6f9ceaf11237cdc5380bd354cf6564002357546539585d0f58221 SHA512 81821ca95d4ce3f0d1e6aa920c4fe3fddd70f716157312ed0590c1c4ad728e6786bfe79f6badddcfb060ed5d1996cc1b5062c320a59209fef35f68e687ba3dd5
+DIST mothur-1.48.0.tar.gz 1652711 BLAKE2B 39e1d2a32a63d441267b4e0e739505bdcb3ab392c169c96d60e816dbd9fab6b92745e8a9eaae31062711f2de0130dae540bba34c6bd97e76a921711f58c11f65 SHA512 a43ef6a223238d40e51c15043360ba9cae86347affea2f1a4e365635fb0949981ad32001b88d4061a033b2a002e944df16923a0622a40bf061791f06143467e1

diff --git a/sci-biology/mothur/files/mothur-1.48.0-build.patch b/sci-biology/mothur/files/mothur-1.48.0-build.patch
new file mode 100644
index 000000000000..da9784e20dd8
--- /dev/null
+++ b/sci-biology/mothur/files/mothur-1.48.0-build.patch
@@ -0,0 +1,79 @@
+Fix building and don't use bundled uchime.
+--- a/Makefile
++++ b/Makefile
+@@ -104,12 +104,19 @@ endif
+ # INCLUDE directories for mothur
+ #
+ #
+-	VPATH=source/calculators:source/chimera:source/classifier:source/clearcut:source/commands:source/communitytype:source/datastructures:source/engines:source/metastats:source/read:source/svm:source/
++	VPATH=source:source/calculators:source/chimera:source/classifier:source/clearcut:source/commands:source/communitytype:source/datastructures:source/engines:source/metastats:source/read:source/svm:source/
++    source := source
+     skipUchime := source/uchime_src/
++    skipTestMothur := source/TestMothur/
++    skipSeqnoise := seqnoise.cpp
+     subdirs :=  $(sort $(dir $(filter-out  $(skipUchime), $(wildcard source/*/))))
++    subdirs :=  $(filter-out  $(skipTestMothur), $(subdirs))
+     subDirIncludes = $(patsubst %, -I %, $(subdirs))
++    subDirIncludes += $(patsubst %, -I %, $(source))
+     subDirLinking =  $(patsubst %, -L%, $(subdirs))
+-    CXXFLAGS += -I. $(subDirIncludes)
++    subDirLinking +=  $(patsubst %, -L%, $(source))
++    subdirs :=  $(dir source) $(sort $(dir $(filter-out  $(skipUchime), $(wildcard source/*/))))
++    CXXFLAGS += -Isource -I. $(subDirIncludes)
+     LDFLAGS += $(subDirLinking)
+ 
+ 
+@@ -118,15 +125,14 @@ endif
+ #
+     OBJECTS=$(patsubst %.cpp,%.o,$(wildcard $(addsuffix *.cpp,$(subdirs))))
+     OBJECTS+=$(patsubst %.c,%.o,$(wildcard $(addsuffix *.c,$(subdirs))))
++    OBJECTS+=$(patsubst %.cpp,%.o,$(filter-out $(skipSeqnoise), $(wildcard source/*.cpp)))
++    OBJECTS+=$(patsubst %.cpp,%.o,$(filter-out $(skipSeqnoise), $(wildcard source/*.c)))
+     OBJECTS+=$(patsubst %.cpp,%.o,$(wildcard *.cpp))
+     OBJECTS+=$(patsubst %.c,%.o,$(wildcard *.c))
+ 
+-mothur : $(OBJECTS) uchime
++mothur : $(OBJECTS)
+ 	$(CXX) $(LDFLAGS) $(TARGET_ARCH) -o $@ $(OBJECTS) $(LIBS)
+ 
+-uchime :
+-	cd source/uchime_src && export CXX=$(CXX) && make clean && make && mv uchime ../../ && cd ..
+-
+ install : mothur
+ 
+ ifeq  ($(strip $(INSTALL_DIR)),"\"Enter_your_mothur_install_path_here\"")
+--- a/makefile-internal
++++ b/makefile-internal
+@@ -115,7 +115,6 @@ endif
+ 
+ mothur : $(OBJECTS)
+     $(CXX) $(LDFLAGS) $(TARGET_ARCH) -o $@ $(OBJECTS) $(LIBS)
+-    strip mothur
+ 
+ %.o : %.c %.h
+     $(COMPILE.c) $(OUTPUT_OPTION) $<
+--- a/source/uchime_src/makefile
++++ b/source/uchime_src/makefile
+@@ -1,4 +1,4 @@
+-CXXFLAGS = -O3 -D_FILE_OFFSET_BITS=64 -DNDEBUG=1 -DUCHIMES=1
++CXXFLAGS = -std=c++11 -O3 -D_FILE_OFFSET_BITS=64 -DNDEBUG=1 -DUCHIMES=1
+ LDFLAGS = -g
+ 
+ #
+@@ -26,4 +26,4 @@ install : uchime
+ 
+ clean :
+ 	@rm -f $(OBJECTS)
+-	
+\ No newline at end of file
++	
+--- a/source/writer.h
++++ b/source/writer.h
+@@ -9,6 +9,7 @@
+ #ifndef writer_h
+ #define writer_h
+ 
++#include <memory>
+ #include "sharedwriter.hpp"
+ 
+ /***********************************************************************/

diff --git a/sci-biology/mothur/metadata.xml b/sci-biology/mothur/metadata.xml
index fc926cc4aa42..15fc0072ba17 100644
--- a/sci-biology/mothur/metadata.xml
+++ b/sci-biology/mothur/metadata.xml
@@ -5,6 +5,11 @@
 		<email>sci-biology@gentoo.org</email>
 		<name>Gentoo Biology Project</name>
 	</maintainer>
+	<use>
+		<flag name="boost">Depend on <pkg>dev-libs/boost</pkg> for make.contigs to read .gz compressed files.</flag>
+		<flag name="gsl">Use <pkg>sci-libs/gsl</pkg> to support diversity estimates for estimiator.single.</flag>
+		<flag name="hdf5">Support Biom format 2.0 for the biom.info command via <pkg>sci-libs/hdf5</pkg>.</flag>
+	</use>
 	<upstream>
 		<remote-id type="github">mothur/mothur</remote-id>
 	</upstream>

diff --git a/sci-biology/mothur/mothur-1.48.0.ebuild b/sci-biology/mothur/mothur-1.48.0.ebuild
new file mode 100644
index 000000000000..869b0bae718b
--- /dev/null
+++ b/sci-biology/mothur/mothur-1.48.0.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="A suite of algorithms for ecological bioinformatics"
+HOMEPAGE="https://mothur.org/"
+SRC_URI="https://github.com/mothur/mothur/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="boost gsl hdf5 mpi +readline"
+
+RDEPEND="
+	sci-biology/uchime
+	boost? ( dev-libs/boost:=[zlib] )
+	gsl? ( sci-libs/gsl:= )
+	hdf5? ( sci-libs/hdf5:=[cxx] )
+	mpi? ( virtual/mpi )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+	#"${FILESDIR}"/${PN}-1.48.0-build.patch
+)
+
+src_configure() {
+	use mpi && export CXX=mpicxx || tc-export CXX
+	use amd64 && append-cppflags -DBIT_VERSION
+}
+
+src_compile() {
+	# bug #862273
+	append-flags -fno-strict-aliasing
+	filter-lto
+
+	# USEBOOST - link with boost libraries. Must install boost. Allows the make.contigs command to read .gz files.
+	# USEHDF5 - link with HDF5cpp libraries. Must install HDF5. Allows the biom.info command to read Biom format 2.0.
+	# USEGSL - link with GNU Scientific libraries. Must install GSL. Allows the estimiator.single command to find diversity estimates.
+	emake \
+		USEBOOST=$(usex boost) \
+		USEHDF5=$(usex hdf5) \
+		USEGSL=$(usex gsl) \
+		USEMPI=$(usex mpi) \
+		USEREADLINE=$(usex readline) \
+		OPTIMIZE=no
+}
+
+src_install() {
+	dobin mothur
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-03-22  8:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-22  8:43 [gentoo-commits] repo/gentoo:master commit in: sci-biology/mothur/, sci-biology/mothur/files/ Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox