summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2016-09-24 21:01:30 +0200
committerDavid Seifert <soap@gentoo.org>2016-09-24 21:02:11 +0200
commit47244d4397c75f700e48a7b60ba59cc3053d3750 (patch)
treee2beaec6deb9772453ec516273946bd42268aa3b /sci-biology/amos
parentsci-libs/libmems: Allow for compiling with GCC 6 (diff)
downloadgentoo-47244d4397c75f700e48a7b60ba59cc3053d3750.tar.gz
gentoo-47244d4397c75f700e48a7b60ba59cc3053d3750.tar.bz2
gentoo-47244d4397c75f700e48a7b60ba59cc3053d3750.zip
sci-biology/amos: Allow for compiling with GCC 6
Gentoo-bug: 594928 * EAPI=6 * [QA] fix implicit declarations Package-Manager: portage-2.3.1
Diffstat (limited to 'sci-biology/amos')
-rw-r--r--sci-biology/amos/Manifest1
-rw-r--r--sci-biology/amos/amos-3.1.0-r1.ebuild37
-rw-r--r--sci-biology/amos/amos-3.1.0-r2.ebuild48
-rw-r--r--sci-biology/amos/files/amos-3.1.0-qa-Wformat.patch136
4 files changed, 185 insertions, 37 deletions
diff --git a/sci-biology/amos/Manifest b/sci-biology/amos/Manifest
index 27ad50ff28ed..3628b48c4a93 100644
--- a/sci-biology/amos/Manifest
+++ b/sci-biology/amos/Manifest
@@ -1 +1,2 @@
+DIST amos-3.1.0-fix-c++14.patch.bz2 8033 SHA256 23b853959147466e7d766b1fe54e0afabfe3a89b84c89f788f2b8e749344efd6 SHA512 76e26ca48a009cbf637d9462878223633e9b21cbd12d58a19e9a561f2cf4805791becc0b5f7aaf81975ca1e02b263cdd9d5ff310c4594670922ea65885ad9634 WHIRLPOOL d4530a5b3ff2a90419a1368a0e652bad367d2fb7601765ca42e8110ade87e8360f90070c0021aa25f5a6421815794a83491581e16fa9cb26be23bcb187840ff3
DIST amos-3.1.0.tar.gz 2094268 SHA256 2d9f50e39186ad3dde3d3b28cc265e8d632430657f40fc3978ce34ab1b3db43b SHA512 7a416b9a0438b47425355383b709491a58f38c8d834df29e43c942170e710c6ea7e3bc8c509a58421b1340ad6eece9ea2da357ce5cd1d41ce08375676ee30491 WHIRLPOOL df9b547fcc0b7bf0149641fd8df9e4558f61bb6c17ded0facfeecde25d3a6307b40414e7cb8b2f021fa8cc192ee956672c26e0fc287981f4733a393739e80b61
diff --git a/sci-biology/amos/amos-3.1.0-r1.ebuild b/sci-biology/amos/amos-3.1.0-r1.ebuild
deleted file mode 100644
index a4c860bdbe7f..000000000000
--- a/sci-biology/amos/amos-3.1.0-r1.ebuild
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit eutils python-r1
-
-DESCRIPTION="A Modular, Open-Source whole genome assembler"
-HOMEPAGE="http://amos.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-
-LICENSE="Artistic"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="qt4"
-
-DEPEND="qt4? ( dev-qt/qtcore:4 )"
-RDEPEND="${DEPEND}
- dev-perl/DBI
- dev-perl/Statistics-Descriptive
- sci-biology/mummer"
-
-MAKEOPTS+=" -j1"
-
-src_prepare() {
- epatch \
- "${FILESDIR}"/${P}-gcc-4.7.patch \
- "${FILESDIR}"/${P}-goBambus2.py-indent-and-cleanup.patch
-}
-
-src_install() {
- default
- python_replicate_script "${ED}"/usr/bin/goBambus2
-}
diff --git a/sci-biology/amos/amos-3.1.0-r2.ebuild b/sci-biology/amos/amos-3.1.0-r2.ebuild
new file mode 100644
index 000000000000..91c1f69f9756
--- /dev/null
+++ b/sci-biology/amos/amos-3.1.0-r2.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit flag-o-matic python-r1
+
+DESCRIPTION="A Modular, Open-Source whole genome assembler"
+HOMEPAGE="http://amos.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
+ https://dev.gentoo.org/~soap/distfiles/${PN}-3.1.0-fix-c++14.patch.bz2"
+
+LICENSE="Artistic"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="qt4"
+
+DEPEND="qt4? ( dev-qt/qtcore:4 )"
+RDEPEND="${DEPEND}
+ dev-perl/DBI
+ dev-perl/Statistics-Descriptive
+ sci-biology/mummer"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gcc-4.7.patch
+ "${FILESDIR}"/${P}-goBambus2.py-indent-and-cleanup.patch
+ "${WORKDIR}"/${P}-fix-c++14.patch
+ "${FILESDIR}"/${P}-qa-Wformat.patch
+)
+
+src_configure() {
+ # prevent GCC 6 log pollution due to hash_map deprecation in C++11
+ append-cxxflags -Wno-cpp
+
+ default
+}
+
+src_compile() {
+ emake -j1
+}
+
+src_install() {
+ default
+ python_replicate_script "${ED%/}/usr/bin/goBambus2"
+}
diff --git a/sci-biology/amos/files/amos-3.1.0-qa-Wformat.patch b/sci-biology/amos/files/amos-3.1.0-qa-Wformat.patch
new file mode 100644
index 000000000000..13f4eeb247a1
--- /dev/null
+++ b/sci-biology/amos/files/amos-3.1.0-qa-Wformat.patch
@@ -0,0 +1,136 @@
+Fix QA warnings, due to using incorrect format specifiers in printf:
+* contig-cmp.cc:237:50: warning: format ‘%u’ expects argument of type ‘unsigned int’,
+* but argument 3 has type ‘std::vector<Contig_t>::size_type {aka long unsigned int}’ [-Wformat=]
+* fprintf (stderr, "%u b contigs\n", b . size ());
+
+--- a/src/Align/align.cc
++++ b/src/Align/align.cc
+@@ -1936,7 +1936,7 @@
+ n = align . size ();
+ con = consensus . c_str ();
+
+- fprintf (fp, "\nConsensus len = %d\n", consensus . length ());
++ fprintf (fp, "\nConsensus len = %zu\n", consensus . length ());
+
+ for (i = 0; i < n; i ++)
+ {
+@@ -3936,7 +3936,7 @@
+ }
+
+ // Array of sum of quality scores in the slice for A,C,G,T,- resp.
+- for (j = 0; j < 6; j ++)
++ for (j = 0; j < 5; j ++)
+ qvsum [j] = 0;
+
+ int nof_ambiguities = 0;
+--- a/src/Align/align_poly.cc
++++ b/src/Align/align_poly.cc
+@@ -1761,7 +1761,7 @@
+ n = align . size ();
+ con = consensus . c_str ();
+
+- fprintf (fp, "\nConsensus len = %d\n", consensus . length ());
++ fprintf (fp, "\nConsensus len = %zu\n", consensus . length ());
+ for (i = 0; i < n; i ++)
+ {
+ fprintf (fp, "\nString #%d:\n", i);
+--- a/src/Align/count-qmers.cc
++++ b/src/Align/count-qmers.cc
+@@ -191,8 +191,8 @@
+
+ PrintMers(mer_table, min_count);
+
+- fprintf(stderr, "reporter:counter:asm,reads_total,%ld\n", COUNT);
+- fprintf(stderr, "reporter:counter:asm,reads_bp,%ld\n", LEN);
++ fprintf(stderr, "reporter:counter:asm,reads_total,%lld\n", COUNT);
++ fprintf(stderr, "reporter:counter:asm,reads_bp,%lld\n", LEN);
+ }
+ catch (Exception_t & e)
+ {
+--- a/src/Align/kmer-cov.cc
++++ b/src/Align/kmer-cov.cc
+@@ -485,7 +485,7 @@
+ Kmer_Len = s . length ();
+ else if (Kmer_Len != int (s . length ()))
+ {
+- sprintf (Clean_Exit_Msg_Line, "New kmer \"%s\" length is %d instead of %d",
++ sprintf (Clean_Exit_Msg_Line, "New kmer \"%s\" length is %zu instead of %d",
+ s . c_str (), s . length (), Kmer_Len);
+ Clean_Exit (Clean_Exit_Msg_Line, __FILE__, __LINE__);
+ }
+--- a/src/Align/kmer-cov-plot.cc
++++ b/src/Align/kmer-cov-plot.cc
+@@ -316,7 +316,7 @@
+ }
+ else if (Kmer_Len != int (s . length ()))
+ {
+- sprintf (Clean_Exit_Msg_Line, "New kmer \"%s\" length is %d instead of %d",
++ sprintf (Clean_Exit_Msg_Line, "New kmer \"%s\" length is %zu instead of %d",
+ s . c_str (), s . length (), Kmer_Len);
+ Clean_Exit (Clean_Exit_Msg_Line, __FILE__, __LINE__);
+ }
+--- a/src/Align/make-consensus.cc
++++ b/src/Align/make-consensus.cc
+@@ -303,7 +303,7 @@
+ break;
+ }
+
+- sprintf (sid, "%ld", ++layout_id);
++ sprintf (sid, "%u", ++layout_id);
+ cid = string (sid);
+ ID_t lid = layout.getIID ();
+ if (lid == 0)
+--- a/src/Align/make-consensus_poly.cc
++++ b/src/Align/make-consensus_poly.cc
+@@ -279,7 +279,7 @@
+ break;
+ }
+
+- sprintf(sid, "%ld", ++layout_id);
++ sprintf(sid, "%u", ++layout_id);
+ cid = string(sid);
+ ID_t lid = layout.getIID();
+ if (lid == 0) {
+--- a/src/Align/simple-overlap.cc
++++ b/src/Align/simple-overlap.cc
+@@ -422,7 +422,7 @@
+ "Options:\n"
+ " -a Also show alignments of overlaps \n"
+ " -E <x> Maximum error rate for overlaps is <x>\n"
+- " e.g., -E 0.06 for 6% error rate\n"
++ " e.g., -E 0.06 for 6%% error rate\n"
+ " -F Input is a fasta file\n"
+ " -h Print this usage message\n"
+ " -o <n> Set minimum overlap length to <n>\n"
+--- a/src/Compare/contig-cmp.cc
++++ b/src/Compare/contig-cmp.cc
+@@ -145,7 +145,7 @@
+
+ fclose (fp);
+
+- fprintf (stderr, "%u a contigs\n", a . size ());
++ fprintf (stderr, "%zu a contigs\n", a . size ());
+ vector <Unitig_t> a_contig (max_id + 1);
+ n = a . size ();
+ for (i = 0; i < n; i ++)
+@@ -234,7 +234,7 @@
+
+ fclose (fp);
+
+- fprintf (stderr, "%u b contigs\n", b . size ());
++ fprintf (stderr, "%zu b contigs\n", b . size ());
+ vector <Unitig_t> b_contig (max_id + 1);
+ n = b . size ();
+ for (i = 0; i < n; i ++)
+--- a/src/Staden/progs/trace_convert.c
++++ b/src/Staden/progs/trace_convert.c
+@@ -6,6 +6,9 @@
+ #include "traceType.h"
+ #include "seqIOABI.h"
+
++#include <fcntl.h>
++#include <unistd.h>
++
+ static char fileIdentifier[] = "$Id$";
+
+ struct opts {