Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-biology/amos/, sci-biology/amos/files/
Date: Sat, 24 Sep 2016 19:02:36
Message-Id: 1474743731.47244d4397c75f700e48a7b60ba59cc3053d3750.soap@gentoo
1 commit: 47244d4397c75f700e48a7b60ba59cc3053d3750
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 24 19:01:30 2016 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 24 19:02:11 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47244d43
7
8 sci-biology/amos: Allow for compiling with GCC 6
9
10 Gentoo-bug: 594928
11 * EAPI=6
12 * [QA] fix implicit declarations
13
14 Package-Manager: portage-2.3.1
15
16 sci-biology/amos/Manifest | 1 +
17 sci-biology/amos/amos-3.1.0-r1.ebuild | 37 ------
18 sci-biology/amos/amos-3.1.0-r2.ebuild | 48 ++++++++
19 sci-biology/amos/files/amos-3.1.0-qa-Wformat.patch | 136 +++++++++++++++++++++
20 4 files changed, 185 insertions(+), 37 deletions(-)
21
22 diff --git a/sci-biology/amos/Manifest b/sci-biology/amos/Manifest
23 index 27ad50f..3628b48 100644
24 --- a/sci-biology/amos/Manifest
25 +++ b/sci-biology/amos/Manifest
26 @@ -1 +1,2 @@
27 +DIST amos-3.1.0-fix-c++14.patch.bz2 8033 SHA256 23b853959147466e7d766b1fe54e0afabfe3a89b84c89f788f2b8e749344efd6 SHA512 76e26ca48a009cbf637d9462878223633e9b21cbd12d58a19e9a561f2cf4805791becc0b5f7aaf81975ca1e02b263cdd9d5ff310c4594670922ea65885ad9634 WHIRLPOOL d4530a5b3ff2a90419a1368a0e652bad367d2fb7601765ca42e8110ade87e8360f90070c0021aa25f5a6421815794a83491581e16fa9cb26be23bcb187840ff3
28 DIST amos-3.1.0.tar.gz 2094268 SHA256 2d9f50e39186ad3dde3d3b28cc265e8d632430657f40fc3978ce34ab1b3db43b SHA512 7a416b9a0438b47425355383b709491a58f38c8d834df29e43c942170e710c6ea7e3bc8c509a58421b1340ad6eece9ea2da357ce5cd1d41ce08375676ee30491 WHIRLPOOL df9b547fcc0b7bf0149641fd8df9e4558f61bb6c17ded0facfeecde25d3a6307b40414e7cb8b2f021fa8cc192ee956672c26e0fc287981f4733a393739e80b61
29
30 diff --git a/sci-biology/amos/amos-3.1.0-r1.ebuild b/sci-biology/amos/amos-3.1.0-r1.ebuild
31 deleted file mode 100644
32 index a4c860b..00000000
33 --- a/sci-biology/amos/amos-3.1.0-r1.ebuild
34 +++ /dev/null
35 @@ -1,37 +0,0 @@
36 -# Copyright 1999-2015 Gentoo Foundation
37 -# Distributed under the terms of the GNU General Public License v2
38 -# $Id$
39 -
40 -EAPI=5
41 -
42 -PYTHON_COMPAT=( python2_7 )
43 -
44 -inherit eutils python-r1
45 -
46 -DESCRIPTION="A Modular, Open-Source whole genome assembler"
47 -HOMEPAGE="http://amos.sourceforge.net/"
48 -SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
49 -
50 -LICENSE="Artistic"
51 -SLOT="0"
52 -KEYWORDS="~amd64 ~x86"
53 -IUSE="qt4"
54 -
55 -DEPEND="qt4? ( dev-qt/qtcore:4 )"
56 -RDEPEND="${DEPEND}
57 - dev-perl/DBI
58 - dev-perl/Statistics-Descriptive
59 - sci-biology/mummer"
60 -
61 -MAKEOPTS+=" -j1"
62 -
63 -src_prepare() {
64 - epatch \
65 - "${FILESDIR}"/${P}-gcc-4.7.patch \
66 - "${FILESDIR}"/${P}-goBambus2.py-indent-and-cleanup.patch
67 -}
68 -
69 -src_install() {
70 - default
71 - python_replicate_script "${ED}"/usr/bin/goBambus2
72 -}
73
74 diff --git a/sci-biology/amos/amos-3.1.0-r2.ebuild b/sci-biology/amos/amos-3.1.0-r2.ebuild
75 new file mode 100644
76 index 00000000..91c1f69
77 --- /dev/null
78 +++ b/sci-biology/amos/amos-3.1.0-r2.ebuild
79 @@ -0,0 +1,48 @@
80 +# Copyright 1999-2016 Gentoo Foundation
81 +# Distributed under the terms of the GNU General Public License v2
82 +# $Id$
83 +
84 +EAPI=6
85 +
86 +PYTHON_COMPAT=( python2_7 )
87 +
88 +inherit flag-o-matic python-r1
89 +
90 +DESCRIPTION="A Modular, Open-Source whole genome assembler"
91 +HOMEPAGE="http://amos.sourceforge.net/"
92 +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
93 + https://dev.gentoo.org/~soap/distfiles/${PN}-3.1.0-fix-c++14.patch.bz2"
94 +
95 +LICENSE="Artistic"
96 +SLOT="0"
97 +KEYWORDS="~amd64 ~x86"
98 +IUSE="qt4"
99 +
100 +DEPEND="qt4? ( dev-qt/qtcore:4 )"
101 +RDEPEND="${DEPEND}
102 + dev-perl/DBI
103 + dev-perl/Statistics-Descriptive
104 + sci-biology/mummer"
105 +
106 +PATCHES=(
107 + "${FILESDIR}"/${P}-gcc-4.7.patch
108 + "${FILESDIR}"/${P}-goBambus2.py-indent-and-cleanup.patch
109 + "${WORKDIR}"/${P}-fix-c++14.patch
110 + "${FILESDIR}"/${P}-qa-Wformat.patch
111 +)
112 +
113 +src_configure() {
114 + # prevent GCC 6 log pollution due to hash_map deprecation in C++11
115 + append-cxxflags -Wno-cpp
116 +
117 + default
118 +}
119 +
120 +src_compile() {
121 + emake -j1
122 +}
123 +
124 +src_install() {
125 + default
126 + python_replicate_script "${ED%/}/usr/bin/goBambus2"
127 +}
128
129 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
130 new file mode 100644
131 index 00000000..13f4eeb
132 --- /dev/null
133 +++ b/sci-biology/amos/files/amos-3.1.0-qa-Wformat.patch
134 @@ -0,0 +1,136 @@
135 +Fix QA warnings, due to using incorrect format specifiers in printf:
136 +* contig-cmp.cc:237:50: warning: format ‘%u’ expects argument of type ‘unsigned int’,
137 +* but argument 3 has type ‘std::vector<Contig_t>::size_type {aka long unsigned int}’ [-Wformat=]
138 +* fprintf (stderr, "%u b contigs\n", b . size ());
139 +
140 +--- a/src/Align/align.cc
141 ++++ b/src/Align/align.cc
142 +@@ -1936,7 +1936,7 @@
143 + n = align . size ();
144 + con = consensus . c_str ();
145 +
146 +- fprintf (fp, "\nConsensus len = %d\n", consensus . length ());
147 ++ fprintf (fp, "\nConsensus len = %zu\n", consensus . length ());
148 +
149 + for (i = 0; i < n; i ++)
150 + {
151 +@@ -3936,7 +3936,7 @@
152 + }
153 +
154 + // Array of sum of quality scores in the slice for A,C,G,T,- resp.
155 +- for (j = 0; j < 6; j ++)
156 ++ for (j = 0; j < 5; j ++)
157 + qvsum [j] = 0;
158 +
159 + int nof_ambiguities = 0;
160 +--- a/src/Align/align_poly.cc
161 ++++ b/src/Align/align_poly.cc
162 +@@ -1761,7 +1761,7 @@
163 + n = align . size ();
164 + con = consensus . c_str ();
165 +
166 +- fprintf (fp, "\nConsensus len = %d\n", consensus . length ());
167 ++ fprintf (fp, "\nConsensus len = %zu\n", consensus . length ());
168 + for (i = 0; i < n; i ++)
169 + {
170 + fprintf (fp, "\nString #%d:\n", i);
171 +--- a/src/Align/count-qmers.cc
172 ++++ b/src/Align/count-qmers.cc
173 +@@ -191,8 +191,8 @@
174 +
175 + PrintMers(mer_table, min_count);
176 +
177 +- fprintf(stderr, "reporter:counter:asm,reads_total,%ld\n", COUNT);
178 +- fprintf(stderr, "reporter:counter:asm,reads_bp,%ld\n", LEN);
179 ++ fprintf(stderr, "reporter:counter:asm,reads_total,%lld\n", COUNT);
180 ++ fprintf(stderr, "reporter:counter:asm,reads_bp,%lld\n", LEN);
181 + }
182 + catch (Exception_t & e)
183 + {
184 +--- a/src/Align/kmer-cov.cc
185 ++++ b/src/Align/kmer-cov.cc
186 +@@ -485,7 +485,7 @@
187 + Kmer_Len = s . length ();
188 + else if (Kmer_Len != int (s . length ()))
189 + {
190 +- sprintf (Clean_Exit_Msg_Line, "New kmer \"%s\" length is %d instead of %d",
191 ++ sprintf (Clean_Exit_Msg_Line, "New kmer \"%s\" length is %zu instead of %d",
192 + s . c_str (), s . length (), Kmer_Len);
193 + Clean_Exit (Clean_Exit_Msg_Line, __FILE__, __LINE__);
194 + }
195 +--- a/src/Align/kmer-cov-plot.cc
196 ++++ b/src/Align/kmer-cov-plot.cc
197 +@@ -316,7 +316,7 @@
198 + }
199 + else if (Kmer_Len != int (s . length ()))
200 + {
201 +- sprintf (Clean_Exit_Msg_Line, "New kmer \"%s\" length is %d instead of %d",
202 ++ sprintf (Clean_Exit_Msg_Line, "New kmer \"%s\" length is %zu instead of %d",
203 + s . c_str (), s . length (), Kmer_Len);
204 + Clean_Exit (Clean_Exit_Msg_Line, __FILE__, __LINE__);
205 + }
206 +--- a/src/Align/make-consensus.cc
207 ++++ b/src/Align/make-consensus.cc
208 +@@ -303,7 +303,7 @@
209 + break;
210 + }
211 +
212 +- sprintf (sid, "%ld", ++layout_id);
213 ++ sprintf (sid, "%u", ++layout_id);
214 + cid = string (sid);
215 + ID_t lid = layout.getIID ();
216 + if (lid == 0)
217 +--- a/src/Align/make-consensus_poly.cc
218 ++++ b/src/Align/make-consensus_poly.cc
219 +@@ -279,7 +279,7 @@
220 + break;
221 + }
222 +
223 +- sprintf(sid, "%ld", ++layout_id);
224 ++ sprintf(sid, "%u", ++layout_id);
225 + cid = string(sid);
226 + ID_t lid = layout.getIID();
227 + if (lid == 0) {
228 +--- a/src/Align/simple-overlap.cc
229 ++++ b/src/Align/simple-overlap.cc
230 +@@ -422,7 +422,7 @@
231 + "Options:\n"
232 + " -a Also show alignments of overlaps \n"
233 + " -E <x> Maximum error rate for overlaps is <x>\n"
234 +- " e.g., -E 0.06 for 6% error rate\n"
235 ++ " e.g., -E 0.06 for 6%% error rate\n"
236 + " -F Input is a fasta file\n"
237 + " -h Print this usage message\n"
238 + " -o <n> Set minimum overlap length to <n>\n"
239 +--- a/src/Compare/contig-cmp.cc
240 ++++ b/src/Compare/contig-cmp.cc
241 +@@ -145,7 +145,7 @@
242 +
243 + fclose (fp);
244 +
245 +- fprintf (stderr, "%u a contigs\n", a . size ());
246 ++ fprintf (stderr, "%zu a contigs\n", a . size ());
247 + vector <Unitig_t> a_contig (max_id + 1);
248 + n = a . size ();
249 + for (i = 0; i < n; i ++)
250 +@@ -234,7 +234,7 @@
251 +
252 + fclose (fp);
253 +
254 +- fprintf (stderr, "%u b contigs\n", b . size ());
255 ++ fprintf (stderr, "%zu b contigs\n", b . size ());
256 + vector <Unitig_t> b_contig (max_id + 1);
257 + n = b . size ();
258 + for (i = 0; i < n; i ++)
259 +--- a/src/Staden/progs/trace_convert.c
260 ++++ b/src/Staden/progs/trace_convert.c
261 +@@ -6,6 +6,9 @@
262 + #include "traceType.h"
263 + #include "seqIOABI.h"
264 +
265 ++#include <fcntl.h>
266 ++#include <unistd.h>
267 ++
268 + static char fileIdentifier[] = "$Id$";
269 +
270 + struct opts {