summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2012-08-14 15:37:59 +0000
committerJustin Lecher <jlec@gentoo.org>2012-08-14 15:37:59 +0000
commit5511ac625b32e7287f8bcf71b89903ace1cf3eeb (patch)
tree4842694f7f3c8eb23f4fcb6e7838b73a9787be71 /sci-biology
parentsci-biology/uchime: New addition (diff)
downloadgentoo-2-5511ac625b32e7287f8bcf71b89903ace1cf3eeb.tar.gz
gentoo-2-5511ac625b32e7287f8bcf71b89903ace1cf3eeb.tar.bz2
gentoo-2-5511ac625b32e7287f8bcf71b89903ace1cf3eeb.zip
sci-biology/mothur: Version BUmp; fix for buffer overflows, #431258
(Portage version: 2.2.0_alpha121/cvs/Linux x86_64)
Diffstat (limited to 'sci-biology')
-rw-r--r--sci-biology/mothur/ChangeLog13
-rw-r--r--sci-biology/mothur/files/mothur-1.13.0-overflows2.patch77
-rw-r--r--sci-biology/mothur/files/mothur-1.27.0-makefile.patch52
-rw-r--r--sci-biology/mothur/files/mothur-1.27.0-overflows.patch93
-rw-r--r--sci-biology/mothur/mothur-1.13.0-r1.ebuild8
-rw-r--r--sci-biology/mothur/mothur-1.13.0-r2.ebuild45
-rw-r--r--sci-biology/mothur/mothur-1.27.0.ebuild48
-rw-r--r--sci-biology/mothur/mothur-1.6.0.ebuild17
8 files changed, 340 insertions, 13 deletions
diff --git a/sci-biology/mothur/ChangeLog b/sci-biology/mothur/ChangeLog
index 9217931f40a5..ec4cb3ab26a2 100644
--- a/sci-biology/mothur/ChangeLog
+++ b/sci-biology/mothur/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for sci-biology/mothur
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-biology/mothur/ChangeLog,v 1.9 2011/07/08 10:58:34 ssuominen Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/mothur/ChangeLog,v 1.10 2012/08/14 15:37:59 jlec Exp $
+
+*mothur-1.27.0 (14 Aug 2012)
+*mothur-1.13.0-r2 (14 Aug 2012)
+
+ 14 Aug 2012; Justin Lecher <jlec@gentoo.org> mothur-1.6.0.ebuild,
+ mothur-1.13.0-r1.ebuild, +mothur-1.13.0-r2.ebuild,
+ +files/mothur-1.13.0-overflows2.patch, +mothur-1.27.0.ebuild,
+ +files/mothur-1.27.0-makefile.patch, +files/mothur-1.27.0-overflows.patch:
+ Version BUmp; fix for buffer overflows, #431258
08 Jul 2011; Samuli Suominen <ssuominen@gentoo.org> mothur-1.13.0-r1.ebuild:
Convert from "useq" to "use".
diff --git a/sci-biology/mothur/files/mothur-1.13.0-overflows2.patch b/sci-biology/mothur/files/mothur-1.13.0-overflows2.patch
new file mode 100644
index 000000000000..ac1103d19aa4
--- /dev/null
+++ b/sci-biology/mothur/files/mothur-1.13.0-overflows2.patch
@@ -0,0 +1,77 @@
+ clearcutcommand.cpp | 32 ++++++++++++++++----------------
+ 1 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/clearcutcommand.cpp b/clearcutcommand.cpp
+index 1a7ab1f..256aa4d 100644
+--- a/clearcutcommand.cpp
++++ b/clearcutcommand.cpp
+@@ -180,33 +180,33 @@ int ClearcutCommand::execute() {
+
+ vector<char*> cPara;
+
+- char* tempClearcut = new char[8]; strcpy(tempClearcut, "clearcut"); cPara.push_back(tempClearcut);
++ char* tempClearcut = new char[16]; strcpy(tempClearcut, "clearcut"); cPara.push_back(tempClearcut);
+
+ //you gave us a distance matrix
+- if (phylipfile != "") { char* temp = new char[10]; strcpy(temp, "--distance"); cPara.push_back(temp); }
++ if (phylipfile != "") { char* temp = new char[16]; strcpy(temp, "--distance"); cPara.push_back(temp); }
+
+ //you gave us a fastafile
+- if (fastafile != "") { char* temp = new char[11]; strcpy(temp, "--alignment"); cPara.push_back(temp); }
++ if (fastafile != "") { char* temp = new char[16]; strcpy(temp, "--alignment"); cPara.push_back(temp); }
+
+- if (version) { char* temp = new char[9]; strcpy(temp, "--version"); cPara.push_back(temp); }
+- if (verbose) { char* temp = new char[9]; strcpy(temp, "--verbose"); cPara.push_back(temp); }
+- if (quiet) { char* temp = new char[7]; strcpy(temp, "--quiet"); cPara.push_back(temp); }
++ if (version) { char* temp = new char[16]; strcpy(temp, "--version"); cPara.push_back(temp); }
++ if (verbose) { char* temp = new char[16]; strcpy(temp, "--verbose"); cPara.push_back(temp); }
++ if (quiet) { char* temp = new char[16]; strcpy(temp, "--quiet"); cPara.push_back(temp); }
+ if (seed != "*") {
+ string tempSeed = "--seed=" + seed;
+ char* temp = new char[tempSeed.length()];
+ strcpy(temp, tempSeed.c_str());
+ cPara.push_back(temp);
+ }
+- if (norandom) { char* temp = new char[10]; strcpy(temp, "--norandom"); cPara.push_back(temp); }
+- if (shuffle) { char* temp = new char[9]; strcpy(temp, "--shuffle"); cPara.push_back(temp); }
+- if (neighbor) { char* temp = new char[10]; strcpy(temp, "--neighbor"); cPara.push_back(temp); }
++ if (norandom) { char* temp = new char[16]; strcpy(temp, "--norandom"); cPara.push_back(temp); }
++ if (shuffle) { char* temp = new char[16]; strcpy(temp, "--shuffle"); cPara.push_back(temp); }
++ if (neighbor) { char* temp = new char[16]; strcpy(temp, "--neighbor"); cPara.push_back(temp); }
+
+ string tempIn = "--in=" + inputFile;
+ char* tempI = new char[tempIn.length()];
+ strcpy(tempI, tempIn.c_str());
+ cPara.push_back(tempI);
+
+- if (stdoutWanted) { char* temp = new char[8]; strcpy(temp, "--stdout"); cPara.push_back(temp); }
++ if (stdoutWanted) { char* temp = new char[16]; strcpy(temp, "--stdout"); cPara.push_back(temp); }
+ else{
+ string tempOut = "--out=" + outputName;
+
+@@ -215,10 +215,10 @@ int ClearcutCommand::execute() {
+ cPara.push_back(temp);
+ }
+
+- if (DNA) { char* temp = new char[5]; strcpy(temp, "--DNA"); cPara.push_back(temp); }
+- if (protein) { char* temp = new char[9]; strcpy(temp, "--protein"); cPara.push_back(temp); }
+- if (jukes) { char* temp = new char[7]; strcpy(temp, "--jukes"); cPara.push_back(temp); }
+- if (kimura) { char* temp = new char[8]; strcpy(temp, "--kimura"); cPara.push_back(temp); }
++ if (DNA) { char* temp = new char[16]; strcpy(temp, "--DNA"); cPara.push_back(temp); }
++ if (protein) { char* temp = new char[16]; strcpy(temp, "--protein"); cPara.push_back(temp); }
++ if (jukes) { char* temp = new char[16]; strcpy(temp, "--jukes"); cPara.push_back(temp); }
++ if (kimura) { char* temp = new char[16]; strcpy(temp, "--kimura"); cPara.push_back(temp); }
+ if (matrixout != "") {
+ string tempMatrix = "--matrixout=" + outputDir + matrixout;
+ char* temp = new char[tempMatrix.length()];
+@@ -233,8 +233,8 @@ int ClearcutCommand::execute() {
+ cPara.push_back(temp);
+ }
+
+- if (expblen) { char* temp = new char[9]; strcpy(temp, "--expblen"); cPara.push_back(temp); }
+- if (expdist) { char* temp = new char[9]; strcpy(temp, "--expdist"); cPara.push_back(temp); }
++ if (expblen) { char* temp = new char[16]; strcpy(temp, "--expblen"); cPara.push_back(temp); }
++ if (expdist) { char* temp = new char[16]; strcpy(temp, "--expdist"); cPara.push_back(temp); }
+
+ char** clearcutParameters;
+ clearcutParameters = new char*[cPara.size()];
diff --git a/sci-biology/mothur/files/mothur-1.27.0-makefile.patch b/sci-biology/mothur/files/mothur-1.27.0-makefile.patch
new file mode 100644
index 000000000000..52a02585df14
--- /dev/null
+++ b/sci-biology/mothur/files/mothur-1.27.0-makefile.patch
@@ -0,0 +1,52 @@
+ makefile | 14 ++++++--------
+ 1 files changed, 6 insertions(+), 8 deletions(-)
+
+diff --git a/makefile b/makefile
+index db7c904..109488f 100644
+--- a/makefile
++++ b/makefile
+@@ -10,18 +10,18 @@
+ #
+
+ USEMPI ?= no
+-64BIT_VERSION ?= yes
++64BIT_VERSION ?= no
+ USEREADLINE ?= yes
+ CYGWIN_BUILD ?= no
+ USECOMPRESSION ?= no
+ MOTHUR_FILES="\"Enter_your_default_path_here\""
+ RELEASE_DATE = "\"8/8/2012\""
+ VERSION = "\"1.27.0\""
+-FORTAN_COMPILER = gfortran
+-FORTRAN_FLAGS =
++FORTAN_COMPILER = ${FC}
++FORTRAN_FLAGS = ${FCFLAGS}
+
+ # Optimize to level 3:
+-CXXFLAGS += -O3
++#CXXFLAGS += -O3
+
+ ifeq ($(strip $(64BIT_VERSION)),yes)
+ #if you are using centos uncomment the following lines
+@@ -69,7 +69,7 @@ endif
+
+
+ ifeq ($(strip $(USEMPI)),yes)
+- CXX = mpic++
++# CXX = mpic++
+ CXXFLAGS += -DUSE_MPI
+ endif
+
+@@ -95,11 +95,9 @@ OBJECTS=$(patsubst %.cpp,%.o,$(wildcard *.cpp))
+ OBJECTS+=$(patsubst %.c,%.o,$(wildcard *.c))
+ OBJECTS+=$(patsubst %.f,%.o,$(wildcard *.f))
+
+-mothur : fortranSource $(OBJECTS) uchime
++mothur : fortranSource $(OBJECTS)
+ $(CXX) $(LDFLAGS) $(TARGET_ARCH) -o $@ $(OBJECTS) $(LIBS)
+
+- strip mothur
+-
+ uchime:
+ cd uchime_src && ./mk && mv uchime .. && cd ..
+
diff --git a/sci-biology/mothur/files/mothur-1.27.0-overflows.patch b/sci-biology/mothur/files/mothur-1.27.0-overflows.patch
new file mode 100644
index 000000000000..0b612cf7b529
--- /dev/null
+++ b/sci-biology/mothur/files/mothur-1.27.0-overflows.patch
@@ -0,0 +1,93 @@
+ chimerauchimecommand.cpp | 2 +-
+ clearcutcommand.cpp | 32 ++++++++++++++++----------------
+ 2 files changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/chimerauchimecommand.cpp b/chimerauchimecommand.cpp
+index bd31c19..2070840 100644
+--- a/chimerauchimecommand.cpp
++++ b/chimerauchimecommand.cpp
+@@ -1264,7 +1264,7 @@ int ChimeraUchimeCommand::driver(string outputFName, string filename, string acc
+ }
+
+ if (ucl) {
+- char* tempucl = new char[5];
++ char* tempucl = new char[6];
+ strcpy(tempucl, "--ucl");
+ cPara.push_back(tempucl);
+ }
+diff --git a/clearcutcommand.cpp b/clearcutcommand.cpp
+index 6a0eb25..2e8164e 100644
+--- a/clearcutcommand.cpp
++++ b/clearcutcommand.cpp
+@@ -269,35 +269,35 @@ int ClearcutCommand::execute() {
+
+ vector<char*> cPara;
+
+- char* tempClearcut = new char[8];
++ char* tempClearcut = new char[16];
+ strcpy(tempClearcut, "clearcut");
+ cPara.push_back(tempClearcut);
+
+ //you gave us a distance matrix
+- if (phylipfile != "") { char* temp = new char[10]; strcpy(temp, "--distance"); cPara.push_back(temp); }
++ if (phylipfile != "") { char* temp = new char[16]; strcpy(temp, "--distance"); cPara.push_back(temp); }
+
+ //you gave us a fastafile
+- if (fastafile != "") { char* temp = new char[11]; strcpy(temp, "--alignment"); cPara.push_back(temp); }
++ if (fastafile != "") { char* temp = new char[16]; strcpy(temp, "--alignment"); cPara.push_back(temp); }
+
+- if (version) { char* temp = new char[9]; strcpy(temp, "--version"); cPara.push_back(temp); }
+- if (verbose) { char* temp = new char[9]; strcpy(temp, "--verbose"); cPara.push_back(temp); }
+- if (quiet) { char* temp = new char[7]; strcpy(temp, "--quiet"); cPara.push_back(temp); }
++ if (version) { char* temp = new char[16]; strcpy(temp, "--version"); cPara.push_back(temp); }
++ if (verbose) { char* temp = new char[16]; strcpy(temp, "--verbose"); cPara.push_back(temp); }
++ if (quiet) { char* temp = new char[16]; strcpy(temp, "--quiet"); cPara.push_back(temp); }
+ if (seed != "*") {
+ string tempSeed = "--seed=" + seed;
+ char* temp = new char[tempSeed.length()];
+ strcpy(temp, tempSeed.c_str());
+ cPara.push_back(temp);
+ }
+- if (norandom) { char* temp = new char[10]; strcpy(temp, "--norandom"); cPara.push_back(temp); }
+- if (shuffle) { char* temp = new char[9]; strcpy(temp, "--shuffle"); cPara.push_back(temp); }
+- if (neighbor) { char* temp = new char[10]; strcpy(temp, "--neighbor"); cPara.push_back(temp); }
++ if (norandom) { char* temp = new char[16]; strcpy(temp, "--norandom"); cPara.push_back(temp); }
++ if (shuffle) { char* temp = new char[16]; strcpy(temp, "--shuffle"); cPara.push_back(temp); }
++ if (neighbor) { char* temp = new char[16]; strcpy(temp, "--neighbor"); cPara.push_back(temp); }
+
+ string tempIn = "--in=" + inputFile;
+ char* tempI = new char[tempIn.length()];
+ strcpy(tempI, tempIn.c_str());
+ cPara.push_back(tempI);
+
+- if (stdoutWanted) { char* temp = new char[8]; strcpy(temp, "--stdout"); cPara.push_back(temp); }
++ if (stdoutWanted) { char* temp = new char[16]; strcpy(temp, "--stdout"); cPara.push_back(temp); }
+ else{
+ string tempOut = "--out=" + outputName;
+
+@@ -306,10 +306,10 @@ int ClearcutCommand::execute() {
+ cPara.push_back(temp);
+ }
+
+- if (DNA) { char* temp = new char[5]; strcpy(temp, "--DNA"); cPara.push_back(temp); }
+- if (protein) { char* temp = new char[9]; strcpy(temp, "--protein"); cPara.push_back(temp); }
+- if (jukes) { char* temp = new char[7]; strcpy(temp, "--jukes"); cPara.push_back(temp); }
+- if (kimura) { char* temp = new char[8]; strcpy(temp, "--kimura"); cPara.push_back(temp); }
++ if (DNA) { char* temp = new char[16]; strcpy(temp, "--DNA"); cPara.push_back(temp); }
++ if (protein) { char* temp = new char[16]; strcpy(temp, "--protein"); cPara.push_back(temp); }
++ if (jukes) { char* temp = new char[16]; strcpy(temp, "--jukes"); cPara.push_back(temp); }
++ if (kimura) { char* temp = new char[16]; strcpy(temp, "--kimura"); cPara.push_back(temp); }
+ if (matrixout != "") {
+ string tempMatrix = "--matrixout=" + outputDir + matrixout;
+ char* temp = new char[tempMatrix.length()];
+@@ -326,8 +326,8 @@ int ClearcutCommand::execute() {
+ cPara.push_back(temp);
+ }
+
+- if (expblen) { char* temp = new char[9]; strcpy(temp, "--expblen"); cPara.push_back(temp); }
+- if (expdist) { char* temp = new char[9]; strcpy(temp, "--expdist"); cPara.push_back(temp); }
++ if (expblen) { char* temp = new char[16]; strcpy(temp, "--expblen"); cPara.push_back(temp); }
++ if (expdist) { char* temp = new char[16]; strcpy(temp, "--expdist"); cPara.push_back(temp); }
+
+ char** clearcutParameters;
+ clearcutParameters = new char*[cPara.size()];
diff --git a/sci-biology/mothur/mothur-1.13.0-r1.ebuild b/sci-biology/mothur/mothur-1.13.0-r1.ebuild
index 65fe1aa348ac..1efa846e1e42 100644
--- a/sci-biology/mothur/mothur-1.13.0-r1.ebuild
+++ b/sci-biology/mothur/mothur-1.13.0-r1.ebuild
@@ -1,13 +1,13 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-biology/mothur/mothur-1.13.0-r1.ebuild,v 1.2 2011/07/08 10:58:34 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/mothur/mothur-1.13.0-r1.ebuild,v 1.3 2012/08/14 15:37:59 jlec Exp $
EAPI="2"
inherit eutils toolchain-funcs
DESCRIPTION="A suite of algorithms for ecological bioinformatics"
-HOMEPAGE="http://schloss.micro.umass.edu/wiki/Main_Page"
+HOMEPAGE="http://www.mothur.org/"
SRC_URI="mirror://gentoo/${P}.zip"
LICENSE="GPL-3"
@@ -39,5 +39,5 @@ src_compile() {
}
src_install() {
- dobin mothur || die
+ dobin ${PN}
}
diff --git a/sci-biology/mothur/mothur-1.13.0-r2.ebuild b/sci-biology/mothur/mothur-1.13.0-r2.ebuild
new file mode 100644
index 000000000000..3dad5095a7ca
--- /dev/null
+++ b/sci-biology/mothur/mothur-1.13.0-r2.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/mothur/mothur-1.13.0-r2.ebuild,v 1.1 2012/08/14 15:37:59 jlec Exp $
+
+EAPI="2"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="A suite of algorithms for ecological bioinformatics"
+HOMEPAGE="http://www.mothur.org/"
+SRC_URI="mirror://gentoo/${P}.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="mpi +readline"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+RDEPEND="mpi? ( virtual/mpi )"
+
+S=${WORKDIR}/Mothur.source
+
+pkg_setup() {
+ use mpi && CXX=mpicxx || CXX=$(tc-getCXX)
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-makefile.patch \
+ "${FILESDIR}"/${P}-overflows.patch \
+ "${FILESDIR}"/${P}-overflows2.patch
+}
+
+use_yn() {
+ use $1 && echo "yes" || echo "no"
+}
+
+src_compile() {
+ emake USEMPI=$(use_yn mpi) USEREADLINE=$(use_yn readline) || die
+}
+
+src_install() {
+ dobin ${PN}
+}
diff --git a/sci-biology/mothur/mothur-1.27.0.ebuild b/sci-biology/mothur/mothur-1.27.0.ebuild
new file mode 100644
index 000000000000..852d09ca39ea
--- /dev/null
+++ b/sci-biology/mothur/mothur-1.27.0.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/mothur/mothur-1.27.0.ebuild,v 1.1 2012/08/14 15:37:59 jlec Exp $
+
+EAPI=4
+
+inherit eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="A suite of algorithms for ecological bioinformatics"
+HOMEPAGE="http://www.mothur.org/"
+SRC_URI="http://www.mothur.org/w/images/c/cb/Mothur.${PV}.zip -> ${P}.zip"
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="mpi +readline"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ sci-biology/uchime
+ mpi? ( virtual/mpi )"
+DEPEND="${RDEPEND}
+ app-arch/unzip"
+
+S=${WORKDIR}/Mothur.source
+
+pkg_setup() {
+ use mpi && export CXX=mpicxx || export CXX=$(tc-getCXX)
+ use amd64 && append-flags -DBIT_VERSION
+ tc-export FC
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-makefile.patch \
+ "${FILESDIR}"/${P}-overflows.patch
+}
+
+use_yn() {
+ use $1 && echo "yes" || echo "no"
+}
+
+src_compile() {
+ emake USEMPI=$(use_yn mpi) USEREADLINE=$(use_yn readline)
+}
+
+src_install() {
+ dobin ${PN}
+}
diff --git a/sci-biology/mothur/mothur-1.6.0.ebuild b/sci-biology/mothur/mothur-1.6.0.ebuild
index 9773880ce6fc..97e106eab79a 100644
--- a/sci-biology/mothur/mothur-1.6.0.ebuild
+++ b/sci-biology/mothur/mothur-1.6.0.ebuild
@@ -1,13 +1,13 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-biology/mothur/mothur-1.6.0.ebuild,v 1.3 2010/02/06 13:06:31 hwoarang Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-biology/mothur/mothur-1.6.0.ebuild,v 1.4 2012/08/14 15:37:59 jlec Exp $
-EAPI="2"
+EAPI=4
inherit toolchain-funcs
DESCRIPTION="A suite of algorithms for ecological bioinformatics"
-HOMEPAGE="http://schloss.micro.umass.edu/wiki/Main_Page"
+HOMEPAGE="http://www.mothur.org/"
SRC_URI="mirror://gentoo/${P}.zip"
LICENSE="GPL-3"
@@ -21,10 +21,13 @@ RDEPEND=""
S="${WORKDIR}/mothur-v.${PV}"
src_prepare() {
- sed -i -e 's/CC_OPTIONS =/CC_OPTIONS = ${CXXFLAGS} /' \
- -e 's|CC = g++|CC = '$(tc-getCXX)'|' "${S}/makefile" || die
+ sed \
+ -e 's/CC_OPTIONS =.*$/CC_OPTIONS = ${CXXFLAGS} /' \
+ -e 's|CC = g++|CC = '$(tc-getCXX)'|' \
+ -e '/^LNK_OPTIONS/s:$:${LDFLAGS}:g' \
+ -i makefile || die
}
src_install() {
- dobin mothur || die
+ dobin ${PN}
}